| Reference | Downloads | Github demo not working

The demo no longer seems to work. The problem seems to be that getFontManager is no longer defined in, ( did it get accidentally deleted?

The error I get from running the demo is

File “/Applications/”, line 112, in getattribute
return getattr(obj, attr)
AttributeError: type object ‘TextBox’ has no attribute ‘getFontManager’

I was looking at the demo because I am trying to draw individual letters very fast. I’m guessing that TextStim is always faster than TextBox for this? Thanks for any advice.


Hi Alex,

// .getFontManager() is defined in the textbox rather than . //

Try adding this import:

from psychopy.visual import textbox

and then access the font manager like this:

fm = textbox.getFontManager()

Looks like this demo might have fallen foul of some reorganisation of psychopy.visual that happened a while back.

Have made a pull request to fix this but perhaps someone who understands the visual importing better than me could do better?

1 Like