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

after conda update to dask 0.9.0 get ImportError: cannot import name gzip_compress #1157

Closed
twiecki opened this issue May 12, 2016 · 8 comments

Comments

@twiecki
Copy link

twiecki commented May 12, 2016

Is there an additional package that's required?

@mrocklin
Copy link
Member

That's odd. Can you show the full stack trace and the code used to produce the error?

@twiecki
Copy link
Author

twiecki commented May 12, 2016

import dask.dataframe as dd
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-50-e012ff17e82a> in <module>()
----> 1 import dask.dataframe as dd

/opt/miniconda/lib/python2.7/site-packages/dask/dataframe/__init__.py in <module>()
     11                       rolling_window)
     12 from ..base import compute
---> 13 from .csv import read_csv
     14 from . import demo

/opt/miniconda/lib/python2.7/site-packages/dask/dataframe/csv.py in <module>()
     10 from .io import from_delayed
     11 
---> 12 from ..bytes import read_bytes
     13 from ..bytes.compression import seekable_files, files as cfiles
     14 

/opt/miniconda/lib/python2.7/site-packages/dask/bytes/__init__.py in <module>()
      1 from ..utils import ignoring
----> 2 from .core import read_bytes, open_files, open_text_files
      3 
      4 from . import local
      5 

/opt/miniconda/lib/python2.7/site-packages/dask/bytes/core.py in <module>()
      3 from toolz import merge
      4 
----> 5 from .compression import seekable_files, files as compress_files
      6 from .utils import SeekableFile
      7 from ..compatibility import PY2

/opt/miniconda/lib/python2.7/site-packages/dask/bytes/compression.py in <module>()
      5 from toolz import identity
      6 
----> 7 from ..compatibility import gzip_compress, gzip_decompress, GzipFile
      8 from ..utils import ignoring
      9 

ImportError: cannot import name gzip_compress

@mrocklin
Copy link
Member

Does this work for you:

In [1]: from dask.compatibility import gzip_compress

@twiecki
Copy link
Author

twiecki commented May 12, 2016

Ugh, restarting the kernel fixed it. Sorry for wasting your time.

@twiecki twiecki closed this as completed May 12, 2016
@mrocklin
Copy link
Member

No worries. In looking around for a solution I learned that we weren't doing future imports uniformly, resulting in #1158

@arita37
Copy link

arita37 commented Nov 2, 2016

Same issues, after installing dask.

  File "\Anaconda27\lib\site-packages\s3fs\core.py", line 23, in <module>
    trans.ReadTimeoutError, trans.IncompleteReadError

AttributeError: 'module' object has no attribute 'ReadTimeoutError'

@mrocklin
Copy link
Member

mrocklin commented Nov 2, 2016

@arita37 can you share

  1. How you installed dask
  2. Your python version
  3. The version of dask that you have (by pip freeze)
  4. The full traceback of the errors that you see?

@mrocklin mrocklin reopened this Nov 2, 2016
@jcrist
Copy link
Member

jcrist commented May 2, 2017

Closing for now as stale. Feel free to reopen if you still have issues (preferably with the requested information above).

@jcrist jcrist closed this as completed May 2, 2017
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

4 participants