Page 1 of 5

Bugs: UnicodeDecodeError: invalid continuation byte

Posted: November 7th, 2015, 6:03 am
by Chura
Hi,

Tried 0.8b1, love the Glitter interface :)
but:
1. I had a lot of problems on the HTTP, Half the time when I log in to GUI i get failed to connect, while I see behind that SAB still alive.
Once I do refresh or something, can't point my finger on it, I see HTTP error.
2015-11-06 05:37:00,102::ERROR::[_cplogging:216] [06/Nov/2015:05:37:00] HTTP
Traceback (most recent call last):
File "cherrypy\_cprequest.pyo", line 670, in respond
File "cherrypy\lib\encoding.pyo", line 217, in __call__
File "cherrypy\_cpdispatch.pyo", line 61, in __call__
File "sabnzbd\interface.pyo", line 433, in api
File "sabnzbd\api.pyo", line 100, in api_handler
File "sabnzbd\api.pyo", line 152, in _api_queue
File "sabnzbd\api.pyo", line 268, in _api_queue_default
File "sabnzbd\api.pyo", line 959, in report
File "json\__init__.pyo", line 243, in dumps
File "json\encoder.pyo", line 207, in encode
File "json\encoder.pyo", line 270, in iterencode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 6: invalid continuation byte

2. I was happy to find PushBullet on the 0.8, however I having some problems
first, When I ticked "error, warning" I couldn't un-tick them (I did, saved and they are back.)
I finally did it on the INI file.
second, even that error and warning are off, I keep getting notification of the first issue, and its non-stop notification. I had to block the pushbullet from my Android notification to get it back alive.

Thanks for the great work!
P.s, went back to latest stable, the HTTP error won me.

Re: Bugs

Posted: November 7th, 2015, 8:35 am
by safihre
Interesting, we have seen this bug before but have a hard time to track it down which characters are causing the problem.
Did you use beta 1 in a different language than English? Which one?
Did you have anything in the queue or history with special characters (different languages). Did you possibly have the NZB backup folder enabled so you could tell us which NZB's you had in queue/history at that time?

Your Puahbullet problem is probably solved in Beta2, we're aware of it!

Re: Bugs

Posted: November 7th, 2015, 1:18 pm
by Chura
Well, As for language, I'm on Windows 10 English, system is all english.
However I do have hebrew keyboard installed and the region is hebrew too (for currency, dates, time etc.)
I didn't have anything in queue for sure. and I'm not sure about history.
Can I export history somehow ?

Re: Bugs

Posted: November 8th, 2015, 7:51 am
by safihre
Oke it seems 0xe9 is é and the problem seems to be that it is trying to encode something that is in a wrong charset.
Shypike: http://stackoverflow.com/questions/5552 ... ation-byte
Maybe you know how to fix this?

Re: Bugs

Posted: November 8th, 2015, 4:53 pm
by Chura
Just searched my history for é. don't have anything.
actually my history is pure english only.

Re: Bugs

Posted: November 9th, 2015, 1:46 am
by shypike
The history is in a file called c:\Users\USER\AppData\Local\sabnzbd\admin\history1.db
If you don't mind us reading it, you can email it to [email protected] (please add the URL of this message).

Re: Bugs

Posted: November 11th, 2015, 5:39 pm
by Chura
Done

Re: Bugs

Posted: November 12th, 2015, 3:41 am
by shypike
Received, it's in my to do list now.

Re: Bugs: UnicodeDecodeError: invalid continuation byte

Posted: November 15th, 2015, 4:25 am
by firesale
Ah, very similar to my error.

Code: Select all

