Issues with Radio-style slider in Pavlovia v2021.1.1?

Thank you!

Does this mean that the slider allignment + experimentInit(); code should NOT be in the same routine as the Javscript code (code_JS) from your cribsheet?

So might it be safest/recommended to make a separate routine at the very beginning, including one code component with ONLY the slider allignment [in before experiment] + experimentInit(); [in end of routine] code and only in the routine áfter that you enter the code_JS code [in begin experiment]?

edit: with slider allignment I mean the piece of slider label position code as discussed in sotiri’s post

code_JS runs code in Begin Experiment which will be re-run after Experiment Init, so that is fine, as is a simple text component and keyboard response to continue. The slider alignment code should be fine there too.

1 Like

Hello Jon, thank you for your reply. I am also having trouble with the same error when I upload my experiment with sliders to Pavlovia. Although I am using the updated version of PsychoPy 2021.1.4 and the experiment works well locally but when uploaded it gave the type error online:

  • TypeError: this._style.forEach is not a function

core-2021.1.4.js:1923 TypeError: this._style.forEach is not a function
at Slider._sanitizeAttributes (visual-2021.1.4.js:1728)
at new Slider (visual-2021.1.4.js:1546)
at Scheduler._currentTask (lbt_0057.js:218)
at Scheduler._runNextTasks (util-2021.1.4.js:1560)
at Scheduler._runNextTasks (util-2021.1.4.js:1564)
at Scheduler._runNextTasks (util-2021.1.4.js:1564)
at update (util-2021.1.4.js:1514)
window.onerror @ core-2021.1.4.js:1923
log4javascript.min.js:1 FATAL unknown | {}
BrowserConsoleAppender.append @ log4javascript.min.js:1

I don’t use the forEach function in my code components but I do have the a slider that goes through the condition loops.
Any pointers will be appreciated.
Thank you!