I recently edited my e-mail template, because i needed to use multiple mails. I made it so, that if it was a tv-show that was downloaded, it would only send a mail to me. this is what the headers looks like:
Code: Select all
<!--#if $cat == "tv" && $to == "my@mail.com" #--><!--#slurp#-->
to: $to
from: $from
date: $date
subject: $name has <!--#if $status then "completed" else "failed" #-->
when a download finishes, it always fails with the message: PostProcessing Crashed, see logfile.
Looking into the logfile, I see this:
Code: Select all
2011-03-08 03:11:42,282::INFO::[postproc:592] Removing unwanted file /volume1/downloaded/_UNPACK_MY NZB JOB.sfv
2011-03-08 03:11:43,808::ERROR::[postproc:437] Post Processing Failed for MY NZB JOB
2011-03-08 03:11:43,816::INFO::[postproc:440] Traceback:
Traceback (most recent call last):
File "/volume1/@appstore/sab2/SABnzbd-0.5.4/sabnzbd/postproc.py", line 409, in run
nzo.get_unpack_info(), script, TRANS(script_log), script_ret)
File "/volume1/@appstore/sab2/SABnzbd-0.5.4/sabnzbd/emailer.py", line 171, in endjob
'directiveEndToken': '#-->'})
File "/var/packages/sab2/target/utils/lib/python2.5/site-packages/Cheetah/Template.py", line 1254, in __init__
self._compile(source, file, compilerSettings=compilerSettings)
File "/var/packages/sab2/target/utils/lib/python2.5/site-packages/Cheetah/Template.py", line 1548, in _compile
keepRefToGeneratedCode=True)
File "/var/packages/sab2/target/utils/lib/python2.5/site-packages/Cheetah/Template.py", line 793, in compile
raise parseError
ParseError:
Error in the Python code which Cheetah generated for this template:
================================================================================
invalid syntax (cheetah_DynamicallyCompiledCheetahTemplate_1299550303_31_84908.py, line 89)
Line|Python Code
----|-------------------------------------------------------------
87 | #
88 | # These are the email headers
89 | if VFFSL(SL,"cat",True) == "tv" && VFFSL(SL,"to",True) == "my@mail.com": # generated from line 8, col 1
^
90 | _v = VFFSL(SL,"to",True) # u'$to' on line 9, col 5
91 | if _v is not None: write(_filter(_v, rawExpr=u'$to')) # from line 9, col 5.
92 | write(u'''
================================================================================
Here is the corresponding Cheetah code:
Line 8, column 1
Line|Cheetah Code
----|-------------------------------------------------------------
5 |## Newlines and whitespace are significant!
6 |##
7 |## These are the email headers
8 |<!--#if $cat == "tv" && $to == "my@mail.com" #--><!--#slurp#-->
^
9 |to: $to
10 |from: $from
11 |date: $date
2011-03-08 03:11:44,268::INFO::[postproc:466] Cleaning up MY NZB JOB
2011-03-08 03:11:44,692::INFO::[__init__:702] /var/packages/sab2/target/sab/cache/SABnzbd_article_uDnrHV removed
.......
2011-03-08 03:11:44,785::INFO::[postproc:134] Saving postproc queue
2011-03-08 03:11:44,916::INFO::[downloader:357] Post-processing finished, resuming download
hardcoding the receiver in the e-mail header doesn't work, even though it is stated in the wiki (but I think the developers know that already).
I'm running SABnzbd+ version 0.5.4 on my Synology NAS.
thanks in advance..

