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

Python 2.7: gzip has no module decompress #44

Closed
mathbou opened this issue Aug 2, 2018 · 0 comments
Closed

Python 2.7: gzip has no module decompress #44

mathbou opened this issue Aug 2, 2018 · 0 comments

Comments

@mathbou
Copy link

mathbou commented Aug 2, 2018

Since the 0.7.2 update when I want to update the pigar database or search the misssing module via PyPI I get this error:

Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\pigar.exe\__main__.py", line 9, in <module>
  File "C:\Python27\Lib\site-packages\pigar\__main__.py", line 261, in main
    Main()
  File "C:\Python27\Lib\site-packages\pigar\__main__.py", line 35, in __init__
    self.generate_reqs(save_path, project_path, ignores)
  File "C:\Python27\Lib\site-packages\pigar\__main__.py", line 102, in generate_reqs
    gr.generate_reqs()
  File "C:\Python27\Lib\site-packages\pigar\__main__.py", line 148, in generate_reqs
    latest = check_latest_version(pkg)
  File "C:\Python27\Lib\site-packages\pigar\pypi.py", line 58, in check_latest_version
    version = extract_pkg_version(package)
  File "C:\Python27\Lib\site-packages\pigar\pypi.py", line 118, in extract_pkg_version
    data = _pkg_json_info(pkg_name)
  File "C:\Python27\Lib\site-packages\pigar\pypi.py", line 129, in _pkg_json_info
    data = download(PKG_INFO_URL.format(pkg_name))
  File "C:\Python27\Lib\site-packages\pigar\pypi.py", line 151, in download
    return try_unpack_resp(resp)
  File "C:\Python27\Lib\site-packages\pigar\unpack.py", line 128, in try_unpack_resp
    data = gzip.decompress(data)
AttributeError: 'module' object has no attribute 'decompress'

I use pigar with a python 2.7 environment and I checked the gzip doc, it does not have decompress yet, it was introduced in python 3.2.

damnever added a commit that referenced this issue Aug 12, 2018
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