mesa / mesa/mesa-examples

Error when running the Urban Growth Model

Open
#121 1 comment 0 reactions 0 assignees View on GitHub
gis
Dominant language
Python
Stars
252
Forks
279
Avg merge
8d 9h
Merged PRs (30d)
2

Description

When I try to run the scripts in Jupyter Notebook for the Urban Growth Model, I get an error having to do with the UrbanCell class--see the screenshot:
![UrbanGrowthError](https://github.com/projectmesa/mesa-examples/assets/53237071/0aaf8b5c-3e24-4063-a6b7-e6088ec16d4f)

I ran the space.py text first in Jupyter; then when I tried to import parts of the model script, and %run UrbanGrowthSpace.ipynb, it threw an error. Is this because the class name shares a name with one of the attributes?

![UrbanCell](https://github.com/projectmesa/mesa-examples/assets/53237071/74e93d1d-cd7d-468e-8bf0-7021afdbcec7)

I really appreciate any help you can provide. Sorry if this is confusing.

Contributor guide

Open the contributing guide

Research direction

Start by running space.py and then UrbanGrowthSpace.ipynb in Jupyter, capturing the full traceback rather than relying on the screenshots. Inspect the UrbanCell class and the model script around the failing import or execution; the issue is done when the Urban Growth Model notebook runs without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.