Error message when syncing experiments from PsychoPy Builder to Pavlovia

Hi all,

I have encountered a problem trying to sync an experiment from Builder to Pavlovia. The specific situation is:

  1. The experiment runs well locally on my computer;
  2. I am logged onto Pavlovia.org
  3. I have creted a clean folder for only the relevant .psyexp document and resources;
  4. I can export an ‘index.html’ file, an ‘experiemnt.js’ file, and an ‘experiment-legacy-browser.js’ file into my folder by clicking on ‘File’ and then ‘Export HTML’.

When I try to create a new experiment online by clicking on ‘Pavlovia.org’ in the Builder, I get the following error message:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\menu.py”, line 124, in onNew
if pavlovia.getCurrentSession().user.username:
AttributeError: ‘NoneType’ object has no attribute ‘username’

Any help will be deeply appreciated!

Best wishes,
Xinyan

Are you sure the login has worked? Due to the fire at the datacenter data (including usernames) created in Jan/Feb were temporarily unavailable. Currently we’re providing both sets of data (pre/post fire) on 2 separate servers and hopefully we’ll have everything merged back together by tomorrow (23rd March).

My guess in your case is that you created a username sometime after Christmas and that is currently only on tamplovia.org and so the log in currently doesn’t work. If so this should be resolved shortly

I had the same problem, it was “fixed” when I logged into pavolvia through builder (even though I was successfully logged in already). However, the new project it allowed me to create is not updated and anytime I try to sync or update I get a series of internal errors that look like this

Thank ahead of time for any assistance.

@ablument your error looks like an issue reading one of your conditions files. Could you post those here?

NB, when you send an error traceback it would be good if you included all the lines - you can press the copy button rather than sending the screenshot

Hi Jon,

I tried to create a new project today (logged into the system) and got a different error:

Traceback (most recent call last):
** File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py”, line 161, in submitChanges**
** self.parent.project = self.project**
AttributeError: ‘NoneType’ object has no attribute 'project’

I then had the option to “Recreat” which I tried and got this error:

Pushing files to Pavlovia
Pushing to Pavlovia for the first time…Traceback (most recent call last):
** File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py”, line 517, in syncProject**
** project.firstPush(infoStream=syncFrame)**
** File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 822, in firstPush**
** info = self.repo.git.push(’-u’, self.remoteWithToken, ‘master’)**
** File “C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py”, line 548, in **
** return lambda args, kwargs: self._call_process(name, args, kwargs)
** File “C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py”, line 1014, in _call_process

** return self.execute(call, exec_kwargs)
** File “C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py”, line 825, in execute

** raise GitCommandError(command, status, stderr_value, stdout_value)**
git.exc.GitCommandError: Cmd(‘C:\Program Files\PsychoPy3\MinGit\cmd\git.exe’) failed due to: exit code(128)
** cmdline: C:\Program Files\PsychoPy3\MinGit\cmd\git.exe push -u master**
** stderr: 'fatal: ‘master’ does not appear to be a git repository**
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.'

The project exists in the Dashboard, but is “UNKNOWN” for platform

I recommend deleting the project and try syncing again. On gitlab, delete via Settings → Genetal → Advanced. On your hard drive in the folder that contains your experiment, delete the .git folder.

There was no .git file in my experiment folder…

I did delete via gitlab and tried to sync again, but same error as the first.

Did you check for hidden files and folders?

No…can you explain what I should check for precisely? I have folders in two different directories at the moment, could that be creating the problem?

This query could help: show hidden files at DuckDuckGo

Hello,

Have you found any solution? I have the same problem. When I try to upload a new project I get this message. I’ve been trying this for a few weeks now.

Maybe the thread below could help out? Often, just flipping some switch or setting can help, but it can be hard to find the right switch. Alternatively, just taking a drastic approach can fix it.

1 Like

Thanky @thomas_pronk . Cleaning up the preferences worked for me.

1 Like

Since updating to 2022.1.1 (to try fixing a different issue), I’m now getting this error too when trying to create a new project on pavlovia via Builder:

