psychopy.org | Reference | Downloads | Github

Gitlab Authentication Error: 401

Hi! I get an error message when I open PsychoPy (v.2020.2.10) on Windows 10 that says that PsychoPy encountered an unhandled internal error. I read a similar post where the problem was solved by opening the experiment with an older version of PsychoPy, but I got the same error message when I tried this solution.

Here are the details of the message:

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

Thank you in advance for your help!
/Rebecca

Hey Becca, could you try to log in via PsychoPy on Pavlovia and then try syncing again?

Hey, after logging in through PsychoPy, I tried to sync and I got this message: “none points to a remote that doesn’t exist (deleted). What shall we do?” Should I check “re)create a project”? Will this delete the data from my previous project?

Hmmm, let’s check gitlab first. If you go to gitlab.pavlovia.org, how do things look over there?

There my project looks as it did before. All the files in place.

Hold on, I’m asking around. To be safe you could already download the data. See the button at the topleft with a little cloud on it.

Another question if I may: could you post the URL to your project?

Sure! Here it is: https://run.pavlovia.org/rebecca_anagnost/ldt

I think I already got a solution for you. In the PsychoPy Builder, Pavlovia.org → Search Pavlovia. If you search for your project and then sync it to a new folder, it will work out

I did that, and it said successful sync, but when I try with the sync button on Builder, I still get an 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\pavlovia_ui\project.py”, line 533, in syncProject
infoStream=syncFrame)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\functions.py”, line 119, in showCommitDialog
project.commit(commitMsg)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 962, in commit
self.repo.git.commit(’-m’, message)
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 commit -m _
stderr: ’
*** Please tell me who you are.

Run

git config --global user.email “you@example.com
git config --global user.name “Your Name”

to set your account’s default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got ‘rebec@DESKTOP-TD60Q1D.(none)’)’

Guess we do need to invoke our database magician then. He’s having a little cool-down at the moment, but I’ve collected your issue in a list so that he can pick it up. Update soon!

Thank you very much!

1 Like

Hello @Rebecca_Anagnost ,

Would you like to give it another go? I might have fixed the issue on my end.
Cheers,

Alain

Hello,

