Slider not working Pavlovia - TypeError: this._style.forEach is not a function

Hi,

I’m trying to implement a simple slider onto Pavlovia from Psychopy. However, while it works fine locally, when I try to run the experiment online it crashes immediately, with the following error:

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

This is particularly weird as I can’t find ‘this._style.forEach’ in the Python or JS code!

Any suggestions for how to fix this, or how to implement a slider in any way without this error, would be greatly appreciated! Thanks a lot :slight_smile:

Hi There,

What version of PsychoPy are you using and, if a recent version, do you have any special styling options used under the “appearance” tab?

Thanks,
Becca

Hi,

I’m using Psychopy3 (on a Windows laptop, in chrome browser). No, this happens even if I just put in a slider component and don’t alter it at all!

Thanks

Hi there, was this ever resolved? I am getting the same error and when I go into debug mode it shows this:

My slider is in ‘rating’ style with a coloured marker but no special styling options other than that. Any advice would be greatly appreciated! I’m using PsychoPy v2022.2.5 on a mac and get the error on both chrome and safari.

I had a hunch it may be the issues with sliders running online, so I edited my JS code for the slider in line with suggestions on the forum and I now don’t get this error. Leaving my comment up in case someone else finds the same and wonders what might solve the error.