Open pmartiner opened 3 years ago
Do you have a public repo containing your code that I can look at?
Sure thing! Here's the repo: https://github.com/pmartiner/cas-market-socialism
Found the bug: you forgot to add self.datacollector.collect(self)
at the end of the __init__
of EconomiaSocialista
It makes so much sense! I spent a lot of time checking what was wrong, yet I couldn't see it 😂. Thank you so much for taking your time to debug my bug. I really really appreciate it!
Wait, can you reopen the issue? I think it should be possible to detect whether a user forgets to add that datacollector.collect
thing. Maybe we should add a check in https://github.com/projectmesa/mesa/blob/bbf1b885ebe274e4b1eb269e30567a475e158aaf/mesa/visualization/ModularVisualization.py#L211. Any thoughts from others?
I thought it wasn't missing since I had it on my step method, and not on my __init__
, so that improvement would be incredibly helpful!
@rht I think that would be a good add.
On Fri, Apr 30, 2021 at 8:20 PM pmartiner @.***> wrote:
Reopened projectmesa/mesa-viz-tornado#25 https://github.com/projectmesa/mesa-viz-tornado/issues/25.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/projectmesa/mesa-viz-tornado/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABIWTUXYLDH3LSW2AN4CTDTLNJPBANCNFSM43XY24QA .
-- Jacqueline Kazil | @jackiekazil
Heads up. PR incoming from me.
Hi, everyone! I'm a newbie with mesa (and somewhat with Python as well) and I'm having difficulties trying to plot a Bar Chart of my agent reporter within my data collector. I thought this could be a good place to ask.
When running my server, I'm receiving the following error:
I thought this was a weird error, so I checked my DataFrame and I received the following:
As you can see, my Index is empty, but I don't know why.
Here's a small fragment of my model's code:
As you can see, my Index is empty, but I don't know why.
Here's a small fragment of my agent's code:
And here's my server's code:
The server works perfectly when I remove the BarChartModule.
I'm still trying to figure the error out, since, as far as I can see, my BarChartModule looks very similar to the one on the "charts" example. Does anyone know what's going on? Thanks!