Overlaying Slider labels in loop not working

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win11):
PsychoPy version (e.g. 2024.2.4 ):
Standard Standalone Installation? (y/n) yes
Do you want it to also run online? (y/n) no
What are you trying to achieve?:
In a loop I want to ask questions where the labels of the slider change in every loop. But for some reason, the slider labels do not disappear after each loop but the last one remains in the next one, leading to overlaid text on the slider:

This is my task setup:

This shows the problem:

This is the code component I use to make the slider labels change in every loop:

What did you try to make it work?:
Try different psychopy versions. Trying to add some code lines in the code component to make it disappear (but I’m a too bad coder to make it work)

Hello @Ange

Why do you use code-component and the Builder to create a rating scale? You need no code-component.

Best wishes Jens

Hi Jens, thank you for pointing out.

When calling the labels in the slider directly:

I get the following error:
image

Still, something like this (placeholder as I only have the extreme values of the slider doesn’t work neither):

Hello @Ange

delete the $ from Labels $ $left_c,$right_c. Labels $ left_c,right_c worked for me.

Best wishes Jens

The thing is that I want the left and right label to change in every loop. that’s why I refer to the columns in the loop file.
The goal is not to have written ‘left’ and ‘right’ on the edges of the scales.

Hello @Ange

I assumed that left and right were variables that I defined in a Begin Experiment tab. I am afraid that the slider component does not allow the use of variable labels as the option to change the update frequency is greyed out. It is not possible to select ‘set each repeat’.

Best wishes Jens