AttributeError when creating new Pavlovia project from Builder

OS: Ubuntu 21.10
PsychoPy version: 2022.1.1.

Hello everyone!

I’ve tried to create a new project in Gitlab/Pavlovia by opening Builder (being logged in on Pavlovia), clicking → New.

It fails and gives the following message:

Traceback (most recent call last):
File “/home/flavio/.local/lib/python3.9/site-packages/psychopy/app/pavlovia_ui/”, line 127, in onNew
if pavlovia.getCurrentSession().user.username:
AttributeError: ‘User’ object has no attribute ‘username’

Apparently, it has happened before, but the solution employed back there does not work with Psychopy 2022.1.1.

Runner gives me this warning (but I don’t know if it is related to the problem or not):

WARNING Couldn’t connect to

@thomas_pronk has filled this issue on github.
He is having the same problem I am, but with a different OS (Windows 10).

I’m happy to run some tests if anyone could point me to a direction :wink:



Does this also happen if you create a new project by either syncing for the first time or opening the :pavlovia_info: Info dialog and clicking New there?

Hi @TParsons!

When I try via “Sync”, Builder asks for the file name, asks if I want to create this as a new project and then crashes (i.e. all windows close).
Clicking the Info_dialog_icon, instantaneously crashes Builder :grimacing:

This might sound an obvious try (but it is one I have missed before) - are you sure you are logged into pavlovia in the psychopy application itself? (asking as it can’t find username)

Hi @Becca!

According to Builder, (unless I’m missing something) I should be.
Please, see the print below:

Is there something I’m missing?

1 Like

That looks good to me! (was worth a shot) In that case this is definitely @TParsons ball park as it looks like something to do with the new pavlovia user interface

I am having the same issue with the same error:

AttributeError: 'User' object has no attribute 'username'

The error occurs simply when i try to create a new project on Pavlovia. Really need to have this resolved ASAP. Anyone have any luck with finding a solution?

I got it to work.

  • I deleted the appData.cfg file in the C:\Users\Name\AppData\Roaming\psychopy3\appData.cfg directory
  • Deleted the .gitignore in the experiment folder
  • Deleted the .git folder in the experiment folder
  • Deleted the ~.js files in the experiment folder
  • Restarted Psychopy
  • Then, instead of>New… , i selected>Sync…

Hope this helps.

Hi @trevcaru!

I tried your workaround (except for deleting the “hidden” .git and .gitignore folders, which I didn’t have) but it didn’t work for me.

The only difference (via Sync) is that Builder shows the login dialog and wait until I insert my login and password before it crashes. Before, without deleting the appData.cfg file, Builder crashes without even showing the login dialog.

Nothing changes with respect to using → New

Any thoughts?

The only thing i can think of, is to try checking your firewall and allow for an exception for Psychopy.

I was prompted to allow Python through my firewall for some reason after installing the newest version of Psychopy.

I don’t have a firewall…
But thanks anyway :slight_smile:

I think there might be some dead references left over from the failed attempts previously, try going to the pavlovia folder in the same folder as the appConfig file and opening projects.json - this is essentially a dict of projects which PsychoPy knows about. If you find the name of your old project and delete the entry for it, are you then able to sync via the sync button (not the menu item)?

Hi @TParsons!

Unfortunately, the file projects.json is empty (there’s no entry, just {} inside it).
If you have any other ideas, I’ll be glad to test them :slight_smile: