| Reference | Downloads | Github

Online Experiment Not Launching

URL of experiment:

Description of the problem: When I try to launch the experiment, I get the participant ID page, then it immediately says it is saving the data. The task itself doesn’t run at all. I had a very hard time uploading it. I am a complete novice with this. I don’t know Java script, this is my first experience with Pavlovia (I don’t use any other online storage platforms) etc. I know my experiment, and that is about it. I apologise in advance for my lack of knowledge. Below is what I went through to get it uploaded, in case it helps.

I downloaded PsychoPy 3 and tested my experiment (built in 1.90.2). It worked fine.
I got a Pavlovia account and tried to upload my experiment. The experiment was open in Builder at the time. I kept getting a Value error that the stat path was too long for windows.
I tried everything people told me, and couldn’t get it to sync. So, I uninstalled PsychoPy. That is when I found PsychoPy 1.90.2 was still on my computer. I uninstalled that.
I reinstalled. I went to the directions and tried again. This time my experiment was NOT open. It uploaded. I did try again to upload it while open, and got the same error.

Odd things that may be part of the issue: my experiment does not open if I open PsychoPy 3, go to file, and then open. It just sits there. It does not freeze. I can open other things after trying to open my puzzle task, but my puzzle task will not open. Also when my puzzle task uploaded to Pavolvia, the experiment and all of the required images and conditions were in their own folder. Despite this, conditions and files from a completely different folder that were part of past versions of the experiment uploaded.

Hi @wineandsushi, the experiment you have uploaded is a blank experiment, so it loads fine, however there are no routines in the experiment, so it ends as soon as it starts. You will have to try uploading your experiment whilst it is open in Builder. If you are having problems opening your experiment, post any error messages you get, or upload a copy here so we can take a look.

Hi @dvbridges, thank you again for your help. The experiment won’t upload when it is open. I get the error I cited above: Value Error: stat path too long for Windows.

I have already posted that error seperately, but it remains unsolved. I am in the process right now of rebuilding the entire experiment from scratch in PsychoPy 3. Unfortunately, it is a huge experiment, so that will take me all day. I will try that and get back to you asap, unless you have something else for me to try regarding the value error issue. Thank you again.

I just mean upload the psyexp file, dont worry about stim for now.

Hi @dvbridges

I’m not sure what you meant by your last comment (upload to Pavlovia, or here).

Anyway, I rebuilt the entire experiment in the latest version of PsychoPy. It works fine on my computer, but when I go to upload, I’m still getting the same error:

Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\app\builder\”, line 2265, in onPavloviaSync
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\app\builder\”, line 1682, in fileExport
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\app\builder\”, line 2241, in generateScript
psyexpCompile.compileScript(infile=self.exp, version=None, outfile=experimentPath)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\scripts\”, line 51, in compileScript
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\”, line 201, in writeScript
self.settings.writeInitCodeJS(script, self.psychopyVersion, localDateTime, modular)
File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\experiment\components\settings_init
.py", line 497, in writeInitCodeJS
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\experiment\components\”, line 486, in prepareResourcesJS
resourceFiles = self.exp.getResourceFiles()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\”, line 801, in getResourceFiles
thisFile = getPaths(thisParam.val)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\”, line 726, in getPaths
if os.path.isfile(thisFile[‘abs’]):
File “C:\Program Files (x86)\PsychoPy3\lib\”, line 30, in isfile
st = os.stat(path)
ValueError: stat: path too long for Windows

I am scheduled to use this with participants on Tuesday. Any help would be massively appreciated. Thanks!

I’ll also upload the experiment here.Puzzle_Task.psyexp (692.0 KB)

I really wouldn’t recommend that you schedule participants for a study that isn’t currently working.

It’s working on the computers. It would just be far better if I could get it online - I could test more participants at once. Plus, I’m a PhD student. I’m on a time crunch. I apologise.

OK, that’s fine. Just be aware that if you schedule participants for something that doesn’t work I don’t consider it my problem! :wink: We have our own time constraints too (lectures, tutorials, exam scripts, manuscript reviews, writing psychopy…things like that).

I completley understand that. And, yes, this is completely my problem. So, I am doing everything in my power to fix to figure out how to make this happen. Unfortnately, I’m stuck. I wish my skills were better (I do have the book now!). That’s why I have a backup plan, and why I’m on here.

My comment was not please hurry up. My comment was intended to express how much I appreciate the help. I profusely apologize for any misunderstanding.

I’ve had a look at your experiment and you’ve got hundreds and hundreds of lines of Python code that aren’t going to run online. The compiled python experiment has over 10,000 lines of code (this is more than any experiment I’ve ever encountered).
Python doesn’t work in a browser so your code components (hundreds of lines each) would have to be converted to JavaScript.

Basically, at this point I think you should not be thinking about trying to convert your very complex task into a web experiment. Certainly, I don’t think anyone will have the time to sit and help you convert your code into javascript.

Sorry for the bad news, but glad to hear it works fine on the desktop machines

Hi @Jon,

No worries. That was my guess, but I didn’t know for sure. Thank you very much for checking it out for me. I will have to learn Java during my postdoc.

Thank you again.

Make sure it’s JavaScript and not Java you commit to learning :wink:. In one of the most puzzling naming decisions of all time, they are completely different beasts.

Thank you very much! I would not have known the difference.