TypeError:TypeError: decoding Unicode is not supported

Hi Michael,

Thank you for your responses. I’ve tried it and it gives the following error (see below). I’m trying to change my code because my colleague is actually on mat leave and she wouldn’t come to the Lab to figure out such things. I’ve attached the function which I pasted in the screenshot, the only difference I think it should be the following (based on functions call in the routines below)

visual.TextStim.text = my_text_function

If I’m wrong I’ve tried also to put
visual.text.TextStim.text = my_text_function

as you suggested but it gives the same error. What do you think the error might be related to?

Thanks again,

Alena

File “C:\Users\NCIL User\Desktop\alena exp\from mac\Kid_LDT_ERP_V2.py”, line 200, in
win.flip()
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\window.py”, line 568, in flip
thisStim.draw()
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\text.py”, line 728, in draw
GL.glTranslatef(-self.width / 2, 0, 0)
AttributeError: ‘TextStim’ object has no attribute 'width’