Replies: 1 comment 1 reply
-
That error means your |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
When trying to use the attribute grid (more specifically its get_cell_list_contents function) of the model used in the init method of an agent, python said that this attribute does not exist. The error is :
AttributeError: 'Pred_Agent' object has no attribute 'grid'
and the code :
animals_in_cell = self.model.grid.get_cell_list_contents([self.pos])
used in a function define in the Agent. This function is called by the step() function of the same Agent.
Can you help me so i can use this function in my modelisation ?
To note : the code provided is from the tutorial found at :
https://mesa.readthedocs.io/en/main/tutorials/intro_tutorial.html
Beta Was this translation helpful? Give feedback.
All reactions