Skip to content
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

fs.get_all_families should continue if errors are occuring #2

Open
probonopd opened this issue Jul 18, 2019 · 0 comments
Open

fs.get_all_families should continue if errors are occuring #2

probonopd opened this issue Jul 18, 2019 · 0 comments

Comments

@probonopd
Copy link

probonopd commented Jul 18, 2019

I am trying to use fs.get_all_families(target_directory). It stops after a few downloaded fonts:

Python 3.7.3 (default, May 25 2019, 04:51:33) 
[GCC 7.3.0] on haiku1

fs = fontsquirrel.FontSquirrel()
fs.get_all_families("fontsdir/")

(...)
INFO:root:Downloading zip from http://www.fontsquirrel.com/fonts/download/After-Shok
INFO:root:Downloading zip from http://www.fontsquirrel.com/fonts/download/agane
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/boot/home/fontsquirrel_dl-master/fontsquirrel.py", line 198, in get_all_families
    zip_file.extract(filename, path=dest+url_name)
  File "/packages/python3-3.7.3-2/.self/lib/python3.7/zipfile.py", line 1599, in extract
    return self._extract_member(member, path, pwd)
  File "/packages/python3-3.7.3-2/.self/lib/python3.7/zipfile.py", line 1638, in _extract_member
    member = self.getinfo(member)
  File "/packages/python3-3.7.3-2/.self/lib/python3.7/zipfile.py", line 1395, in getinfo
    'There is no item named %r in the archive' % name)
KeyError: "There is no item named 'Aganè 45 (light).ttf' in the archive"

It should should continue if errors are occuring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant