Error when starting image task

Sign in · GitLab

I have been running my experiment locally without any problems, it begins with an audio conditions, followed by slider questionnaires and then mental rotation tasks. The tasks were prebuilt from pavlovia, so I assumed that I wouldn’t have to make any changes when including them in my experiment, however I get this error right as I click to start the task trials:

FATAL 13:33:52.447 GUI.dialog psychojs-2021.2.3.js:1257 | {“origin”:“TrialHandler.importConditions”,“context”:“when importing condition: rotationstimuli123.xlsx”,“error”:{}}
BrowserConsoleAppender.append @ log4javascript.js:148

Line 148 says this:
if(typeof console[consoleMethodName].apply==“function”){console[consoleMethodName].apply(console,getFormattedMessage(false));}else{consoleconsoleMethodName;}}else if((typeof opera!=“undefined”)&&opera.postError){opera.postError(getFormattedMessage(true));}};{if(window.console&&{;}};BrowserConsoleAppender.prototype.groupEnd=function(){if(window.console&&window.console.groupEnd){window.console.groupEnd();}};BrowserConsoleAppender.prototype.toString=function(){return"BrowserConsoleAppender";};log4javascript.BrowserConsoleAppender=BrowserConsoleAppender;var xhrFactory=function(){return new XMLHttpRequest();};var xmlHttpFactories=[xhrFactory,function(){return new ActiveXObject(“Msxml2.XMLHTTP”);},function(){return new ActiveXObject(“Microsoft.XMLHTTP”);}];var withCredentialsSupported=false;var getXmlHttp=function(errorHandler){var xmlHttp=null,factory;for(var i=0,len=xmlHttpFactories.length;i<len;i++){factory=xmlHttpFactories[i];try{xmlHttp=factory();withCredentialsSupported=(factory==xhrFactory&&("withCredentials"in xmlHttp));getXmlHttp=factory;return xmlHttp;}catch(e){}}

I am no master with online experiments, this is my first one. If anyone can figure out the solution, please let me know!

I’m sorry, but there isn’t enough information here to help you.

Does an error appear in the Browser? I’m assuming that this was copied from the developer console.

What are the column names in rotationstimuli123.xlsx?

Is there any code related to this spreadsheet?

What are the parameters of the loop pointing at this spreadsheet?

Hello! The error does appear in the browser when checking the console.

The column names in the xlsx are figure1, figure2, corrAnswer, format, type, and size

There is no code related to the spreadsheet

The loop parameters are random, istrials, selected rows = np.random.choice( 20 , size = 6 , replace = False) (which is to pick 6 out of 20 image combinations), nreps = 1, and the excel file is the conditions file.

If you need any other information, please let me know. Thanks!

np stands for numpy which is a Python library.

What I would recommend of picking six rows is to point to all rows and then end the loop early using

if trials.thisN == 5:
     trials.finished = True

(if your loop is called trials)