"PostProcessing Crashed" => UnicodeDecodeError

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
meepmeep
Release Testers
Release Testers
Posts: 2
Joined: August 9th, 2009, 8:20 am

"PostProcessing Crashed" => UnicodeDecodeError

Post by meepmeep »

Hi

I just update my Sabnzbd to v0.5.4 on a synology NAS (DS409, using package from Merty).

On almost all downloads, I get this error on the web interface :
PostProcessing Crashed, see logfile

And on the log file :

Code: Select all

2010-09-24 19:56:45,237::INFO::[postproc:317] unpack_magic finished on Futurama - 6x05 - The Duh-Vinci Code
2010-09-24 19:56:45,241::INFO::[postproc:592] Removing unwanted file /volume1/Stockage/Series/test/Futurama/Season.6/_UNPACK_Futurama - 6x05 - The Duh-Vinci Code/aaf-futurama.s06e05.sfv
2010-09-24 19:56:45,249::INFO::[newsunpack:127] Running external script /volume1/Stockage/Sabnzbd/scripts/nfo.sh(/volume1/Stockage/Series/test/Futurama/Season.6, Futurama - 6x05 - The Duh-Vinci Code.nzb, Futurama - 6x05 - The Duh-Vinci Code, 5689686, tv, alt.binaries.multimedia, 0)
2010-09-24 19:56:47,440::INFO::[emailer:114] Notification e-mail succesfully sent
2010-09-24 19:56:47,442::ERROR::[postproc:437] Post Processing Failed for Futurama - 6x05 - The Duh-Vinci Code
2010-09-24 19:56:47,443::INFO::[postproc:440] Traceback: 
Traceback (most recent call last):
  File "/volume1/@appstore/sab2/SABnzbd-0.5.4/sabnzbd/postproc.py", line 418, in run
    nzo.set_unpack_info('Script','%s%s <a href="./scriptlog?name=%s">(%s)</a>' % (script_ret, script_line, urllib.quote(fname), T('link-more')), unique=True)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xdf in position 0: ordinal not in range(128)
2010-09-24 19:56:47,602::INFO::[postproc:466] Cleaning up Futurama - 6x05 - The Duh-Vinci Code
My nfo.sh :

Code: Select all

#!/bin/ash
cd "$1" && cat *.nfo
cd "$1" && chown -R user:users "$1"
I google the error message ": 'ascii' codec can't decode byte 0xdf in position 0: ordinal not in range(128)" and I get some message on utf8/ASCII incompatibility (the .nfo file is full of it) .. but i'm stuck on this (and no answer where related to sabnzbd)

Any idea for this ? 
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: "PostProcessing Crashed" => UnicodeDecodeError

Post by shypike »

Because the yEnc protocol is ambiguous about filename encoding
and because on Linux systems we can never be sure what the local filesystem's encoding is,
you sometimes run into this issue.
It has also been very hard to debug.
Can you send the NZB file to bugs at sabnzbd.org (including the URL of this post) ?
Do you know what your NAS's filesystem encoding is?
Latin-1 or UTF-8 or something else?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: "PostProcessing Crashed" => UnicodeDecodeError

Post by shypike »

I found the problem (another ASCII-Unicode conversion problem).
It will be fixed in the next release.

If you want, you can patch the code on your system.
Find the file postproc.py and change line 418 from:

Code: Select all

nzo.set_unpack_info('Script','%s%s <a href="./scriptlog?name=%s">(%s)</a>' % (script_ret, script_line, urllib.quote(fname), T('link-more')), unique=True)
into:

Code: Select all

nzo.set_unpack_info(u'Script','%s%s <a href="./scriptlog?name=%s">(%s)</a>' % (script_ret, unicoder(script_line), urllib.quote(fname), T('link-more')), unique=True)
As a check, can you confirm that the output of the script contains non-plain ASCII characters?
meepmeep
Release Testers
Release Testers
Posts: 2
Joined: August 9th, 2009, 8:20 am

Re: "PostProcessing Crashed" => UnicodeDecodeError

Post by meepmeep »

Hi

It seems correct indeed.
Thank you very much :)
Post Reply