Audit: Mesa-examples compatibility with Mesa 3.x — tracking issue
- Dominant language
- Python
- Stars
- 252
- Forks
- 279
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 2
Description
## Summary
This issue tracks the compatibility of all mesa-examples with Mesa 3.x.
Each example has been manually tested.
The goal is to:
1. Identify every broken example and WHY it is broken
2. Fix each one with a separate PR
---
## Error types found so far
| Type | Error message | Root cause |
|------|--------------|------------|
| A | `AttributeError: module 'mesa' has no attribute 'visualization'` | Uses removed Mesa 2.x API (`CanvasGrid`, `ModularServer`, `ChartModule`) |
| B | `ValueError: Unknown space type: NoneType` | Space not initialized correctly for Mesa 3.x |
| C | `ImportError: attempted relative import with no known parent package` | Relative imports break when running with `solara run` directly |
---
## Examples checklist
### examples/
- [ ] `aco_tsp` — ✅ Working
- [ ] `bank_reserves` — status: ?
- [ ] `boltzmann_wealth_model_network` — status: ?
- [ ] `caching_and_replay` — ❌ BROKEN — Type A (`AttributeError: module 'mesa' has no attribute 'visualization'`)
- [ ] `color_patches` — status: ?
- [ ] `conways_game_of_life_fast` — ❌ BROKEN — Type B (`ValueError: Unknown space type: NoneType`)
- [ ] `deffuant_weisbuch` — status: ?
- [ ] `dining_philosophers` — status: ?
- [ ] `el_farol` — status: ?
- [ ] `emperor_dilemma` — status: ?
- [ ] `forest_fire` — status: ?
- [ ] `hex_ant` — ❌ BROKEN — Type C (`ImportError: attempted relative import with no known parent package`)
- [ ] `hotelling_law` — status: ?
- [ ] `humanitarian_aid_distribution` — status: ?
- [ ] `rumor_mill` — status: ?
- [ ] `virus_antibody` — status: ?
- [ ] `warehouse` — status: ?
- [ ] `termites` — status: ?
### gis/
- [ ] `geo_schelling` — status: ?
- [ ] `geo_schelling_points` — status: ?
- [ ] `geo_sir` — status: ?
- [ ] `agents_and_networks` — status: ?
- [ ] `rainfall` — status: ?
- [ ] `urban_growth` — status: ?
- [ ] `population` — status: ?
### rl/
- [ ] `boltzmann_money` — status: ?
- [ ] `epstein_civil_violence` — status: ?
- [ ] `wolf_sheep` — status: ?
---
## Progress
| Status | Count |
|--------|-------|
| ✅ Working | 1 |
| ❌ Broken | 3 |
| ❓ Not tested yet | 23 |
---
## Environment
- Mesa version: 3.5.0
- Python: 3.13
- OS: Ubuntu
- venv: activated
---
## Next steps
- [ ] Finish testing all remaining examples
- [ ] Update this checklist with results
- [ ] Open individual fix PRs for each broken example
Contributor guide
Research direction
Start by running the untested examples under Mesa 3.5.0 with Python 3.13 in the activated Ubuntu virtual environment, using the checklist in this issue. Record each result and root cause there; any broken example should become a separate fix PR, with the checklist updated when testing is complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100