Skip to content

Solara UI crashing while rendering Altair charts for certain Mesa Visualization examples #3046

@PrimalMentat15

Description

@PrimalMentat15

Describe the bug

When using Mesa’s Solara-based visualization stack with Altair charts fails to render for some of the examples. The Solara UI fails to load entirely and causes a crash.

  • So far i have only encountered this issue with only specific models, namely
  1. mesa/examples/basic/virus_on_network
  2. mesa/examples/basic/boltzmann_wealth_model
  3. mesa/examples/advanced/pd_grid
  4. mesa/examples/advanced/sugarscape_g1mt

Expected behavior

Altair charts should render correctly in Solara-based Mesa visualizations when following the standard Mesa development setup, without running into UI crashes.


To Reproduce

Environment (example):

  • Python: 3.11
  • Mesa: main branch (current)
  • Altair: 6.0.0 (currently being installed implicitly via pip install -e ".[dev]")
  • Solara: 1.30.0 (currently being installed implicitly via `pip install -e ".[dev]")

Steps:

  1. Clone the Mesa repository.

  2. Install dependencies using:

    pip install -e ".[dev]"
  3. Run any Mesa example model that uses Solara + Altair for visualization.

  4. Launch the Solara frontend (solara run ... or via the provided example runner).

  5. Observe that the Altair charts do not render and the UI crashes.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions