Hi everyone,
I’m trying to use the Form component in PsychoPy Builder (Windows version, PsychoPy 2024.X) to collect participant data at the beginning of the experiment. I’ve created an Excel file (formulario.xlsx) with the following columns:
itemTextitemWidthtyperesponseWidthlayoutoptions
Each row defines a question with type = choice and valid semicolon-separated options (e.g., "Masculino;Femenino;Otro"). I’ve selected Data Format: rows in the component settings.
However, when I run the experiment, I get this error:
27.6498 WARNING Could not get image from: https://secure.gravatar.com/avatar/c2cf9ccb5b19ff711fde863b7291148f?s=80&d=identicon, using blank image instead.
728.4273 INFO Loaded monitor calibration from ['2025_05_14 19:59']
728.5286 INFO Loaded monitor calibration from ['2025_05_14 19:59']
C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\slider.py:549: RuntimeWarning: invalid value encountered in divide
delta = magDelta / (ticks[-1] - ticks[0])
Traceback (most recent call last):
File "C:\Users\acost\Documents\Psychopy\Prueba1_lastrun.py", line 1203, in <module>
run(
File "C:\Users\acost\Documents\Psychopy\Prueba1_lastrun.py", line 372, in run
form = visual.Form(win=win, name='form',
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\form.py", line 176, in __init__
self._createItemCtrls()
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\form.py", line 725, in _createItemCtrls
self._setResponse(item)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\form.py", line 458, in _setResponse
respCtrl, respHeight = self._makeSlider(item)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\form.py", line 554, in _makeSlider
resp = psychopy.visual.Slider(
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\contrib\lazy_import.py", line 118, in __call__
return obj(*args, **kwargs)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\slider.py", line 198, in __init__
self._createElements()
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\slider.py", line 446, in _createElements
self.tickLines = ElementArrayStim(
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\elementarray.py", line 154, in __init__
self.setXYs(xys, log=False)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\elementarray.py", line 269, in setXYs
setAttribute(self, 'xys', value, log, operation)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\tools\attributetools.py", line 140, in setAttribute
setattr(self, attrib, value)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\tools\attributetools.py", line 29, in __set__
newValue = self.func(obj, value)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\elementarray.py", line 260, in xys
self.__dict__['xys'] = self._makeNx2(value, ['Nx2'])
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\elementarray.py", line 195, in _makeNx2
raise ValueError(msg + str(acceptedInput))
ValueError: New value should be one of these: ['Nx2']
9.3338 WARNING launchHubServer: If using the iohub mouse or eyetracker devices, fullScr should be True.
2.6003 WARNING Monitor specification not found. Creating a temporary one...
ioHub Server Process Completed With Code: 0
################ Experiment ended with exit code 1 [pid:22352] #################
It seems to be related to a Slider element being created, even though I’m only using type = choice in my form.
What could be causing this? Is there a known issue with the Form component or something else I might be missing? This is my Excel file:
formulario.xlsx (9.9 KB)
Thanks in advance!