Traceback (most recent call last):
  File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\pavlovia_ui\menu.py", line 127, in onNew
    if pavlovia.getCurrentSession().user.username:
AttributeError: 'User' object has no attribute 'username'

I’ve tried cleaning/removing appData and preferences, as well as fully uninstalling/reinstalling. Still getting the same issue… I’ve also tried with two different pavlovia accounts (the Runner states that the accounts, separately, were logged in successfully). Lastly, trying to just sync raises the dialog about there being no associated project, then allowing to create a new one, but then that gets an error that the username is not found on pavlovia/github!

Please help.

1 Like

Yes I’m having the exact same issue.

1 Like

And me too.

1 Like

Hey there. After updating to 2022.1.1 I am encountering the same issue. Anybody has a solution? Already reinstalled, cleaned out preferences and so on.
Thanks in advance.

1 Like

Hi there, I am also having the same issue with 2022.1.1.
[Psychopy installed with pip on Linux bll4 5.10.0-8-amd64 #1 SMP Debian 5.10.46-5 (2021-09-23) x86_64 GNU/Linux]

  1. If I create a new experiment from scratch and hit the Sync button, everything runs smoothly, until I am prompted by “The file doesn’t belong to any existing project” and I hit “Create a new project”, after which Psychopy crashes returning
    [4]+ Segmentation fault python3 /usr/local/lib/python3.9/dist-packages/psych
    An html folder is created locally, but no .git folder and nothing is created on Pavlovia either.

  2. In turn, if I take an earlier experiment (that I previously uploaded to Pavlovia and it is still up and running), make a copy, delete the .git * and html folders, and hit the Sync button, I get the following error (similar to those previously reported):

Traceback (most recent call last):
File “/usr/local/lib/python3.9/dist-packages/psychopy/app/builder/builder.py”, line 1370, in onPavloviaSync
htmlPath = self._getHtmlPath(self.filename)
File “/usr/local/lib/python3.9/dist-packages/psychopy/app/builder/builder.py”, line 1352, in _getHtmlPath
return self._getHtmlPath(self.filename)
File “/usr/local/lib/python3.9/dist-packages/psychopy/app/builder/builder.py”, line 1352, in _getHtmlPath
return self._getHtmlPath(self.filename)
File “/usr/local/lib/python3.9/dist-packages/psychopy/app/builder/builder.py”, line 1352, in _getHtmlPath
return self._getHtmlPath(self.filename)
[Previous line repeated 2975 more times]
File “/usr/local/lib/python3.9/dist-packages/psychopy/app/builder/builder.py”, line 1350, in _getHtmlPath
retVal = self.fileSave()
File “/usr/local/lib/python3.9/dist-packages/psychopy/app/builder/builder.py”, line 747, in fileSave
filename = self.exp.saveToXML(filename)
File “/usr/local/lib/python3.9/dist-packages/psychopy/experiment/_experiment.py”, line 380, in saveToXML
simpleString = xml.tostring(self.xmlRoot, ‘utf-8’)
File “/usr/lib/python3.9/xml/etree/ElementTree.py”, line 1109, in tostring
ElementTree(element).write(stream, encoding,
File “/usr/lib/python3.9/xml/etree/ElementTree.py”, line 732, in write
with _get_writer(file_or_filename, enc_lower) as write:
File “/usr/lib/python3.9/contextlib.py”, line 117, in enter
return next(self.gen)
File “/usr/lib/python3.9/xml/etree/ElementTree.py”, line 781, in _get_writer
if isinstance(file_or_filename, io.BufferedIOBase):
File “/usr/lib/python3.9/abc.py”, line 98, in instancecheck
return _abc_instancecheck(cls, instance)
File “/usr/lib/python3.9/abc.py”, line 102, in subclasscheck
return _abc_subclasscheck(cls, subclass)
RecursionError: maximum recursion depth exceeded in comparison

Best,
Marco

Hi,

Just to add my name on this issue for version 2022.1.1. userPrefs.cfg and appData.cfg were deleted. I also deleted the users.json file but the issue remains.

Thanks