'dictionary changed size during iteration' error in log_result
See original GitHub issueI frequently see following exception in logs:
2020-09-15 23:30:11 ERROR (simplemonitor) Caught unhandled exception during main loop
Traceback (most recent call last):
File "/root/monitor/simplemonitor/simplemonitor/simplemonitor.py", line 766, in run
self.run_loop()
File "/root/monitor/simplemonitor/simplemonitor/simplemonitor.py", line 735, in run_loop
self.do_alerts()
File "/root/monitor/simplemonitor/simplemonitor/simplemonitor.py", line 663, in do_alerts
self.do_alert(alerter)
File "/root/monitor/simplemonitor/simplemonitor/simplemonitor.py", line 583, in do_alert
for (name, monitor) in host_monitors.items():
RuntimeError: dictionary changed size during iteration
also
2020-09-16 00:52:54 ERROR (simplemonitor) exception while logging remote monitors
Traceback (most recent call last):
File "/root/monitor/simplemonitor/simplemonitor/simplemonitor.py", line 547, in log_result
for (name, monitor) in host_monitors.items():
RuntimeError: dictionary changed size during iteration
I haven’t yet investigated issue in depth, just leaving stack traces here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
dictionary changed size during iteration" error? - Stack Overflow
The Python "RuntimeError: dictionary changed size during iteration" occurs when we change the size of a dictionary when iterating over it. · To...
Read more >RuntimeError: dictionary changed size during iteration
The Python "RuntimeError: dictionary changed size during iteration" occurs when we change the size of a dictionary when iterating over it. To solve...
Read more >Filtering Dictionary In Python 3. “RuntimeError - codeburst
RuntimeError : Dictionary changed size during iteration”, Python slaps you in your face when you try to add/remove entries in dict object during...
Read more >Dictionary Changed Size During Iteration: Its Origins and Fixes
The dictionary changed size during iteration error occurs in inaccurate executions with iterating dictionaries. Click here to learn how to get rid of...
Read more >Runtimeerror: Dictionary Changed Size During Iteration
The runtimeerror: dictionary changed size during iteration occurs whenever you modify entries in a dictionary object during iteration.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I pulled this branch on my main machine and one of the machines behind NAT The other machine behind NAT uses an old version.
For now, looks OK to me, reports from both machines are visible. Thank you!
I’m happy to do it, I should have some time this weekend to look at it.