Multiple Psychopy errors at startup and sync: 401

Once opening Psychopy (with a completely new experiment or opening an older experiment file), I get this error message pop up:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app_psychopyApp.py”, line 864, in onIdle
idle.doIdleTasks(app=self)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\idle.py”, line 105, in doIdleTasks
_doTask(taskName, app)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\idle.py”, line 142, in doTask
currentTask’func’
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\menu.py”, line 97, in setUser
pavlovia.getCurrentSession().setToken(token)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 407, in setToken
self.startSession(token)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 432, in startSession
self.gitlab.auth()
File "C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init
.py", line 196, in auth
self.token_auth()
File "C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init
.py", line 209, in token_auth
self.user = self.objects.CurrentUserManager(self).get()
File “C:\Program Files\PsychoPy3\lib\site-packages\gitlab\exceptions.py”, line 242, in wrapped_f
return f(*args, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\gitlab\mixins.py”, line 68, in get
server_data = self.gitlab.http_get(self.path, **kwargs)
File "C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init
.py", line 517, in http_get
streamed=streamed, **kwargs)
File "C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init
.py", line 491, in http_request
response_body=result.content)
gitlab.exceptions.GitlabAuthenticationError: 401: 401 Unauthorized

I can exit this or close Psychopy. After I exit the popup, it seems like I can add routines and loops just fine, but if I try to sync the new experiment onto Pavlovia, then I get this error message:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1227, 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 1318, in project
elif self.filename and pavlovia.getProject(self.filename):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 1082, in getProject
login(nameSpace, rememberMe=True)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 107, in login
currentSession.setToken(token)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 407, in setToken
self.startSession(token)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 432, in startSession
self.gitlab.auth()
File “C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init_.py”, line 196, in auth
self.token_auth()
File "C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init
.py", line 209, in token_auth
self.user = self.objects.CurrentUserManager(self).get()
File “C:\Program Files\PsychoPy3\lib\site-packages\gitlab\exceptions.py”, line 242, in wrapped_f
return f(*args, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\gitlab\mixins.py”, line 68, in get
server_data = self.gitlab.http_get(self.path, **kwargs)
File "C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init
.py", line 517, in http_get
streamed=streamed, **kwargs)
File "C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init
.py", line 491, in http_request
response_body=result.content)
gitlab.exceptions.GitlabAuthenticationError: 401: 401 Unauthorized

It addresses different lines but still gives an overall 401 Unauthorized. If I try to make a new experiment on Pavlovia via Pavlovia.org > New, I get this error now:

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’

I’ve tried to reinstall different versions of Psychopy multiple times and none (v2021.1.3, v2020.2.1, v2020.1.3) have worked. I’ve also restarted my computer multiple times and did a malware check.
I’m really unsure what to do and I’m unfortunately on a strict time crunch.

Hi There,

Is there any chance you created your user name after Jan 4th? If so this could be an issue relating to the fire, and it should be back to normal on Monday Getting studies running again on Pavlovia - #32 by thomas_pronk

Thanks,
Becca

Hey Becca,
I created my Gitlab username back in October so idk if the fire would have affected it. Thank you though!

Also, I’m having problems with Psychopy itself as well so I don’t even know if this is necessarily a syncing only related issue.

If you select the user icon within psychopy (second from right globe) does it say that you are logged in? if not are you able to login or do you get the username error

Thanks,
Becca

It used to have my username already saved but looks like it didnt this time. i went ahead and logged in and tried to sync an existing experiment and a new one. The new one kinda made Psychopy crash but it still synced? Then the existing file (which I saved under a new name to sync) gave me this error but still synced again!

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’

Not really sure whats going on here but the syncing problems may very well be due to the fire.

I mean it runs now just fine online so I guess problem solved? I’ll update this thread if any other problem resumes after Monday. Thanks @Becca!

Fab yes hopefully it will smooth out monday - at least there seems to have been a temporary fix!:slight_smile:
Becca