| Reference | Downloads | Github

Cannot open or edit the code component

OS Win10
PsychoPy v3.2.4
Standard Standalone? (y)

My college sent me her *.psyexp file as well as the condition folder. I can open it and run it normally without any problem. The problem is that when I try to open the code components in the program, it won’t open, and the other window opened along with the psychopy biulder shows this.

I tried to incert a new code component, and it’s ok to edit and open.

I also tried reinstall psychopy, still no use.

what can I do to check the codes?

@Yuzu233, it could be that your colleague is using a newer version of PsychoPy with the auto-JS translation, whereas your version does not. I think you will be able to edit your .psyexp file and change the saved code type to “Both”, which will be recognised by your version of PsychoPy.

To do this, first make a backup copy of your file. Then, open your .psyexp file in a text editor (it is an XML file), find the name of the code components causing the issue, and change the “Code Type” entry to “Both” -

<CodeComponent name="code_2">
   ... various
        <Param name="Code Type" updates="None" val="Both" valType="str"/>
   ... various
1 Like

Thanks a lot. I made sure that we use the same version of psychopy. So thinking that it might be the version problem, I reinstall it again but this time i install it in the C disk instead of D disk. and somehow it magically works.