Re: Issue 9 in freetype-py: freetype.ft_errors.FT_Exception: FT_Exception: (cannot open resource)

426 views
Skip to first unread message

freet...@googlecode.com

unread,
Dec 3, 2012, 1:58:50 PM12/3/12
to Nicolas...@inria.fr

Comment #3 on issue 9 by Ekkehard...@gmail.com:
freetype.ft_errors.FT_Exception: FT_Exception: (cannot open resource)
http://code.google.com/p/freetype-py/issues/detail?id=9

Hmmm

I just downloaded freetype-py-0.3.3, built and installed it without
problems, and was running into the same issue (I don't get the Exception
Attribute Error though). But unfortunately, I am not as knowledgeable as
the OP, since I could not make it go away :-(

$ python test.py
Traceback (most recent call last):
File "test.py", line 15, in <module>
face = Face('./Vera.ttf')
File "/usr/local/lib/python2.7/dist-packages/freetype/__init__.py", line
989, in __init__
if error: raise FT_Exception( error )
freetype.ft_errors.FT_Exception: FT_Exception: (cannot open resource)
$

I also didn't understand why step 2. of the OP was needed. Would
freetype-py not find the library where it resides (which in my case would
be in /usr/lib/x86_64-linux-gnu)? At any rate, my results are the same
with or without that symlink to the library in /usr/local/lib.

BTW, the program for which I installed freetype-py in the first place
(upconverter) is running into the same issue, albeit with
face = freetype.Face('./arial.ttf')
which I though would be a more common font and should not be missing (if
that is the issue at all).

I am running an out-of-the-box Kubuntu 12.04 w/ kernel 3.2.0-34-generic on
a 64 bit machine with 6 AMD Phenom cores. I have installed: python 2.7.3
(also python 3.2.3 as "python3") and libfreetype version 2.4.8-ubuntu2,
which came pre-installed with the distro.


freet...@googlecode.com

unread,
Dec 3, 2012, 2:16:14 PM12/3/12
to Nicolas...@inria.fr

Comment #4 on issue 9 by Nicolas...@gmail.com:
freetype.ft_errors.FT_Exception: FT_Exception: (cannot open resource)
http://code.google.com/p/freetype-py/issues/detail?id=9

The test did not find the "Vera.ttf" that is expected to be in the same
directory. Do you have it in your running directory ?

Also, you might want to open a new issue if it doesn't work.

freet...@googlecode.com

unread,
Dec 3, 2012, 2:38:34 PM12/3/12
to Nicolas...@inria.fr

Comment #5 on issue 9 by Ekkehard...@gmail.com:
freetype.ft_errors.FT_Exception: FT_Exception: (cannot open resource)
http://code.google.com/p/freetype-py/issues/detail?id=9

Thanks Nicolas!!

in that case it is indeed a packaging issue - the file "Vera.ttf" isn't in
the examples directory after extracting the zip file - only a bunch of .py
files are there.

I'll open a new issue.

Reply all
Reply to author
Forward
0 new messages