intake / intake/intake-astro

ImportError: Compatibility w/recent dask?

Open
#9 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I got an exception on this line:

https://github.com/intake/intake-astro/blob/master/intake_astro/array.py#L52

```python
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/scratch/local/45915091/ipykernel_32764/2861514433.py in
1 img_ = FITSArraySource("file.fits", ext=1)
----> 2 img = img_.to_dask()
3 img

/blue/adamginsburg/adamginsburg/repos/intake-astro/intake_astro/array.py in to_dask(self)
101
102 def to_dask(self):
--> 103 self._get_schema()
104 return self.arr
105

/blue/adamginsburg/adamginsburg/repos/intake-astro/intake_astro/array.py in _get_schema(self)
50
51 def _get_schema(self):
---> 52 from dask.bytes import open_files
53 import dask.array as da
54 from dask.base import tokenize

ImportError: cannot import name 'open_files' from 'dask.bytes' (/blue/adamginsburg/adamginsburg/repos/dask/dask/bytes/__init__.py)
```

Has the `open_files` function been renamed?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at intake_astro/array.py line 52 and follow FITSArraySource.to_dask() through _get_schema(). Check the supported dask API for open_files and verify the compatibility issue using the traceback scenario. Done means the import no longer raises for the reported use case and to_dask() completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.