psychopy.org | Reference | Downloads | Github

Can't upload psychopy experiment to Pavlovia

URL of experiment:

Description of the problem:

I’m trying to upload new experiments to my Pavlovia account. However, I keep encountering this problem:

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 1242, in onPavloviaRun
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/pavlovia_ui/project.py”, line 533, in syncProject
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/pavlovia_ui/functions.py”, line 119, in showCommitDialog
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/projects/pavlovia.py”, line 962, in commit
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/git/cmd.py”, line 548, in
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/git/cmd.py”, line 1014, in _call_process
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/git/cmd.py”, line 825, in execute
git.exc.GitCommandError: Cmd(‘/Applications/PsychoPy.app/Contents/Resources/git-core/git’) failed due to: exit code(1)
cmdline: /Applications/PsychoPy.app/Contents/Resources/git-core/git commit -m _
stdout: ‘On branch master
Changes not staged for commit:
modified: .RData
modified: .Rhistory
modified: .bash_history
modified: .bash_profile
deleted: .cache/fontconfig/84c0f976e30e948e99073af70f4ae876-le64.cache-7
deleted: .cache/fontconfig/b0a71e6bf6a8a1a908413a823d76e21f-le64.cache-7
modified: .idlerc/recent-files.lst
modified: .psychopy3/appData.cfg
modified: .psychopy3/last_app_load.log
modified: .psychopy3/pavlovia/projects.json
modified: .psychopy3/pavlovia/users.json

Untracked files:
.rnd
.rstudio-desktop/
.subversion/
.vscode/
.wdc/
Applications/
Creative Cloud Files/
Desktop/
Documents/
Downloads/
Dropbox (Old)/
Dropbox/
Library/
Movies/
Music/
Pictures/
Public/
Samsung/
Zotero/
iCloud Drive (Archive)/

no changes added to commit’
stderr: ‘warning: could not open directory ‘.Trash/‘: Operation not permitted’

1 Like

Where is your PsychoPy experiment file? It looks like it’s in the root of your User folder. You need to create a dedicated folder for it.

I saved the files to a folder in Documents. So everything include stimuli and .psyexp and lastrun.py are in that folder.

Hello,

Did you resolve this issue?

Hey @U2051246,

Are you encountering something similar?

Exactly the same thing. I have created my experiment in PsychoPy builder and it is fully functional offline, but I cannot sync with Pavlovia.

We’ll need some more information I’m afraid. What error did you get for example? Where is your folder at? Also, this tutorial might already help out? Creating online experiments from Builder — PsychoPy v2021.1

When I attempt to ‘synch’ the following error presents:

image

The details of which are:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1325, in onPavloviaSync
retVal = pavlovia_ui.syncProject(parent=self, project=self.project)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1416, in project
elif self.filename and pavlovia.getProject(self.filename):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 1068, in getProject
gitRoot = getGitRoot(filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 1049, in getGitRoot
cwd=str(p)).decode(‘utf-8’):
File “C:\Program Files\PsychoPy3\lib\subprocess.py”, line 336, in check_output
**kwargs).stdout
File “C:\Program Files\PsychoPy3\lib\subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘git’, ‘branch’, ‘–show-current’]’ returned non-zero exit status 128.

The folder is located as a folder entitled ‘Experiment Folder’ which is located on the desktop.

I’m sorry, I don’t understand the code. I created the experiment in builder.

I am registered with a Pavlovia account to which my PsychoPy is logged into and I have created a Project awaiting the upload.

Thnx! I’m not totally sure what’s going wrong, but I’ve got a hunch as how you could fix it:

  1. Enable showing hidden folders in your file explorer
  2. Inside your experiment folder there should be a folder named “.git”, delete that folder
  3. Then try to sync again

Hi, thanks for the suggestion, however we get the same result.

In that case, I’ll recategorize this post under “Builder”, so that people with more expertise in this part can pick it up. Hope it will work out soon!

Hi! Yes the issue was solved. I created a new experiment folder under \Users\ and that solved the issue.

1 Like

Hi there,

I’m encountering the same error but this time the previous solution doesn’t work anymore. I have the experiment file at \Users\

I think the error occurs because the builder can’t generate js files. The same error occurs when I clicked on exporting the html or the JS button.

The error message:

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 1339, in onPavloviaRun
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 759, in fileExport
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 73, in generateScript
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 242, in compileScript
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 214, in _makeTarget
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 266, in writeScript
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/routine.py”, line 340, in writeEachFrameCodeJS
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/components/_base.py”, line 763, in writeFrameCodeJS
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/components/_base.py”, line 302, in writeStartTestCodeJS
TypeError: str returned non-string (type NoneType)