Textbox works, but experiment crashes when moving on to the next routine

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

OS (e.g. Win10): Mac Mojave
PsychoPy version (e.g. 1.84.x): v2020.2.1
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?:
I am trying to more or less keep the visual angle constant across my participants. I created a routine, ‘Vis_ang’, where participants can check the length of the line and the length they are away from the screen. Participants can fill in their measures and they get feedback. This works fine. However, when I try to move on to the next routine, the experiment stops running and gives the following error:

Traceback (most recent call last):
File “/Users/edekorte/Documents/PsychoPy/Oldness_Module2/Oldness_Module2_lastrun.py”, line 1427, in
Line_box.reset()
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/visual/textbox2/textbox2.py”, line 545, in reset
self.win.addEditable(self)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/visual/window.py”, line 954, in addEditable
self.currentEditable = editable
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/visual/window.py”, line 925, in currentEditable
lastEditable = self.currentEditable
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/visual/window.py”, line 912, in currentEditable
objectRef = self._editableChildren[ii] # extract the weak reference
IndexError: list index out of range

Experiment ended.

Also, when I try to run my experiment online, this routine is skipped altogether. This doesn’t happen when I disable the textbox components. Similarly, when I turn off the Editable option, my experiment proceeds normally.

I am not sure what is happening and where I might have done something wrong. I have attached a file with the visual angle routine (Vis_ang) and the instructions that should follow afterwards.

Let me know. Thanks in advance.

Ellen Visual_Angle.psyexp (28.9 KB)

Hi There,

This is indeed a bug and I have now raised this as an issue on github BUG: crash following input to two editable textbox components · Issue #3490 · psychopy/psychopy · GitHub

For now a fix could be to have two routines - the first where your participant enters line length the second viewing distance (one editable textbox per routine).

Hope this helps,
Becca

1 Like

Hi Becca,

Sorry, the slow reply. Thank you, for your suggestions and I will check whether it works.

Kind regards,

Ellen