Description of the problem: OpenIAT modification not initialising - program is fine locally
have been modifying the OpenIAT to work in a slightly different way. The code works fine locally but for some reason will not run online. Not sure what to post for info so please let me know what would help debug.
The online version never gets as far as the experiment settings window so I wonder if it cannot find the relevant stimulus files.
To check that visit https://gitlab.pavlovia.org/, sign in and go to personal projects.
You also can upload the files (openIAT4.js and openIAT4-legacy-browser.js) manually into the html folder.
I also had some troubles with the synchronisation and started to upload things manually on gitlab.
Ah ok, well it seems it’s not generating any JS code. I’m getting the following error messages when I try to sync to pavlovia for the first time and I’m not sure what to do next…:
Generating PsychoJS script…
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 74, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 245, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 217, in _makeTarget
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 247, in writeScript
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\routine.py”, line 321, in writeEachFrameCodeJS
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components\keyboard_init.py", line 310, in writeFrameCodeJS
“Variables for allowKeys aren’t supported for JS yet”)
psychopy.experiment.utils.CodeGenerationException: Variables for allowKeys aren’t supported for JS yet:
I have set the program up so there are two keyboard response components (one for correct and one for incorrect). Each one gets the permitted response from the condition file. CorrectAns if correct, Feedbackkey if incorrect.
I did it this way to allow the program to put an ‘x’ on the screen if the wrong response is initially pressed, and then to wait for the correct response.
These permitted responses are trial dependent. Presumably I need to allow both responses (hard coded in the allowkeys) and then code to determine whether to feedback or not.
When I tried previously to do this in code the program kept moving to the next loop irrespective of how I did it and I couldn’t work out how to simply get the program to do the following:
Permit either the A or L key.
If the correct response (determined by the condition file) is pressed - move to next trial
If the incorrect response (determined by the condition file) is pressed - put an ‘x’ on the screen and wait until the the correct response is pressed.
The RT is determined when the correct response time is pressed.