New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add-font -- failing with OSError: [Errno 20] No such directory: u'encodings/' #89
Comments
it relies on having access to the nam files from the encodings directory on the project repo. I think this is a python packaging bug. Those files should be installed as resources and then the code should be updated to get them from the pip-installed resources instead of looking for it on the current working directory. |
These are the files it is looking or: |
This is where the default path for the files is declared: The flag to let the user change it might be useful in some cases, but the most common usage is certainly having a default value here. And this default is definitely wrong since it is a relative path that would only work when running the script from the git repo root dir. |
And here is where you get the crash because of that: https://github.com/googlefonts/gftools/blob/master/Lib/gftools/util/google_fonts.py#L324-L349 |
If anyone else comes across this while the problem still exists, here's how I was able to (partially) use this script:
It doesn't work perfectly (at least not yet), because it doesn't fill in info for all fields, even though other files are in place in the repo. For example, I get the result |
If you run add-font.py from the repo's parent dir, it will work. This is simply a path issue. Can't we move the encodings dir into the Lib dir so we can form an absolute path more easily? I can happily make a quick pr for this. |
This might just be a documentation issue or i'm missing something obvious, but I'm getting this error when trying to use add-font.py:
The text was updated successfully, but these errors were encountered: