PsychoPy unhandled internal error - invalid_grant

OS: Win11
PsychoPy version: 2026.2.3
Standard Standalone Installation? y
URL of experiment: Pavlovia
Do you want it to also run locally? no
What are you trying to achieve?: sync project with Pavlovia

What did you try to make it work?: It had been working fine. I have successfully synced this project several times. This time, I got an invalid_grant internal error. In some googling, it seemed like an SSH key would help. I went through the process of making one of those and added it to my Pavlovia gitlab. I closed PsychoPy and re-opened, but the issue is continuing. I tried to log into Pavlovia in PsychoPy, but the same error shows up for that. I saw someone suggest trying it from a hotspot instead of through the university wifi. The same error message appears when I try connected via hotspot.

Link to the most relevant existing thread you have found: Cannot log in to Pavlovia from PsychoPy

What specifically went wrong when you tried that?:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy_app\builder\builder.py”, line 1654, in onPavloviaSync
self.fileExport(htmlPath=htmlPath)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy_app\builder\builder.py”, line 942, in fileExport
self.app.showCoder(fileList=[exportPath])
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy_app_psychopyApp.py”, line 871, in showCoder
self.coder.fileOpen(filename=file)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy_app\coder\coder.py”, line 2373, in fileOpen
self.setCurrentDoc(filename)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy_app\coder\coder.py”, line 2347, in setCurrentDoc
self.project = pavlovia.getProject(self.currentDoc.filename)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py”, line 1593, in getProject
session = getCurrentSession()
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py”, line 1707, in getCurrentSession
_existingSession.doRefreshToken()
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py”, line 526, in doRefreshToken
raise gitlab.GitlabAuthenticationError(
gitlab.exceptions.GitlabAuthenticationError: invalid_grant: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.

I was able to solve this. I went into AppData/Roaming/PsychoPy3 on my computer and deleted the pavlovia folder. I was then able to re-log in to Pavlovia in PsychoPy and successfully sync.