2015-11-15 10:18:35,130::INFO::[_cplogging:216] [15/Nov/2015:10:18:35] HTTP 
Request Headers:
  AUTHORIZATION: Basic d2F6YWJlZXM6TXlQNDU1dzByZA==
  COOKIE: plushContainerWidth=100%25; plushMultiOps=0; plushNoTopMenu=0; _pk_id.1.1fff=074b64205dc069e5.1434834166.106.1442248519.1442248202.; plushQueuePerPage=9999999; plushFailedOnly=0; plushHistPerPage=1
  HOST: localhost:8080
  CONNECTION: keep-alive
  Remote-Addr: 127.0.0.1
  ACCEPT: */*
  USER-AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
  X-REQUESTED-WITH: XMLHttpRequest
  ACCEPT-LANGUAGE: en-US,en;q=0.5
  DNT: 1
  REFERER: http://localhost:8080/
  ACCEPT-ENCODING: gzip, deflate
2015-11-15 10:18:35,131::ERROR::[_cplogging:216] [15/Nov/2015:10:18:35] HTTP 
Traceback (most recent call last):
  File "cherrypy\_cprequest.pyo", line 670, in respond
  File "cherrypy\lib\encoding.pyo", line 217, in __call__
  File "cherrypy\_cpdispatch.pyo", line 61, in __call__
  File "sabnzbd\interface.pyo", line 420, in tapi
  File "sabnzbd\api.pyo", line 100, in api_handler
  File "sabnzbd\api.pyo", line 152, in _api_queue
  File "sabnzbd\api.pyo", line 268, in _api_queue_default
  File "sabnzbd\api.pyo", line 959, in report
  File "json\__init__.pyo", line 243, in dumps
  File "json\encoder.pyo", line 207, in encode
  File "json\encoder.pyo", line 270, in iterencode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 7: invalid start byte
I posted about it here too. Sorry for not getting back to answering your follow-up question, shypike! :(

Re: Bugs: UnicodeDecodeError: invalid continuation byte

Posted: November 15th, 2015, 5:52 am
by safihre
Would you also be willing to send your history file to us? This seems to be a different character giving problems!
Seems the difference is that your problem is in the tapi while the topic starter has the issue in the api. What would be the difference Shypike?

Re: Bugs: UnicodeDecodeError: invalid continuation byte

Posted: November 15th, 2015, 7:29 am
by firesale
Would you also be willing to send your history file to us? This seems to be a different character giving problems!
Created a new history1.db file as well as a debug log. Sent to [email protected]. Hope this helps!

Re: Bugs: UnicodeDecodeError: invalid continuation byte

Posted: November 25th, 2015, 2:13 pm
by Chura
did you find anything ?
I'd really love to go back to 0.8b.

Re: Bugs: UnicodeDecodeError: invalid continuation byte

Posted: November 25th, 2015, 2:14 pm
by shypike
We cannot reproduce it and there's nothing bad in his history.db1 file either.
In Beta3 we're switching to a more recent version of Python.
That may crush this bug.

Re: Bugs: UnicodeDecodeError: invalid continuation byte

Posted: November 28th, 2015, 10:24 am
by firesale
shypike wrote:That may crush this bug.

Code: Select all

2015-11-28 16:14:31,915::DEBUG::[interface:431] API-call from 127.0.0.1 [Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0] {'output': u'json', 'apikey': u'...', 'limit': u'1', 'mode': u'history'}
2015-11-28 16:14:31,934::INFO::[_cplogging:216] [28/Nov/2015:16:14:31] HTTP 
Request Headers:
  Content-Length: 467
  PRAGMA: no-cache
  HOST: 127.0.0.1:8080
  CONNECTION: keep-alive
  CACHE-CONTROL: no-cache
  Remote-Addr: 127.0.0.1
  ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  USER-AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
  ACCEPT-LANGUAGE: en-US,en;q=0.5
  DNT: 1
  Content-Type: multipart/form-data; boundary=---------------------------2709977020641
  ACCEPT-ENCODING: gzip, deflate
2015-11-28 16:14:31,934::ERROR::[_cplogging:216] [28/Nov/2015:16:14:31] HTTP 
Traceback (most recent call last):
  File "cherrypy\_cprequest.pyo", line 670, in respond
  File "cherrypy\lib\encoding.pyo", line 217, in __call__
  File "cherrypy\_cpdispatch.pyo", line 61, in __call__
  File "sabnzbd\interface.pyo", line 436, in api
  File "sabnzbd\api.pyo", line 102, in api_handler
  File "sabnzbd\api.pyo", line 509, in _api_history
  File "sabnzbd\api.pyo", line 970, in report
  File "json\__init__.pyo", line 243, in dumps
  File "json\encoder.pyo", line 207, in encode
  File "json\encoder.pyo", line 270, in iterencode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 7: invalid start byte
Sorry, error is still present. Beta3 worked well for some time (24 hours or so) and then the error came back.

Re: Bugs: UnicodeDecodeError: invalid continuation byte

Posted: November 28th, 2015, 12:31 pm
by safihre
So after this happens, the interface stops updating? Or it just a one time error and then it works fine?