Sync Error: AttributeError: 'NoneType' object has no attribute 'project'

URL of experiment: https://pavlovia.org/run/t_s/24drb_erw3b

Description of the problem: While creating a new project on Pavlovia i get the following error message
“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’”

Once i click okay, it seems to sync the project and i can start it from Pavlovia. However, it only goes as far as the instructions and then the first stimulus, after which i get the following error message:
“ReferenceError: experiment is not defined”

If i open the console on chrome i see this as the last message
“ReferenceError: experiment is not defined
at Scheduler._currentTask (24drb_erw3b.js:2319)
at Scheduler._runNextTasks (util-2021.1.4.js:1560)
at Scheduler._runNextTasks (util-2021.1.4.js:1564)
at Scheduler._runNextTasks (util-2021.1.4.js:1564)
at update (util-2021.1.4.js:1514)”

I have tried the fixes mentioned on some of the other threads like deleting the project and creating it again, and cleaning out the preferences. I also checked the custom code in the experiment, and as far as i can tell it is alright, i.e. i have used some of the code in previous experiments, whcih worked perfectly well. Additionally, the program complies both js and python scripts offline without any error messages.

I would really appreciate any help. Thank you for reading :slight_smile:

Have you also tried removing the .git folder in your experiment folder?

thanks for your reply.
yes. when i deleted the experiment from pavlovia, i also deleted the .git folder and other associated files (the ‘.gitgnore’ and the html file as well), before i re-uploaded the project on pavlovia

Strange! Could you share your gitlab repo? My username is tpronk, see this page for a little guide. Searching for experiments on Pavlovia — PsychoPy v2021.1

done!
really appreciate your help :slight_smile:

1 Like

I forked your experiment to my account, then synced it up with my device, made a trivial change, and committed that to Pavlovia. All went without problems. I’m afraid I can’t reproduce the problem, but I’ve got two suggestions for workarounds:

  • I’ve heard of cases where uninstalling and reinstalling PsychoPy solved it. Maybe try that?
  • I made you a maintainer of my fork. You could consider searching for my fork, and syncing that to a new folder on your hard drive. If working with that one doesn’t cause any issues, then maybe just do it like that?

thanks for the suggestions. unfortunately none of them worked. Uninstalling and re-installing PsychoPy did not work. I also tried to pilot your forked version, and got the same error.
I then made a simple experiment (consisting of an instruction disply and 1 stimulus display with some code) to test whether the problem was experiment specific or something more general.
I got exactly the same error while trying to upload it to Pavlovia!

Edit: i also tried running the experiment from a different machine (windows 10) withe the same Version of Pavlovia newly installed (2021.1.4), but it gives me the same error

Then I’m not really sure how to fix it. I just recategorized your post to builder in order to see if experts in that area could help us out.

Thanks for the help! .
I uninstalled PsychoPy, emptied the cache and all temporary files, re-installed, and built the experiment again. And just tried it again just now, and it works!
So i think something to do with completely removing any temporary files or so!

Happy it’s solved. Good luck with your study!