When creating TextBox stim, it is impossible to set its units=‘pix’, as it instantly raises an error “AttributeError: ‘NoneType’ object has no attribute ‘_free’”. However, pixels are needed in order to place these boxes into specific position around the screen. What’s a workaround here?
Code example:
square=visual.TextBox(
window=win,
text=“This textbox looks most like a textstim.”,
font_size=18,
font_color=[-1,-1,1],
color_space=‘rgb’,
size=(1.8,.1),
units=‘pix’)
Although I don’t get an error, if I use ‘pix’ on win10 the textbox is not displayed, so I think there might be a bug there. In the meantime, if you need ‘pix’ units can you try using the TextBox2 stim instead of TextBox?