googlefonts / pyfontaine

Python tool to check font files for language/character set support
https://github.com/googlefonts/pyfontaine
GNU General Public License v3.0
104 stars 20 forks source link

OSX - Pyfontaine IOError: #31

Closed vernnobile closed 10 years ago

vernnobile commented 10 years ago

sorry :) osx 10.9.2. python 2.7.6 (via homebrew)

vernons-MacBook-Pro:pyfontaine vern$ pyfontaine --xml ~/gitHub/commeFont/version-1.0/Comme-Thin.ttf 
Traceback (most recent call last):
  File "/usr/local/bin/pyfontaine", line 5, in <module>
    pkg_resources.run_script('fontaine==1.1.3', 'pyfontaine')
  File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 488, in run_script
    ns['__name__'] = name
  File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 1354, in run_script
    def _extract_resource(self, manager, zip_path):
  File "/usr/local/lib/python2.7/site-packages/fontaine-1.1.3-py2.7.egg/EGG-INFO/scripts/pyfontaine", line 112, in <module>
    main()
  File "/usr/local/lib/python2.7/site-packages/fontaine-1.1.3-py2.7.egg/EGG-INFO/scripts/pyfontaine", line 98, in main
    tree = director.construct_tree(fonts)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fontaine-1.1.3-py2.7.egg/fontaine/builder.py", line 126, in construct_tree
    in font.get_orthographies():
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fontaine-1.1.3-py2.7.egg/fontaine/font.py", line 173, in get_orthographies
    for charmap in library.charmaps:
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fontaine-1.1.3-py2.7.egg/fontaine/cmap.py", line 39, in charmaps
    for charmap_klass in module.Extension.get_charmaps():
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fontaine-1.1.3-py2.7.egg/fontaine/ext/extensis.py", line 18, in __getcharmaps__
    for ext in Extension.get_codepoints():
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fontaine-1.1.3-py2.7.egg/fontaine/ext/extensis.py", line 42, in get_codepoints
    xml_content = open(os.path.join(os.path.dirname(__file__), 'languages.xml'), 'r').read()
IOError: [Errno 2] No such file or directory: '/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fontaine-1.1.3-py2.7.egg/fontaine/ext/languages.xml'
vitalyvolkov commented 10 years ago

Did you try to update pyfontaine from github repo? Now it is version 1.1.4 and available from pypi repo too.

vernnobile commented 10 years ago

:+1: That worked. Pulled the latest sources and followed install.md. Now working for me :)