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.
except Exception as e:
# could not add int, so reset
logging.warning("Non-int value in self.servercount[serverid]: %s", self.servercount[serverid])
self.servercount[serverid] = bytes
which implies I should be seeing log entries that say "Non-int value in ..." and I'm not seeing any such lines. Does that surprise you?
safihre has changed the code in a much better way (https://github.com/sabnzbd/sabnzbd/comm ... 27c7c36a27 specifcally https://github.com/sabnzbd/sabnzbd/comm ... cL775-R777 ), hopefully removing the root cause of your problem.
That means that with the next release, which you will receive via the Ubuntu jcfp PPA (so beta3, or anything higher than beta2), the problem should not occur anymore (and my workaround is not necesary anymore).
Google has led me here as I am having the same issue in version 3.1.1.
Happy to help debug. I notice the affected code has changed somewhat (notably, renaming the "bytes" variable to "bytes_received"
Current error:
Exception in thread Thread-1:
Traceback (most recent call last):
File "[DEFEATING_URL_DETECTION_REMOVED_PATH]threading[.]py", line 932, in _bootstrap_inner
self[.]run()
File "[DEFEATING_URL_DETECTION_REMOVED_PATH]downloader[.]py", line 637, in run
nzo[.]update_download_stats(BPSMeter[.]do[.]bps, server[.]id, bytes_received)
File "[DEFEATING_URL_DETECTION_REMOVED_PATH]nzbstuff[.]py", line 924, in update_download_stats
self.servercount[serverid] += bytes_received
TypeError: can't concat int to bytes
Based on the previous posts in this thread, I changed the code slightly:
try:
self.servercount[serverid] += bytes_received
except KeyError:
# Not yet known, so initialize:
self.servercount[serverid] = bytes_received
except Exception as e:
# could not add int, so reset
logging.warning("Non-int value in self.servercount[serverid]: %s", self.servercount[serverid])
self.servercount[serverid] = bytes_received
# if serverid in self.servercount:
# self.servercount[serverid] += bytes_received
# else:
# self.servercount[serverid] = bytes_received
This now produces the following warning:
Non-int value in self.servercount[serverid]: b'222'
sander wrote: ↑November 28th, 2020, 12:11 am
nice try-except and logging.
can you keep it runnning for some time, and post the logging.warning's here? Always the same, or ... ?
No other warnings. Tried restarting and executing a few downloads and never got another warning. So, just the one.
Without actually tracing the code, I guess when this set in the except block: self.servercount[serverid] = bytes_received, the corresponding value is eventually overwritten in a persistent file somewhere on disk. Thus the error doesn't occur again.