Open dybber opened 3 years ago
The problem is that the model no longer uses a dictionary-style for its local variables, but just assigns them directly as attributes.
To fix, change this line in print_infections
print("Total infections are " + str(model["infected"]))
to this
print("Total infections are " + str(model.infected))
This happens when running the current version of epidemic.py, and then closing the window. To replicate, just run
python epidemic.py
and close the window (also happens if setup have been pushed)