Textbox (Beta) edit function terminates experiment

Hi all,

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2020.2.10
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?:
The currently described routines are part of a larger experiment.
In a single routine, participants are asked to enter a number of words into a Textbox component then select a Text component linked to a Mouse component to proceed to a next routine containing a Text component.

What did you try to make it work?:
Used the components mentioned above with the Editable function on or off.

What specifically went wrong when you tried that?:
When the Editable function is ON the experiment does not progress onto the second described routine.
This problem does not happen when Editable is OFF.

Include pasted full error message if possible:
[deleted content]
Hello from the pygame community. https://www.pygame.org/contribute.html
1.0060 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
Traceback (most recent call last):
File “[deleted content]”, line 1440, in
recallWords.reset()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\textbox2\textbox2.py”, line 542, in reset
self.text = self.startText
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\tools\attributetools.py”, line 32, in set
newValue = self.func(obj, value)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\textbox2\textbox2.py”, line 293, in text
self._layout()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\textbox2\textbox2.py”, line 302, in _layout
text = text.replace(’’, codes[‘ITAL_START’])
AttributeError: ‘NoneType’ object has no attribute ‘replace’

Experiment ended.

Many thanks,
Artur

Update:
The problem occurs only when there is no default text included in the Textbox component.
When the default “Any text including line breaks” is deleted the component crashes in the previously described way.
This also happens in a clear version, without other components and routines.

Thanks,
Artur

Hi Artur,

If you enter a single space in the text field of the textbox that should fix the problem - is there a reason that this isn’t suitable for your experiments requirements?

Thanks,
Becca

1 Like

Hi Becca,

Thanks for the advise.
Single space works fine for me.

Cheers,
Artur