Page 1 of 1

"PostProcessing Crashed" => UnicodeDecodeError

Posted: September 24th, 2010, 1:14 pm
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 ? 

Re: "PostProcessing Crashed" => UnicodeDecodeError

Posted: September 24th, 2010, 1:29 pm
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?

Re: "PostProcessing Crashed" => UnicodeDecodeError

Posted: September 26th, 2010, 8:47 am
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?

Re: "PostProcessing Crashed" => UnicodeDecodeError

Posted: September 26th, 2010, 4:11 pm
by meepmeep
Hi

It seems correct indeed.
Thank you very much :)