Skip to content

DEM notebook fails in headless environments: pds4_tools.view() requires Tkinter GUI #95

Description

@jordanpadams

🐛 Describe the bug

DEM_MapVisualization.ipynb calls pds4_tools.view() which requires Tkinter (a GUI library). This fails in any headless environment (CI, servers, macOS without a display) with ModuleNotFoundError: No module named '_tkinter'.

🕵️ Expected behavior

Notebook visualizes the DEM data without requiring a GUI window.

📜 To Reproduce

  1. Install requirements-geo.txt
  2. Run notebooks/discipline/geo/DEM_MapVisualization.ipynb
  3. Cell calling pds4_tools.view(xml_urls[1][0]) raises ModuleNotFoundError: No module named '_tkinter'

⚙️ Fix

Replace the pds4_tools.view() GUI call with inline matplotlib rendering using pds4_tools.read() to load the data and then plot it directly. The viewer is convenient locally but incompatible with headless or CI execution.

🖥 Environment Info

  • pds4-tools~=1.4, Python 3.13.1, macOS headless via nbmake

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    ToDo
    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions