# Cannot sync psychopy builder with Pavlovia

**URL:** <https://discourse.psychopy.org/t/cannot-sync-psychopy-builder-with-pavlovia/18410>\
**Category:** Online experiments\
**Created:** [November 25, 2020, 10:03am UTC](https://discourse.psychopy.org/t/cannot-sync-psychopy-builder-with-pavlovia/18410 "2020-11-25T10:03:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmahesan](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@dmahesan](https://discourse.psychopy.org/u/dmahesan)\
**Post date:** [November 25, 2020, 10:03am UTC](https://discourse.psychopy.org/t/cannot-sync-psychopy-builder-with-pavlovia/18410/1 "2020-11-25T10:03:33Z")

</div>

Description of the problem:

I have programmed my experiment using psychopy builder. When I try to sync it with Pavlovia I get the following error:  
Traceback (most recent call last):  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1221, in onPavloviaSync  
self.fileExport(htmlPath=htmlPath)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 719, in fileExport  
target=“PsychoJS”)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 73, in generateScript  
compileScript(infile=exp, version=None, outfile=filename)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 242, in compileScript  
\_makeTarget(thisExp, outfile, targetOutput)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 214, in \_makeTarget  
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\_experiment.py”, line 251, in writeScript  
self\_copy.\_currentRoutine.writeRoutineBeginCodeJS(script, modular)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\routine.py”, line 277, in writeRoutineBeginCodeJS  
thisCompon.writeRoutineStartCodeJS(buff)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components\_base.py”, line 202, in writeRoutineStartCodeJS  
self.writeParamUpdatesJS(buff, ‘set every repeat’)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components\_base.py”, line 405, in writeParamUpdatesJS  
target=“PsychoJS”)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components\_base.py”, line 399, in writeParamUpdates  
target=target)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components\_base.py”, line 435, in writeParamUpdate  
valStr = str(val).strip()  
TypeError: **str** returned non-string (type NoneType)

Could someone please help me with the problem?  
Thank you!

---

<div class="post-metadata">

**Author:** ![Hatice\_Dedetas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/hatice_dedetas/32/13316_2.png) [@Hatice\_Dedetas](https://discourse.psychopy.org/u/Hatice_Dedetas)\
**Post date:** [January 8, 2021, 12:35pm UTC](https://discourse.psychopy.org/t/cannot-sync-psychopy-builder-with-pavlovia/18410/2 "2021-01-08T12:35:28Z")

</div>

Hi!  
I encounter the same problem as well. Could you solve the problem? I appreciate the help a lot.

---

<div class="post-metadata">

**Author:** ![Hatice\_Dedetas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/hatice_dedetas/32/13316_2.png) [@Hatice\_Dedetas](https://discourse.psychopy.org/u/Hatice_Dedetas)\
**Post date:** [January 8, 2021, 1:21pm UTC](https://discourse.psychopy.org/t/cannot-sync-psychopy-builder-with-pavlovia/18410/3 "2021-01-08T13:21:44Z")

</div>

I updated PsychoPy version and it gave the same error but this time specified it.  
In Psychopy, while referring a code in a component, we use . We should only put one at the beginning. My mistake was using it twice as $testlist2[countertest2] to call the word from the list. However, the second created the problem. The problem is fixed when I deleted it as $testlist2[countertest2].

Hope it will help others in need!
