Any field that is prefixed with $ and contains python specific code will break once the project is exported as HTML, because that field will not be translated. This is easily reproduced by giving a text stimulus python specific code like len([0,1]) and trying to run the study on Pavlovia. The error I get is ReferenceError: len is not defined.
I'm not so sure on how the translation process is structured, but this would be a nice thing to have. I work around the issue by setting those fields to a variable that I declare and set earlier in the routine (the code component then being translated as needed). This is on the latest release v2020.2.2
Any field that is prefixed with $ and contains python specific code will break once the project is exported as HTML, because that field will not be translated. This is easily reproduced by giving a text stimulus python specific code like
len([0,1])and trying to run the study on Pavlovia. The error I get isReferenceError: len is not defined.I'm not so sure on how the translation process is structured, but this would be a nice thing to have. I work around the issue by setting those fields to a variable that I declare and set earlier in the routine (the code component then being translated as needed). This is on the latest release v2020.2.2