Skip to content

Dask diagnostics import error #1052

Description

@josenimo

Dear spatialdata devs,

somehow i am running into this silly thing from a fresh install with demo dataset.

Reproduce using the mouse data liver .zarr demo dataset 01_test.ipynb

Describe the bug
sdata['raw_image'] runs into ImportError:

ImportError: Daskdiagnosticsrequirementsarenotinstalled.
Pleaseeithercondaorpipinstallasfollows:
condainstalldask# either conda installpython-mpipinstall"dask[diagnostics]"--upgrade# or python -m pip install

! uv pip install "dask[diagnostics]" --upgrade and restarting kernel leads to:

---------------------------------------------------------------------------NotImplementedErrorTraceback (mostrecentcalllast)
CellIn[1], line1---->1importspatialdataassdFile~/Jose_BI/2_Infrastructure/PY08_SpatialData/.venv/lib/python3.13/site-packages/spatialdata/__init__.py:41importdask3dask.config.set({"dataframe.query-planning": False})
---->4importdask.dataframeasdd6# Setting `dataframe.query-planning` to False is effective only if run before `dask.dataframe` is initialized. In7# the case in which the user had initilized `dask.dataframe` before, we would have DASK_EXPER_ENABLED set to `True`.8# Here we check that this does not happen.9ifhasattr(dd, "DASK_EXPR_ENABLED") anddd.DASK_EXPR_ENABLED:
File~/Jose_BI/2_Infrastructure/PY08_SpatialData/.venv/lib/python3.13/site-packages/dask/dataframe/__init__.py:149raiseNotImplementedError("The legacy implementation is no longer supported")
11returnTrue--->14_dask_expr_enabled()
17importdask.array._array_expr._backends# Import this to register array dispatch19# Ensure that dtypes are registeredFile~/Jose_BI/2_Infrastructure/PY08_SpatialData/.venv/lib/python3.13/site-packages/dask/dataframe/__init__.py:9, in_dask_expr_enabled()
7use_dask_expr=dask.config.get("dataframe.query-planning")
8ifuse_dask_exprisFalse:
---->9raiseNotImplementedError("The legacy implementation is no longer supported")
11returnTrueNotImplementedError: Thelegacyimplementationisnolongersupported

To Reproduce

  1. fresh spatialdata install
  2. load .zarr demo data
  3. inspect raw_image

Expected behavior
normal inspection of raw image element

Screenshots
see notebook

Desktop (optional):

  • OS: macOS
  • Version 15.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions