添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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] #################

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 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.

TParsons:

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.

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