0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Questions and bug reports for Beta releases should be posted here.
Forum rules
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.
Post Reply
.maxx
Release Testers
Release Testers
Posts: 70
Joined: April 10th, 2008, 6:32 am

0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by .maxx »

Hi guys,

get this error since B1.
Do you know what it means?

I'm on OSX 10.11.2 with Python 2.7.2

Image
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by shypike »

No idea.
Have you tried the latest Beta?
Or does it happen with the latest too?
User avatar
safihre
Administrator
Administrator
Posts: 5537
Joined: April 30th, 2015, 7:35 am
Contact:

Re: 0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by safihre »

(see the title of the post, so Beta4 also)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by shypike »

OK, missed that.
Under which circumstances does it occur?
SABnzbd is mainly developed on OSX (recently El Capitan) and I have never seen this issue.
User avatar
sander
Release Testers
Release Testers
Posts: 9113
Joined: January 22nd, 2008, 2:22 pm

Re: 0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by sander »

FWIW: the error seems to producible from a RE in plain python, so that might be the cause in the wsgiserver2.py:

Good:

Code: Select all

>>> re.search("it", 'ditdat' )
<_sre.SRE_Match object at 0x7fbaaa8fe5e0>
Error:

Code: Select all

>>> re.search("it", ['ditdat'] )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/re.py", line 146, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or buffer
>>>
I can't match this against the cherrypy/wsgiserver/wsgiserver2.py, as read_request_line is in different lines than reported by the OP.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by shypike »

I can see that line 705 isn't 100% crash-proof.
I'll investigate some more and at the least make a patch that will make the symptom go away.
Too bad that I do not have a scenario that reproduces it.
@.maxx: are there any specific circumstances under which this occurs?
.maxx
Release Testers
Release Testers
Posts: 70
Joined: April 10th, 2008, 6:32 am

Re: 0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by .maxx »

@shypike

No I can't reproduce it. It occurs once a day.
Perhaps it is connected with the RSS feeds. I don't know.
nicheplayer
Newbie
Newbie
Posts: 10
Joined: March 14th, 2013, 9:19 pm

Re: 0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by nicheplayer »

I'm getting the same thing on 0.8.0Beta3 [0b6395f] with Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2], Debian Wheezy.

Code: Select all

ERROR 07/01/2016 12:52 [07/Jan/2016:12:52:41] ENGINE TypeError('expected string or buffer',)
Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/wsgiserver2.py", line 1358, in communicate
    req.parse_request()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/wsgiserver2.py", line 618, in parse_request
    success = self.read_request_line()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/wsgiserver2.py", line 705, in read_request_line
    atoms = [unquote(x) for x in quoted_slash.split(path)]
TypeError: expected string or buffer
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by shypike »

Will be fixed in the next release.
Any info about circumstances?
synogy
Newbie
Newbie
Posts: 6
Joined: June 21st, 2014, 3:00 pm

Re: 0.8.0 B4 ENGINE TypeError('expected string or buffer',)

Post by synogy »

Have the same issue occur. Noticed it happens and i lose connection to SAB. Then it comes back with that error.

Was downloading a about 11 nzbs from usenet-crawler on OSX el capitan (most recent non-beta).

Also noticed I get a "Failed to send pushbullet message" warning as well. will investigate settings for that issue though.
Post Reply