Experiment not running online/unhandled internal errors when syncing

URL of experiment: https://run.pavlovia.org/sydperry/hnp

Description of the problem:
I have had issues when syncing my experiment to my Pavlovia account. I finally got it to sync but now every time I try to resync/update by clicking the globe icon in builder view it brings up the following unhandled internal error

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 774, in findPathsInFile
filePath = eval(filePath)
File “”, line 1, in
NameError: name ‘expInfo’ is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1226, in onPavloviaSync
self.fileExport(htmlPath=htmlPath)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 719, in fileExport
target=“PsychoJS”)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 73, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 242, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 214, in _makeTarget
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 212, in writeScript
self_copy.flow.writeFlowSchedulerJS(script)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\flow.py”, line 290, in writeFlowSchedulerJS
resourceFiles = set([resource[‘rel’].replace("\", “/”) for resource in self.exp.getResourceFiles()])
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 821, in getResourceFiles
condsPaths = findPathsInFile(params[‘conditionsFile’].val)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 783, in findPathsInFile
[getPaths(condFile) for condFile in os.listdir(expPath)
NotADirectoryError: [WinError 267] The directory name is invalid: ‘C:\Users\jaepe\OneDrive\Desktop\HNI.experiment4\HNP.js’

Furthermore, when trying to pilot my experiment it doesn’t take any time to upload resources (I have over 1,000 and it used to take a long time to upload them). After I fill in the participant and session info and click okay it just says “Closing the session, please wait a few moments” then “Thankyou for your patience” then the experiment ends.

Any help in figuring this out would be greatly appreciated!

Some part of your experiment appears to be referring to C:\Users\jaepe\OneDrive\Desktop\HNI.experiment4 and it looks like that folder doesn’t exist. Maybe it’s One Drive with a space instead?

C:\Users\jaepe\OneDrive\Desktop\HNI.experiment4

I’ve copied and pasted the file location above. There doesn’t seem to be any space needed.

I think it was a bug of that version of PsychoPy (2020.1). I downloaded the latest version of PsychoPy and everything ran great until my text response section which resulted in the following error

  • TypeError: Cannot read property ‘clearEvents’ of undefined

The solution to this error can be found on the forum link above.

I am also being told that ‘expInfo’ is not defined. I was using expInfo[‘group’] to determine which condition Excel file to use. What is even more confusing, is that I created condition Excel files using expInfo[‘group’] for two loops previously and everything worked flawlessly. I am currently using 2020.2.10. I have not updated because I was worried about compatibility and am almost done creating my paradigms.

The full error from the PsychoPy unhandled error is as follows:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 808, in findPathsInFile
filePath = eval(filePath)
File “”, line 1, in
NameError: name ‘expInfo’ is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1221, in onPavloviaSync
self.fileExport(htmlPath=htmlPath)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 719, in fileExport
target=“PsychoJS”)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 73, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 242, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 214, in _makeTarget
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 223, in writeScript
self_copy.flow.writeFlowSchedulerJS(script)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\flow.py”, line 289, in writeFlowSchedulerJS
resourceFiles = set([resource[‘rel’].replace("\", “/”) for resource in self.exp.getResourceFiles()])
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 856, in getResourceFiles
condsPaths = findPathsInFile(params[‘conditionsFile’].val)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 822, in findPathsInFile
files.extend(findPathsInFile(str(condFile)))
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 808, in findPathsInFile
filePath = eval(filePath)
File “”, line 1
C:\Users\knfer\Documents\dissertation\stressors~$ReviewConditionB.xlsx
^
SyntaxError: invalid syntax

Not evaluating expInfo is not itself a problem. The problem is with the line trying to extract C:\Users\knfer\Documents\dissertation\stressors~$ReviewConditionB.xlsx
Maybe you have another file that refers to this location incorrectly? Maybe you’ve inserted a $ where it wasn’t needed? Hard to know what you’ve done wrong from this, but it’s something to do with how you’ve specified that filename I think

Sorry for the delay in response, I must have missed the notification. It looks like I did update the file that day (going back to my commits).

However, I was having an issue where I could sync to Pavlovia only a single time and then would receive an unhandled error (even for something like a text stimulus update). For this, I believe what ended up working was restarting my computer, then syncing. But, actually checking/piloting in Pavlovia on a different computer. The issue seemed to occur only when I also connected to Pavlovia from the same computer. When this error was most persistent, I ended up working between two different computers. After a day, whatever the error was seemed to correct itself and then I could do everything from the same machine. I never figured out what was causing the issue.