![]() Resources (spreadsheets, images, etc.) should be in the same folder as the psyexp file or a sub-folder. Resources that are selected via code components should be added via Experiment Settings / Online / Additional Resources (see how to Configure the online settings of your experiment) or a Resource Manager Component. Psychopy loop type random no repeat how to# Running the latest version of your experiment ¶ See Resources in online studies for more information. When you synchronise changes to your experiment, you may need to clear your browser cache to see those changes online (using Ctrl-F5, Ctrl-Shift-R or equivalent). If this does not work use an incognito browser tab. A participant will not need to do this, so long as they have not already tried a previous version of your experiment. Use Developer Tools (Ctl-Shift-I in Windows/Chrome, Cmd-Opt-J or Cmd-Opt-I in Mac/Chrome, F12 in IE/Edge, Ctrl-Shift-J in Windows/Safari, Ctrl-Opt-J in Mac/Safari) to view errors via the browser console if you aren’t getting sufficient information from PsychoPy. You can also add print(X) (which translates to console.log(X) where X refers to the name of your variable) to check the value of a variable X at a particular point. Tutorial tutorial_js_console_log Types of Errors ¶Įrrors in your experiment can manifest in multiple ways. The easiest way to categorise the different types of error message is based on where they appear. Python Syntax Errors (seen in Auto-translate code components) ¶įig. 11 A code component used in PsychoPy Builder. In this example, “Code Type” is set to “Auto > JS” meaning python code (on the left) will transpile to JavaScript (on the right). In this example there is a python coding error, which means the transpilation cannot occur. One of the advantages of using auto translate code components is that the transpiler is continuously checking your code in order to translate it to JavaScript. If you have a syntax error in your Python code, the JavaScript translation will be /* Syntax Error: Fix Python code */. ![]() If you get this type of error then your Python code probably won’t run locally, and no translated code will be added to the JavaScript version. ![]() Psychopy loop type random no repeat code# “Old style” string formatting (using a % operator) works in Python but gives a syntax error in JavaScript but string interpolation (f-strings) is fine. Synchronisation Errors (seen in the PsychoPy Runner Stdout) ¶įig.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |