AttributeError: 'NoneType' object has no attribute 'replace'

Hello all,
I am very new to PsychoPy and so I am very green to building and coding experiments in PsychoPy. I am trying to create a series of demographic questions in PsychoPy, however, my experiment keeps crashing after participants have typed their age (using the free response) and used the mouse to press a continue button. The error is the following:

Traceback (most recent call last):
File “/Users/paigekemp/Desktop/UNCG/UNCG Research/Current Experiments/OtherRaceEffect/”, line 482, in
File “/Applications/”, line 542, in reset
self.text = self.startText
File “/Applications/”, line 32, in set
newValue = self.func(obj, value)
File “/Applications/”, line 293, in text
File “/Applications/”, line 302, in _layout
text = text.replace(’’, codes[‘ITAL_START’])
AttributeError: ‘NoneType’ object has no attribute ‘replace’

Experiment ended.

The code for this project along with the experiment file can be located on github: GitHub - PaigeKemp/Face-Project

Any help will be greatly appreciated!

1 Like

Hello, I have corrected this issue.

If you enter a single space in the text field of the text box beta response.


1 Like