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

AttributeError: module 'dask.dataframe.core' has no attribute 'DataFrame' #1388

Closed
jakenotjay opened this issue Jan 20, 2025 · 0 comments · Fixed by #1390
Closed

AttributeError: module 'dask.dataframe.core' has no attribute 'DataFrame' #1388

jakenotjay opened this issue Jan 20, 2025 · 0 comments · Fixed by #1390

Comments

@jakenotjay
Copy link

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc should be added within the dropdown below.)

Software Version Info
dask==2025.1.0
datashader>=0.15.0
xarray-spatial==0.4.0
Python 3.11.9

Description of expected behavior and the observed behavior

On startup of datashader (imported via xarray using the slope method), an attribute error shouldn't occur.

On import an attribute error occurs, due to the use of removed attribute.

Temp solution is to pin the dask requirement to 2024.12.1

Complete, minimal, self-contained example code that reproduces the issue

from xrspatial import slope            
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../venv/lib/python3.11/site-packages/xrspatial/__init__.py", line 1, in <module>
    from xrspatial.aspect import aspect  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../venv/lib/python3.11/site-packages/xrspatial/aspect.py", line 10, in <module>
    from xrspatial.utils import ArrayTypeFunctionMapping, cuda_args, ngjit, not_implemented_func
  File ".../venv/lib/python3.11/site-packages/xrspatial/utils.py", line 4, in <module>
    import datashader as ds
  File "...i/venv/lib/python3.11/site-packages/datashader/__init__.py", line 14, in <module>
    from . import data_libraries                             # noqa (API import)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../venv/lib/python3.11/site-packages/datashader/data_libraries/__init__.py", line 5, in <module>
    from . import dask    # noqa (API import)
    ^^^^^^^^^^^^^^^^^^
  File "...i/venv/lib/python3.11/site-packages/datashader/data_libraries/dask.py", line 55, in <module>
    bypixel.pipeline.register(dd.core.DataFrame)(dask_pipeline)
                              ^^^^^^^^^^^^^^^^^
AttributeError: module 'dask.dataframe.core' has no attribute 'DataFrame'

Relevant issues

dask/dask#11678

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

Successfully merging a pull request may close this issue.

1 participant