Error when exporting HTML from Psychopy to Pavlovia

I have been coding my experiment on PsychoPy (using coder view) and then entering that code in builder view so that I can export the HTML to Pavlovia. My code runs perfectly when I run it locally on Psychopy. However, I do not know why I cannot export the HTML. Here is the error message I keep getting whenever I try exporting it:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\”, line 719, in fileExport
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\”, line 73, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\”, line 242, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\”, line 214, in _makeTarget
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\”, line 223, in writeScript
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\”, line 289, in writeFlowSchedulerJS
resourceFiles = set([resource[‘rel’].replace("\", “/”) for resource in self.exp.getResourceFiles()])
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\”, line 867, in getResourceFiles
thisFile = getPaths(thisParam.val)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\”, line 793, in getPaths
if os.path.isfile(thisFile[‘abs’]):
File “C:\Program Files\PsychoPy3\lib\”, line 30, in isfile
st = os.stat(path)
ValueError: stat: path too long for Windows

I am not sure what to make of this error. When I entered the code, I set my code type to ‘Both’ so that my Python code and my JavaScript code are both there but in the two separate code windows. I also followed the Python/JavaScript crib sheet and made modifications accordingly.

Any help/suggestions/advice would be greatly appreciated.

Hi! I’d recommend reposting your question in the Builder category. I do notice something interesting in the error message, namely the part above. Maybe try moving your experiment to a shorter path?

Thank you for the suggestion! I will re-post it to the Builder category. As for moving the experiment to a shorter path, I do not know how to do that. Does that mean I have to move all of my experiment files to a different folder?

That’s my guess yes. For example, if your experiment was in…
Try putting it in: