Sabnzbd is crashing continually with the error "TypeError: can't concat int to bytes", but I can't post logs because filesystem paths apparently look like links (post keeps failing with the message "New users are not allowed to post links").
I might be able to send them to someone by PM.
Sabnzbd keeps crashing TypeError: can't concat int to bytes
Forum rules
Help us help you:
Help us help you:
- 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: Sabnzbd keeps crashing
which version of SAB exactly? 3.0.0 beta2 is out.
You can anything on Pastebin, en then post the URL (with spaces) here.
You can anything on Pastebin, en then post the URL (with spaces) here.
Re: Sabnzbd keeps crashing
That's a good suggestion!
Info is here: pastebin dot com slash Z8aV9yK2
Info is here: pastebin dot com slash Z8aV9yK2
Re: Sabnzbd keeps crashing
Based on your log on https://pastebin.com/Z8aV9yK2 this line is relevant:
I think you're running an older version of SABnzbd 3.0.0; the "None" was fixed one month ago, before Beta1 and Beta2
So ... update your SABnzbd 3.0.0 to Beta2 or the current git version.
EDIT: this was the commit I was referring to https://github.com/sabnzbd/sabnzbd/comm ... e4341e9584 ... 19 April, so you're running a very old version of SABnzbd 3.0.0: > 1.5 month old. Please update
EDIT 2: if you're on Ubuntu, make sure you're using the PPA ppa:jcfp/ppa (and not the temp for Ubuntu 18.04 that has not been updated after alpha1)
Code: Select all
[happyeyeballs:146] Quickest IP address for blah.com (port 563, ssl 1, preferipv6 True) is None
So ... update your SABnzbd 3.0.0 to Beta2 or the current git version.
EDIT: this was the commit I was referring to https://github.com/sabnzbd/sabnzbd/comm ... e4341e9584 ... 19 April, so you're running a very old version of SABnzbd 3.0.0: > 1.5 month old. Please update
EDIT 2: if you're on Ubuntu, make sure you're using the PPA ppa:jcfp/ppa (and not the temp for Ubuntu 18.04 that has not been updated after alpha1)
Re: Sabnzbd keeps crashing
I think I'm using PPA ppa:jcfp/ppa - I followed the instructions at https://sabnzbd.org/wiki/installation/i ... buntu-repo for the install.
I just did
Are those the correct commands?
Something I'm confused about. I used the nobeta repository and when I did the sudo apt-get update, the first two lines were:
I just did
in the shell and gotsudo apt-get update
sudo apt-get install sabnzbdplus
in response.sabnzbdplus is already the newest version (3.0.0~0git20200408+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
Are those the correct commands?
Something I'm confused about. I used the nobeta repository and when I did the sudo apt-get update, the first two lines were:
but I seem to have a beta version (3.0.0-develop) installed.Hit:1 http://ppa.launchpad.net/jcfp/nobetas/ubuntu focal InRelease
Hit:2 http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal InRelease
Re: Sabnzbd keeps crashing [version 3.0.0~0git20200408+dfsg-1]
Code: Select all
sabnzbdplus is already the newest version (3.0.0~0git20200408+dfsg-1).
This is what my Ubuntu has:
Code: Select all
sabnzbdplus is already the newest version (3.0.0~beta2-0ubuntu1~jcfp1~18.04).
Re: Sabnzbd keeps crashing
I uninstalled and installed 3.0.0~beta2-0ubuntu1~jcfp1~20.04 and it still crashes the same way.
It did change the log line as you mentioned:
It did change the log line as you mentioned:
The line numbers in the crash changed:[happyeyeballs:146] Quickest IP address for blah.com (port 563, ssl 1, preferipv6 True) is 67.67.67.67
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/share/sabnzbdplus/sabnzbd/downloader.py", line 594, in run
nzo.update_download_stats(BPSMeter.do.bps, server.id, bytes_received)
File "/usr/share/sabnzbdplus/sabnzbd/nzbstuff.py", line 775, in update_download_stats
self.servercount[serverid] += bytes
TypeError: can't concat int to bytes
Re: Sabnzbd keeps crashing
On http://127.0.0.1:8080/config/ what do you see at "Version:"?
Re: Sabnzbd keeps crashing
It says:On http://127.0.0.1:8080/config/ what do you see at "Version:"?
3.0.0Beta2 [faedd22]
Re: Sabnzbd keeps crashing: TypeError: can't concat int to bytes
OK, so SAB version is now OK & uptodate.
Back to your error:
Let's see with simple Python code:
and
and
So self.servercount[serverid] must be a byte value.
You're hiding the server you're using. Why is that?
Back to your error:
Code: Select all
self.servercount[serverid] += bytes
TypeError: can't concat int to bytes
Code: Select all
>>> b"dddd" + 3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't concat int to bytes
Code: Select all
>>> b"123" + 3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't concat int to bytes
Code: Select all
>>> a = b"123"
>>> a += 3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't concat int to bytes
You're hiding the server you're using. Why is that?
Code: Select all
To be complete: The other way around, you get a different error, so that is not the case
>>> a = 123
>>> a += b"456"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +=: 'int' and 'bytes'
Re: Sabnzbd keeps crashing
The problem might be in ~/.sabnzbd/admin/totals10.sab
So, can you do this:
Stop sabnzbd
mv ~/.sabnzbd/admin/totals10.sab ~/.sabnzbd/admin/totals10.sab.OLD
Start sabnzbd, and do a few downloads
So, can you do this:
Stop sabnzbd
mv ~/.sabnzbd/admin/totals10.sab ~/.sabnzbd/admin/totals10.sab.OLD
Start sabnzbd, and do a few downloads
Re: Sabnzbd keeps crashing TypeError: can't concat int to bytes
I'm not really, I just wasn't sure what I'm allowed to post here. There are two servers: news.newshosting.com and news.eweka.nlYou're hiding the server you're using. Why is that?
I tried your suggestion of deleting totals10.sab and it did not fix the problem, although it seemed like it survived a little longer than usual before dying. That could be my imagination though.
If it helps, I'm only interested in preserving my queue and configuration if possible. I'm game to try deleting anything else.
Re: Sabnzbd keeps crashing TypeError: can't concat int to bytes
OK, so no weird newsserver. Good
I have a detection & workaround & solution, which involves a few different lines in nzbstuff.py replacing https://github.com/sabnzbd/sabnzbd/blob ... #L774-L777
What do you want?
I can provide the new lines, which you have to put into that file. You must be aware of python formatting (correct spacing etc)
or
I can provide a complete nzbstuff.py which you then have to put in place of that whole file.
In both cases you must know how to become root.
PS: can you use basic git commands? So: "git clone" and "git checkout"?
I have a detection & workaround & solution, which involves a few different lines in nzbstuff.py replacing https://github.com/sabnzbd/sabnzbd/blob ... #L774-L777
What do you want?
I can provide the new lines, which you have to put into that file. You must be aware of python formatting (correct spacing etc)
or
I can provide a complete nzbstuff.py which you then have to put in place of that whole file.
In both cases you must know how to become root.
PS: can you use basic git commands? So: "git clone" and "git checkout"?
Re: Sabnzbd keeps crashing TypeError: can't concat int to bytes
I can handle editing the installed source. I also know how to use git, although I think I prefer just editing the installed source if the changes don't depend on other changes I don't have.
Re: Sabnzbd keeps crashing TypeError: can't concat int to bytes
OK, here we go:
in sabnzbd/nzbstuff.py
replace the https://github.com/sabnzbd/sabnzbd/blob ... #L774-L777
with
Make sure the spacing on the left is in line with other spacing.
in sabnzbd/nzbstuff.py
replace the https://github.com/sabnzbd/sabnzbd/blob ... #L774-L777
Code: Select all
if serverid in self.servercount:
self.servercount[serverid] += bytes
else:
self.servercount[serverid] = bytes
Code: Select all
try:
self.servercount[serverid] += bytes
except KeyError:
# Not yet known, so initialize:
self.servercount[serverid] = bytes
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