Builder Not Compiling Scripts

For a current experiment I’m working on, Builder will not compile a Py script for it.
It can do it for new experiments I create. But when I try for my current one I get the following error:

subprocess.CalledProcessError: Command ‘[‘C:\Program Files (x86)\PsychoPy3\pythonw.exe’, ‘-m’, ‘psychopy.scripts.psyexpCompile’, ‘C:\Users\Cameron\Desktop\PsychopyStuff\SocMotExpActual\SocMotExperiment4-CodeConv.psyexp’, ‘-o’, ‘C:\Users\Cameron\Desktop\PsychopyStuff\SocMotExpActual\SocMotExperiment4-CodeConv.py’, ‘-v’, ‘3.2.4’]’ returned non-zero exit status 120.

I managed to fix this by switching to an older Psychopy version (V3.2.0)

  • Had to try a few until I found one that could both Export HTML with movie components and didn’t have issues with compiling scripts from builder after including JScode in code components

Could you provide us with a link to a study that works with 3.2.0 but not with 3.2.4? @dvbridges and I aren’t aware of problems upgrading to that so I’d like to know if something needs fixing.

thanks

Hi Jon, here’s the link to the experiment in Gitlab:

https://gitlab.pavlovia.org/CAMaitland/socialmotivationandidentity

Thanks @CAMait, by the way I notice you have used a rating scale in your task. The rating scale is superseded by the Slider, and so rating scales have not been implemented for online tasks. You will need to replace them with Sliders. there is also an issue with your movie, looks like a compile error that will be fixed if you provide a size for each movie. I will get this fixed on Github for the next release.

@jon, I was able to upload using 3.2.4 with no issues, which makes me think it was either a timeout issue, or an issue with the versions folder not clearing / or problem retrieving version 3.2.4 from the versions repository.

1 Like

Hi @dvbridges, thanks for the heads-up on the rating scales, I’ll change them to sliders soon.
However with the movies, I’ve specified the size as [1200,800] for them and I’m still getting a compile error. Any ideas?

@CAMait, also, there does appear to be issues playing avi videos at the moment. I have raised this as an issue.

Re: the compile issue, does it tell you which line that the error is on? If so, take a look at the JS file and let me know - could be a coding issue.

@dvbridges Thanks so much for your help so far. I’ve modified my experiment since replying sorry and I’m having a different error. I’ve changed my videos from .avi to .mp4 and replaced the rating scales with sliders.

I see from above that you had no issue with uploading using version 3.2.4.
I’m in the position now where older versions of Psychopy do not accept the movie components when I try to Export HTML. I get the error:

I don't know the appropriate default value for a 'movie' parameter. Please email the mailing list about this error

But when I use 3.2.4, when I try to compile a script/ Export HTML, I get the same error as in the original post, i.e.:

Traceback (most recent call last):
  File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py", line 1682, in fileExport
    target="PsychoJS")
  File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py", line 2237, in generateScript
    out = subprocess.check_output(cmd)
  File "C:\Program Files (x86)\PsychoPy3\lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "C:\Program Files (x86)\PsychoPy3\lib\subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\\Program Files (x86)\\PsychoPy3\\pythonw.exe', '-m', 'psychopy.scripts.psyexpCompile', 'C:\\Users\\Cameron\\Desktop\\PsychopyStuff\\SocMotExpActual\\SocMotExperiment3.psyexp', '-o', 'C:\\Users\\Cameron\\Desktop\\PsychopyStuff\\SocMotExpActual\\html\\SocMotExperiment3.js', '-v', '3.2.4']' returned non-zero exit status 120.

Any ideas how I can fix this?

I reinstalled Psychopy and that fixed the issue with movie formats.