"PsychoPy encountered an unhandled internal error"

Good afternoon,

I have a question regarding an error (“PsychoPy encountered an unhandled internal error”) that keeps showing up when I try to upload my experiment. Likewise, it is no longer possible for me to log in to Pavlovia in the PsychoPy app; it is only possible to log in to the normal Pavlovia page, where I cannot upload an experiment, but can only indicate whether the experiment is “inactive” or has the status “piloting” or “running”. I have already tried several things like uninstalling the app and downloading a new version, but I still get the same error. I would be very happy to get some help.

Greetings.

What does the error message in that dialog box say?

Thanks for responding me! I just uploaded a screenshot of that dialog box.

Hi @RaffeyLeapar, I don’t think this screenshot is very helpful, as most of the error message is not visible. Better copy-paste the whole text to your post.

Yes, of course:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\exceptions.py”, line 304, in wrapped_f
return f(*args, **kwargs)
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\mixins.py”, line 112, in get
server_data = self.gitlab.http_get(path, **kwargs)
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\client.py”, line 662, in http_get
result = self.http_request(
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\client.py”, line 628, in http_request
raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 404: 404 Project Not Found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py”, line 663, in project
self._project = self.session.gitlab.projects.get(self.id)
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\v4\objects\projects.py”, line 782, in get
return cast(Project, super().get(id=id, lazy=lazy, **kwargs))
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\exceptions.py”, line 306, in wrapped_f
raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabGetError: 404: 404 Project Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\builder\builder.py”, line 1380, in onPavloviaRun
pavlovia_ui.syncProject(parent=self, project=self.project)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\pavlovia_ui\project.py”, line 743, in syncProject
if not project.localRoot or not Path(project.localRoot).is_dir():
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py”, line 746, in localRoot
if self.project.path_with_namespace in knownProjects:
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py”, line 666, in project
raise KeyError(f"Could not find GitLab project with id {self.id}.")
KeyError: ‘Could not find GitLab project with id 248653.’

Seeing as you have a project ID to query, it must have been able to get information from Pavlovia, but for some reason it’s not able to find the same project via GitLab… This might be to do with what user you’re logged in as - the http session which requests are sent to Pavlovia by may be logged in but the GitLab session isn’t, or is logged in as the wrong user.

Do you often switch between multiple Pavlovia accounts on the PC you’re syncing from, or have you ever changed your username on Pavlovia?

Actually, I have only one account, so, no, I don’t switch between multiple accounts. Furthermore, it’s not even possible to log in to Pavlovia in
the PsychoPy app.

You should be able to log in to Pavlovia via the Pavlovia User dialog, which opens when you click this button: :pavlovia_user:

It is now possible to view the account on Pavlovia, however I can only upload the experiment via Gitlab, which unsurprisingly does not work either, even though the experiment was successfully uploaded to Gitlab. But actually I should upload the experiment via PsychoPy and not via Gitlab to Pavlovia, or am I wrong?

Ideally it’s best to upload the experiment via the PsychoPy app, but ultimately Pavlovia is GitLab-based so uploading via GitLab should also work, provided you’re uploading to a project which exists in Pavlovia. When you say it doesn’t work, what do you mean? Does it not appear in Pavlovia, or does it error when you try to run it? If the latter, what errors do you get?

I was now able to upload the experiment to both GitLab and Pavlovia. However, the status remains “inactive” despite several attempts to set it to “piloting”. Is this normal or is there a network error or something similar? In other tutorials, the status of the experiment changed relatively rapidly, even when the information “the status is changing, this may be a few minutes…” is displayed.