Latest release, v1.0.0 running on Win10 - 64. Not sure what happened. I just happened to open the webui and saw the error.
ERROR DURING SCHEDULER EXECUTION dictionary changed size during iteration
Traceback (most recent call last):
File "sabnzbd\utils\kronos.pyo", line 305, in __call__
File "sabnzbd\utils\kronos.pyo", line 399, in execute
File "sabnzbd\bpsmeter.pyo", line 461, in midnight_action
File "sabnzbd\bpsmeter.pyo", line 449, in midnight
RuntimeError: dictionary changed size during iteration
Error Dictionary changed size during iteration.
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: Error Dictionary changed size during iteration.
What happens afterwards? Does SAB continue, or does SAB crash & stop?
The relevant code is:
The error comes from this line
I think that the for loop starts, and then some other process changes the dictionary length, and the for loop has a problem. If so, this is a race condition.
The error message is reproducible with
The relevant code is:
Code: Select all
def midnight(self):
""" Midnight action: dummy update for all servers """
for server in self.day_total:
self.update(server)
Code: Select all
for server in self.day_total:
The error message is reproducible with
Code: Select all
d = {'a': [1], 'b': [1], 'c': [3], 'd':[3333]}
for i in d:
print i
d.pop(i)
Code: Select all
Traceback (most recent call last):
File "python-dictionary-spelen.py", line 9, in <module>
for i in d:
RuntimeError: dictionary changed size during iteration
Re: Error Dictionary changed size during iteration.
Could be that servers are switched on or off during a bps cycle.
I'll have a closer look at this.
It must be a very rare error; the code has been like this for many years.
I'll have a closer look at this.
It must be a very rare error; the code has been like this for many years.
Re: Error Dictionary changed size during iteration.
It didn't seem to affect SABnzbd at all and it has kept working.
Re: Error Dictionary changed size during iteration.
It may have caused a crash of the BPS-meter which may have
(at least temporarily) disturbed the speedometer and the download statistics.
Nothing grave, but it should be fixed anyway.
(at least temporarily) disturbed the speedometer and the download statistics.
Nothing grave, but it should be fixed anyway.