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

Download: Handle zip files (instead of tar.gz) #6

Open
codeswhite opened this issue Jan 14, 2021 · 0 comments
Open

Download: Handle zip files (instead of tar.gz) #6

codeswhite opened this issue Jan 14, 2021 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@codeswhite
Copy link
Owner

For example when downloading entry #2 from the default downloads list it gives an error:

Enter number > 2
[+] Downloading & ungzipping 'afrikaans/afr_dbf.zip'
Traceback (most recent call last):
  File "/home/maxon/.local/bin/stargen", line 8, in <module>
    sys.exit(main())
  File "/home/maxon/.local/lib/python3.9/site-packages/stargen/__main__.py", line 15, in main
    Stargen(parse_args())
  File "/home/maxon/.local/lib/python3.9/site-packages/stargen/stargen.py", line 97, in __init__
    menu.get(cmd)[0](args)
  File "/home/maxon/.local/lib/python3.9/site-packages/stargen/modules/download.py", line 273, in download
    gzip.decompress(web.read()))
  File "/usr/lib/python3.9/gzip.py", line 556, in decompress
    return f.read()
  File "/usr/lib/python3.9/gzip.py", line 300, in read
    return self._buffer.read(size)
  File "/usr/lib/python3.9/gzip.py", line 487, in read
    if not self._read_gzip_header():
  File "/usr/lib/python3.9/gzip.py", line 435, in _read_gzip_header
    raise BadGzipFile('Not a gzipped file (%r)' % magic)
gzip.BadGzipFile: Not a gzipped file (b'PK')
@codeswhite codeswhite assigned codeswhite and unassigned codeswhite Jan 14, 2021
@codeswhite codeswhite added bug Something isn't working good first issue Good for newcomers labels Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant