Description of the problem:
I am using a demo of a Corsi task. When running online it says that nextSwitch is not defined. Python was not translated to JS automatically ( and I have no clue how to do it). I used online resources to check the python syntax and they didn’t find any problem. However, an online JS translator found an issue with for in line 16.
Sorry I am having trouble replicating this error - the demo seems to run ok for me. Is it the case that the error occurs when you click and run this link? corsi [PsychoPy] if so what operating system and browser are you using?
It looks like the code component in your version is “Auto->JS” wherar the code type in the demo is “Both” with different code typed both sides. The syntax error occurs because the python used here does not transpile automatically, so custom JS was used on the right hand side in the demo.
An experiment folder should have one psyexp file, but may also have a py file, two js files, plus spreadsheets and any other resources (some of which may be in sub folders). You shouldn’t be able to see “routines” when viewing a folder. They are contained within the experiment and viewable in Builder.