| Reference | Downloads | Github

Importing textbox raises error

Hello everyone,

I’m using the standalone version of Psychopy 1.90.3 with Python 3 on Win10 and when I run the demo, I get the error which I appended at the bottom of this post.

The issue has already been raised by @Sam_Leak for an earlier version of Psychopy (Using TextBox instead of TextStim), but there were no suggestions on how to fix it.

FreeType import Failed: Freetype library not found
Traceback (most recent call last):
  File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\psychopy\demos\coder\stimuli\textBoxStim\", line 25, in <module>
    from psychopy.visual import textbox
  File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\psychopy\visual\textbox\", line 59, in <module>
    fm = getFontManager()
  File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\psychopy\visual\textbox\", line 56, in getFontManager
    _system_font_manager = FontManager(mono_only)
  File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\psychopy\visual\textbox\", line 77, in __init__
  File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\psychopy\visual\textbox\", line 244, in updateFontInfo
    self.addFontFiles(fonts_found, monospace_only)
  File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\psychopy\visual\textbox\", line 151, in addFontFiles
    face = Face(fp)
NameError: name 'Face' is not defined

Hi @LukasPsy, to fix you will have to update your psychopy to a more recent version, e.g., current release 3.0.12. The demo works on the latest version I am using.

Thank you for the tip, @dvbridges. I thought Psychopy 3.0 is still a beta version. That is why I was cautious about switching. Would you say that by now, I might encounter less bugs in 3.0.12 than in 1.90.3?

Yes definitely, many bugs have been fixed since 1.90.3. Although officially it is still in beta stages and therefore will be categorised as less stable than 1.90.3. You could alternatively look at using the TextStim component in 1.90.3.

1 Like