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

Hi!
Description of the problem:
v2021.1.1

When running the experiment (with slider) on my desktop it works fine, but when syncing it to Pavlovia I get the following errors.

I tried syncing my experiment without a slider to Pavlovia and that worked fine, so it seems to be the slider that is causing the error. Is there something I can do to prevent this error?

  • TypeError: this._style.forEach is not a function
core-2021.1.1.js:1924 TypeError: this._style.forEach is not a function
    at Slider._sanitizeAttributes (visual-2021.1.1.js:1728)
    at new Slider (visual-2021.1.1.js:1546)
    at Scheduler.experimentInit [as _currentTask] (ACLTAB.js:168)
    at Scheduler._runNextTasks (util-2021.1.1.js:1560)
    at Scheduler._runNextTasks (util-2021.1.1.js:1564)
    at update (util-2021.1.1.js:1514)
window.onerror @ core-2021.1.1.js:1924
FATAL unknown | {}log4javascript.min.js:1 

Might it have something to do with the style options that appear to have changed?

1 Like

I’ve made a fix and a quick release. Could you try 2021.1.2 and see if that fixes it for you? Sorry but, yes, I think it is to do with the styles changing a little (it wasn’t clear which styles can be used together and which are mutually exclusive)

1 Like

Thank you so much! I am trying it now. Could it be that there is only a 32 bit 1.2 version and no 64 bit on github?

Thank you, the 2021.1.2 version works! However, the red part in the (radio) slider seems to have completely disappeared. So when (in the running experiment) I am clicking a ‘radio button’ / circle on the slider, I see no red at all. Or am I doing something wrong?

The (correct) 64 bit version is uploaded now

1 Like

Regarding the missing marker, could you send a link to your study for me to take a look? Styles have changed so maybe something in that went wrong

https://run.pavlovia.org/Anouk/acltab/

Thanks. Looking into it

Hi @Anouk, sounds like you have hit a bug with PsychoJS. Would it be possible to give me developer access so I can investigate some more? Here to help, thanks, s.

Hi @sotiri , thank you so much! I just did, will you let me know if you have access now?

The size of the dots in the slide (Radio) also do not appear to update when I’m syncing changes on to Pavlovia. :frowning:

1 Like

OK great, thanks for giving me access, no problem, on it :blush:

1 Like

Hello! I stumbled upon the same bug. Is there a solution for this yet, or should I go back to an older version of Psychopy? Thank you in advance!

1 Like

Hi all,

I went back to an older version (2020.2.10) and for that the sliders do appear (on Pavlovia), but the text position is inconsistent within trials of the experiment, while the settings are the same for all trials.

image

Is there something I can do to avoid this?

hi @sotiri
Did you find anything?

Hi @Anouk, sorry, the first issue I have no answer for yet, but you should be able to get slider labels to position correctly by creating a custom code component and pasting the following snippet in the Before Experiment tab as in the edited .psyexp below:

visual.Slider.prototype._updateIfNeeded = function() {
  if (!this._needUpdate) {
    return;
  }
  this._needUpdate = false;
  this._estimateBoundingBox();
  this._setupSlider();
  this._updateMarker();
  this._pixi.scale.x = 1;
  this._pixi.scale.y = -1;
  this._pixi.rotation = this._ori * Math.PI / 180;
  this._pixi.position = this._getPosition_px();
  this._pixi.alpha = this._opacity;
}

ACLTAB.psyexp (17.1 KB)

1 Like

Thank you! Will this work too for the 2020.2.10 version which I went back to?

No problem, yes it should, but do please let me know if not, x

Sorry I didn’t notice this at the time (the title was about 2021). I use experimentInit() at the end of the first routine to reset all the sliders

What exactly does experimentInit(); do?

I used it in some code component and noticed that some data was not getting saved because of it.

Would you recommend ONLY using experimentInit(); at the end of the very first routine in the experiment?

experimentInit(); seems to restart the experiment in terms of running Begin Experiment code components, but allows you to continue where you left off. I think that it is only therefore safe to use at the end of an initial routine which has Begin Experiment code but nothing of consequence in Begin Routine / Each Frame / End Routine. I found that when my first routine saved whether the participant was using a touchscreen or not (in Each Frame / End Routine), I lost that setting.

1 Like