DigitalGlobe / gbdxtools

(Deprecated) Python SDK for using GBDX
MIT License
74 stars 57 forks source link

TypeError: 'int' object is not iterable #797

Closed drwelby closed 4 years ago

drwelby commented 4 years ago

Core of this error is:

File "/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/gbdxtools/images/meta.py", line 65, in __new__
    self = da.Array.__new__(cls, *dm.values)
  File "/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/dask/array/core.py", line 971, in __new__
    self._chunks = normalize_chunks(chunks, shape, dtype=dt)
  File "/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/dask/array/core.py", line 2342, in normalize_chunks
    return tuple(tuple(int(x) if not math.isnan(x) else x for x in c) for c in chunks)
  File "/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/dask/array/core.py", line 2342, in <genexpr>
    return tuple(tuple(int(x) if not math.isnan(x) else x for x in c) for c in chunks)
TypeError: 'int' object is not iterable

After discussion with Dask team at https://github.com/dask/dask/issues/5023 we've determined that GBDXtools is sending chunks in a format that is not compatible with Dask > 2.0.

This is fixed in the upcoming GBDXtools 0.17.0.

Users of GBDXtools 0.16.x should downgrade Dask to 1.X versions.