Form component not working

Hello,

I used the Form component. Unfortunately it is not working. After selecting boxes, it always switches to wrong boxes, the slider does not work neither properly.

Error code:

File “C:\Users\Max\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\visual\slider.py”, line 543, in _ratingToPos
magDelta = rating - ticks[0]
numpy.core._exceptions.UFuncTypeError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘<U3’), dtype(‘int32’)) → None
################# Experiment ended with exit code 1 [pid:6672] #################

Having the same issue - did you ever figure out the reason for this error?

No, got no answer here, so had to remove the component completely. Looks like it’s not working at all. Spend several days trying to figure it out.

I am suffering from the same error. Any suggestion? Thank you.

magDelta = rating - ticks[0]
numpy.core._exceptions.UFuncTypeError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘<U2’), dtype(‘int64’)) → None

I am getting the same error message. Does anyone have a solution to that?

I think I’ve found the cause of this - when a :slider: Slider’s style is “Radio”, it shouldn’t be given ticks as a parameter as ticks are already handled. It looks like :form: Form is supplying this anyway, meaning when it tries to work out the position of the dot on the Slider question it raises an error as it’s trying to do maths on a string.

I’ll attack this from two angles (both making sure Slider ignores any values given as ticks when its style is “radio”, and making sure Form doesn’t give it any values), in the meantime the best way around this is probably to use a rating style with granularity set to 1. It won’t look quite like a radio ctrl, but it will at least run without error.

Looks like this is also happening in slider with a radio button response v2023.2.3

When this will be fixed? Seems the error is still here.