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

**URL:** <https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222>\
**Category:** Builder\
**Created:** [May 26, 2021, 4:28pm UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222 "2021-05-26T16:28:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![t\_s](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@t\_s](https://discourse.psychopy.org/u/t_s)\
**Post date:** [May 26, 2021, 4:28pm UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/1 "2021-05-26T16:28:48Z")

</div>

URL of experiment: [https://pavlovia.org/run/t\_s/24drb\_erw3b](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 🙂

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [May 27, 2021, 8:14am UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/2 "2021-05-27T08:14:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![t\_s](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@t\_s](https://discourse.psychopy.org/u/t_s)\
**Post date:** [May 27, 2021, 8:19am UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/3 "2021-05-27T08:19:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [May 27, 2021, 12:37pm UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/4 "2021-05-27T12:37:12Z")

</div>

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](https://psychopy.org/online/sharingExperiments.html#adding-a-team-member)

---

<div class="post-metadata">

**Author:** ![t\_s](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@t\_s](https://discourse.psychopy.org/u/t_s)\
**Post date:** [May 27, 2021, 12:50pm UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/5 "2021-05-27T12:50:32Z")

</div>

done!  
really appreciate your help 🙂

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [May 28, 2021, 12:08pm UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/6 "2021-05-28T12:08:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![t\_s](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@t\_s](https://discourse.psychopy.org/u/t_s)\
**Post date:** [May 31, 2021, 9:54am UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/7 "2021-05-31T09:54:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [June 2, 2021, 9:57am UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/8 "2021-06-02T09:57:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![t\_s](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@t\_s](https://discourse.psychopy.org/u/t_s)\
**Post date:** [June 2, 2021, 10:50am UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/9 "2021-06-02T10:50:45Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [June 2, 2021, 10:52am UTC](https://discourse.psychopy.org/t/sync-error-attributeerror-nonetype-object-has-no-attribute-project/23222/10 "2021-06-02T10:52:04Z")

</div>

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