Skip to content

Docs: fire.ipynb and pathfinding.ipynb fail at build time (ModuleNotFoundError: datashader) #3427

@Melissari1997

Description

@Melissari1997

Problem

Two user-guide notebooks render with visible ModuleNotFoundError tracebacks on the live docs site:

Page Error
Fire ModuleNotFoundError: No module named 'datashader' in cell [1]; every subsequent cell fails with NameError
Pathfinding Same ModuleNotFoundError: No module named 'datashader' in cell [1]; every subsequent cell fails with NameError

The other six notebook-based user-guide pages (classification, focal, multispectral, proximity, surface, zonal) build without errors.

Root cause

Both fire.ipynb and pathfinding.ipynb import datashader in their first cell, but datashader is not installed in the ReadTheDocs build environment.

In setup.cfg, datashader is listed only under the examples extra:

[options.extras_require]
examples =
    datashader >= 0.15.0

The .readthedocs.yaml installs '.[doc,tests]' in the pre_build step, which does not include datashader:

build:
  jobs:
    pre_build:
      - pip install '.[doc,tests]'

Additionally, docs/source/conf.py has nbsphinx_allow_errors = True, which lets the build succeed but renders the error tracebacks in the published HTML.

Suggested fix

Add datashader to the doc extra in setup.cfg so it is installed whenever the docs are built:

[options.extras_require]
doc =
    datashader >= 0.15.0
    dask[dataframe]
    geopandas
    ...

Alternatively (or additionally), update .readthedocs.yaml to install the examples extra:

build:
  jobs:
    pre_build:
      - pip install '.[doc,tests,examples]'

The first approach is preferable because it keeps the docs self-contained — anyone running pip install xarray-spatial[doc] locally will get a working build without needing to know about the examples extra.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions