UnicodeDecodeError: 'ascii' codec

Report & discuss bugs found in SABnzbd
Forum rules
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.
Post Reply
leclercb
Newbie
Newbie
Posts: 2
Joined: November 24th, 2011, 3:58 pm

UnicodeDecodeError: 'ascii' codec

Post by leclercb »

Hi,

Since 0.6.10, I face this problem, previous versions were working well.

Version: 0.6.10
OS: OSX Lion 10.7.2
Install-type: OSX .app
Skin: Plush
IPV6: No
Is the issue reproducible? Yes, it happens on all my downloads, the post-processing always fails. I see the files in Complete folder (so the download is ok), but the NZB is not deleted and the files in Incomplete are not deleted too.
SabNzb keeps trying the reprocess the post-processing, so I quit SabNzb, then I delete the NZB and the files in Incomplete, and it's ok, but still annoying :)

Stacktrace:

2011-11-24 21:54:08,936::INFO::[notifier:86] Sending notification [4. On download terminated] to localhost:23053
2011-11-24 21:54:08,936::ERROR::[postproc:443] Echec du post-traitement pour 2101acs290 ()
2011-11-24 21:54:08,937::INFO::[postproc:445] Traceback:
Traceback (most recent call last):
File "sabnzbd/postproc.pyc", line 436, in process_job
File "sabnzbd/utils/osx.pyc", line 124, in sendGrowlMsg
File "gntp/notifier.pyc", line 102, in notify
File "gntp/notifier.pyc", line 128, in send
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 302: ordinal not in range(128)
2011-11-24 21:54:08,937::INFO::[notifier:86] Sending notification [4. On download terminated] to localhost:23053
2011-11-24 21:54:29,718::INFO::[__init__:949] Restarting because of crashed postprocessor
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: UnicodeDecodeError: 'ascii' codec

Post by sander »

Looks like the error message on http://docs.python.org/howto/unicode.ht ... icode-type which happens when non-USACII stuff is put into unicode()

So, as you download French stuff, and it error is in gntp, is there a non-USASCII charachter in your name, or directory, or system name, or ... ?

PS 1: yes, I would say the error message is a bug
PS 2: I don't know if the error message is the cause of the download/nzb problem
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: UnicodeDecodeError: 'ascii' codec

Post by sander »

PS 3:

I had a look at the source code: line 128 of gntp/notifier.py is:

"s.send(data.encode('utf-8', 'replace'))"

in the code below.

So my advice: set logging level to 'debug' (via http://localhost:8080/connections/ and then Latest Warning and then Logging"). Then the names used should be in your log file.

Code: Select all

        def send(self,type,data):
                '''
                Send the GNTP Packet
                '''
                #logger.debug('To : %s:%s <%s>\n%s',self.hostname,self.port,type,data)
                #Less verbose please
                logger.debug('To : %s:%s <%s>',self.hostname,self.port,type)

                s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                s.settimeout(1)
                s.connect((self.hostname,self.port))
                s.send(data.encode('utf-8', 'replace'))
                response = gntp.parse_gntp(s.recv(1024))
                s.close()

                #logger.debug('From : %s:%s <%s>\n%s',self.hostname,self.port,response.__class__,response)
                #Less verbose please
                logger.debug('From : %s:%s <%s>',self.hostname,self.port,response.__class__)
                return response
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: UnicodeDecodeError: 'ascii' codec

Post by shypike »

Already solved in release 0.6.11RC1.
See Announcements.
leclercb
Newbie
Newbie
Posts: 2
Joined: November 24th, 2011, 3:58 pm

Re: UnicodeDecodeError: 'ascii' codec

Post by leclercb »

Well, if it's already solved... :)
Thank you both for your help.
Post Reply