A few general questions I am hoping people can help me out with…
- The crib sheet that is going around suggests that anyone using the most up-to-date version of Psychopy V2020.1.3 should get rid of some general python code and replace it manually with JS code…
for example, (take straight from the crib sheet)
thisExp —> thisExp=psychoJS.experiment;
There are many of these. My question is, why is it that if I use ONLY the builder (and I add no code of my own), I can export the HTML code and upload this to Pavlovia without an issue (I have tried this with a simple experiment and it worked perfectly). That suggests that the ‘thisExp’ code that is written in Python is successfully translated into JS…is that correct?
If so, why should someone change these at all? It clearly can run with that code…
-
If I set my Code Type to “Both”…I see the code that I originally wrote on the left, and the translated code on the right. Can I edit the code on the right manually and have those changes saved, and then export to HTML?
-
If I am unable to get my HTML to export (it does not show ‘successful’ ever), does that suggest that I have an error in the code and need to change my code in a way that it will compile in JS?
If yes, how do I find the error in the code? I see quite a few places where people are suggesting that you use the web browsers JavaScript compiler, but I am very unfamiliar with that. Is there a way one can tell what the errors are more easily? Or more information on how to read those errors?