Thanks for your message. I tried to sync again, and I got that window again that says “None points to a remote that doesn’t exist (deleted). What shall we do?”. Then I tried to search for my project and link with another file but I got this error message:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 384, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 380, in _make_request
httplib_response = conn.getresponse()
File “C:\Program Files\PsychoPy3\lib\http\client.py”, line 1331, in getresponse
response.begin()
File “C:\Program Files\PsychoPy3\lib\http\client.py”, line 297, in begin
version, status, reason = self._read_status()
File “C:\Program Files\PsychoPy3\lib\http\client.py”, line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), “iso-8859-1”)
File “C:\Program Files\PsychoPy3\lib\socket.py”, line 586, in readinto
return self._sock.recv_into(b)
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\contrib\pyopenssl.py”, line 298, in recv_into
raise timeout(‘The read operation timed out’)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\requests\adapters.py”, line 449, in send
timeout=timeout
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\util\retry.py”, line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\packages\six.py”, line 686, in reraise
raise value
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 600, in urlopen
chunked=chunked)
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 386, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 306, in _raise_timeout
raise ReadTimeoutError(self, url, “Read timed out. (read timeout=%s)” % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘gitlab.pavlovia.org’, port=443): Read timed out. (read timeout=2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\search.py”, line 252, in onChangeSelection
self.frame.detailsPanel.setProject(proj[‘id’])
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py”, line 261, in setProject
project = pavlovia.getCurrentSession().getProject(project)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 346, in getProject
return PavloviaProject(id, repo=repo)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 486, in init
self.pavlovia = currentSession.gitlab.projects.get(proj)
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 49, in get
server_data = self.gitlab.http_get(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 472, in http_request
result = self.session.send(prepped, timeout=timeout, **settings)
File “C:\Program Files\PsychoPy3\lib\site-packages\requests\sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\requests\adapters.py”, line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host=‘gitlab.pavlovia.org’, port=443): Read timed out. (read timeout=2)

Should I try to delete my project from Pavlovia, create a new one and sync my experiments there, since I don’t have any participant responses yet?
Probably I would have to create a new project anyway, because I have two experiments, and I will need two different links for my participants. So, wouldn’t I need to have two pavlovia projects anyway to have two links?

Thanks again for your help.

This now looks like a separate issue, which possibly has to do with the connection to the server.
If that is not too much trouble, I would indeed encourage you to create a new experiment. That should take care of it all, and give you a clean slate.
Typically, one would create one pavlovia project per experiment.

Alain

Hi Alain,

Thanks for your answer. I indeed deleted my experiments both locally and on Pavlovia and recreated them. I made one project for each of them, but now when I try to sync I get a message that says “this file doesn’t belong to any existing project”. Then I recreated the project, but I still get the same message and it doesn’t sync.
Also, the first time I created the projects I got these error messages:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 384, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 380, in _make_request
httplib_response = conn.getresponse()
File “C:\Program Files\PsychoPy3\lib\http\client.py”, line 1331, in getresponse
response.begin()
File “C:\Program Files\PsychoPy3\lib\http\client.py”, line 297, in begin
version, status, reason = self._read_status()
File “C:\Program Files\PsychoPy3\lib\http\client.py”, line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), “iso-8859-1”)
File “C:\Program Files\PsychoPy3\lib\socket.py”, line 586, in readinto
return self._sock.recv_into(b)
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\contrib\pyopenssl.py”, line 298, in recv_into
raise timeout(‘The read operation timed out’)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\requests\adapters.py”, line 449, in send
timeout=timeout
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\util\retry.py”, line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\packages\six.py”, line 686, in reraise
raise value
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 600, in urlopen
chunked=chunked)
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 386, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File “C:\Program Files\PsychoPy3\lib\site-packages\urllib3\connectionpool.py”, line 306, in _raise_timeout
raise ReadTimeoutError(self, url, “Read timed out. (read timeout=%s)” % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘gitlab.pavlovia.org’, port=443): Read timed out. (read timeout=2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py”, line 146, in submitChanges
namespace=namespace)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 324, in createProject
gitlabProj = self.gitlab.projects.create(projDict)
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 204, in create
**kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init_.py”, line 589, in http_post
post_data=post_data, files=files, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\gitlab_init_.py”, line 472, in http_request
result = self.session.send(prepped, timeout=timeout, **settings)
File “C:\Program Files\PsychoPy3\lib\site-packages\requests\sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\requests\adapters.py”, line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host=‘gitlab.pavlovia.org’, port=443): Read timed out. (read timeout=2)

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’

/Rebecca

Hi. It seems I am having almost the exact same issue as you, as these same unhandled internal errors continue to appear while I am trying to do anything on psychopy related with pavlovia. It would be great if you could let me know of a solution if you find one, and I will too if I find a solution. Thanks.

1 Like

Hi. Yes, I will let you know if I find something : )

FYI, I’m getting the same error (" unable to auto - detect email address"). My usecase is I have a new desktop computer. I’m trying to sync an existing PsychoPy experiment to that computer. I successfully use the search for experiments to find my experiment and click sync. It says sync successful. The files appear in the chosen directory. However, when I then open the experiment, then try to sync it again to Pavlovia, I get this traceback:

Traceback (most recent call last):
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py", line 1326, in onPavloviaSync
    retVal = pavlovia_ui.syncProject(parent=self, project=self.project)
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py", line 533, in syncProject
    infoStream=syncFrame)
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\functions.py", line 119, in showCommitDialog
    project.commit(commitMsg)
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py", line 967, in commit
    self.repo.git.commit('-m', message)
  File "C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py", line 548, in <lambda>
    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 commit -m Trying to sync on this new desktop
  stderr: '
*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'arthu@DESKTOP-G29QHSF.(none)')'

By the way, that last line contains my computer name and account on my computer username.

Hi! What I did after all was to delete everything both locally and on Pavlovia and recreate the experiments. The first time it didn’t work and I got the same error message again (fail to sync), but then I tried again and it did work. I know this is not a direct solution to the problem, but for me it worked. Another thing that I assume affected my situation was that I made the mistake to change a file on gitlab (which I later found out is something you should never do unless you have a very good reason) and then the syncronisation failed because the local files and the online files didn’t agree (if I understand correctly).
I don’t know how the change of computer in your case might have complicated it even more, hope you find a solution soon.

1 Like