Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fields marked as code are not translated to JS #3064

Closed
ghost opened this issue Aug 11, 2020 · 0 comments
Closed

Fields marked as code are not translated to JS #3064

ghost opened this issue Aug 11, 2020 · 0 comments
Assignees

Comments

@ghost
Copy link

ghost commented Aug 11, 2020

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

@TEParsons TEParsons self-assigned this Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant