I followed the basic tutorial for creating experiments with PsychoPy and then tried to convert the python code to a HTML + JS online experiment, following the instructions on the psychopy webpage. When I open the ‘index.html’ file, my Chrome browser gets stuck on “initializing the experiment”. Inspecting the console, I see the following messages:
“index.html:1 Access to script at ‘file:///C:/Users/path/to/psychopy/Stroop/html/stroopExperiment.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
stroopExperiment.js:1 Failed to load resource: net::ERR_FAILED
Tone.min.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
s.default.Context @ Tone.min.js:1
Tone.min.js:1 * Tone.js v13.8.6 *
Tone.min.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu”
(I’m running psychopy 3.2.4 on a machine running Windows 10, with a Chrome browser).