Page 1 of 2

2.3.2RC1 - PreQueue script not working anymore

Posted: December 5th, 2017, 8:09 am
by jippo
I think since I updated to the 2.3.2RC1 version my prequeue script isn't working anymore, for every nzb I'm getting this error message in my logs.

Code: Select all

2017-12-05 08:29:58,683::DEBUG::[newsunpack:2306] Failed script C:\PreQueue\PreQueue.exe, Traceback: 
Traceback (most recent call last):
  File "sabnzbd\newsunpack.pyo", line 2304, in pre_queue
  File "subprocess.pyo", line 390, in __init__
  File "subprocess.pyo", line 595, in _execute_child
  File "subprocess.pyo", line 262, in list2cmdline
TypeError: argument of type 'NoneType' is not iterable
My prequeue script hasn't been altered in more then a year.

Running on Win 10.

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 5th, 2017, 8:09 am
by safihre
Thanks for reporting! Now we can fix it :)

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 5th, 2017, 8:16 am
by safihre
Could you maybe post the line above it from the log?
It should say: 'Running pre-queue script'

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 5th, 2017, 8:37 am
by jippo

Code: Select all

2017-12-05 08:29:58,683::INFO::[newsunpack:2301] Running pre-queue script [u'C:\\PreQueue\\PreQueue.exe', u'Marvels.Runaways.S01E05.720p.WEB.h264-TBS', None, 'tv-sonarr', '', u'-100', '1003347988', 'alt.binaries.jerry alt.binaries.frogs alt.binaries.lou alt.binaries.inner-sanctum alt.binaries.hou alt.binaries.kenpsx alt.binaries.roger', u'Marvels Runaways', '1', '5', u'720p WEB h264-TBS']

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 9th, 2017, 4:55 pm
by dgrego01
I seem to have the same problem:

  File "cherrypy\_cprequest.pyo", line 670, in respond
  File "cherrypy\lib\encoding.pyo", line 220, in __call__
  File "cherrypy\_cpdispatch.pyo", line 60, in __call__
  File "sabnzbd\interface.pyo", line 449, in tapi
  File "sabnzbd\api.pyo", line 112, in api_handler
  File "sabnzbd\api.pyo", line 530, in _api_history
  File "sabnzbd\api.pyo", line 1840, in build_history
  File "sabnzbd\misc.pyo", line 130, in globber

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 9th, 2017, 5:32 pm
by safihre
No your problem is different. At least the error is.
Can you also enable Debug logging in the Status window and then after it happens again send me the log at [email protected]?

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 12th, 2017, 5:53 am
by jippo
Since I updated to 2.3.2RC2 my preQueue script seems to work again, but with some hickups.

For some reasons some of the input arguments are transformed:

Code: Select all

2017-12-12 04:21:21,506::INFO::[__init__:613] Backing up \\?\D:\Incomplete\The.Gifted.S01E10.720p.HDTV.x264-AVS\__ADMIN__\The.Gifted.S01E10.720p.HDTV.x264-AVS.nzb.gz
2017-12-12 04:21:21,522::DEBUG::[sorting:210] Found TV Show (The.Gifted.S01E10.720p.HDTV.x264-AVS)
2017-12-12 04:21:21,569::INFO::[newsunpack:2304] Running pre-queue script ['C:\\PreQueue\\PreQueue.exe', 'The.Gi\x9fted.S01E10.720p.HDTV.x264-AVS', '', 'tv-sonarr', '', '-100', '1346034024', 'alt.binaries.xylo alt.binaries.goonies alt.binaries.goat alt.binaries.\x9flowed alt.binaries.superman', 'The Gi\x9fted', '1', '10', '720p HDTV x264-AVS']
The original name is:
The.Gifted.S01E10.720p.HDTV.x264-AVS

But it transforms it into:
The.Gi\x9fted.S01E10.720p.HDTV.x264-AVS

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 12th, 2017, 6:49 am
by sander
\x9 is ASCII for a Tab. So ... is there a tab in the original NZB-filename?

If you copy the original NZB-file on your disk (probably The.Gifted.S01E10.720p.HDTV.x264-AVS.nzb) to "mytest.nzb" and download it, is there still a \x9 in the resulting handling?

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 12th, 2017, 7:33 am
by jippo
Well \x9 itsn't just applicable to the nzb filename as you can see in the piece of the log the \x9 is also found in the group list (in this particular nzb): 'alt.binaries.xylo alt.binaries.goonies alt.binaries.goat alt.binaries.\x9flowed alt.binaries.superman'

What I notice is that these so called tabs (\x9) are always in front of the letter f.
[edit]
I tested this by renaming the nzb to mytest.nzb and it didn't give any /x9 in the name, but still in de groups and then I renamed the nzb to myftest.nzb and it did give the /x9 in front of the letter f and also the \x9 in the groups.
[/edit]

And it isn't just this nzb, i have multiple nzbs with these \x9's.

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 12th, 2017, 8:51 am
by safihre
Strange.. I'll look into it.

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 12th, 2017, 9:07 am
by sander
safihre wrote: December 12th, 2017, 8:51 am Strange.. I'll look into it.
Maybe a Tab in the source code / in a replace?

But ... shouldn't you be doing other things, weledelzeergeleerde?

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 12th, 2017, 9:14 am
by safihre
It's Dr. Safihre already!
I think the TRANS function does this, but that's a big mystery function to me..

Could you maybe send me the NZB and your pre queue program (and what it's supposed to do?) to [email protected]?
Maybe put it in a zip file or via a link, otherwise the email virusscanner gets angry.

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 12th, 2017, 9:56 am
by jippo
I don't think you can use my pre queue script because it searches trough a local mysql database for keywords that match words in the nzb name and if there is a match it will lookup the corresponding category in the database which it will post back to sabnzbd.

I will send you the nzb file.

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 15th, 2017, 3:04 am
by jippo
I have done some extra testing and found that there are two more characters that are being transformed:
The _ is changed in \xf2
The ~ is changed in \xfe

Code: Select all

2017-12-15 08:51:00,615::INFO::[__init__:613] Backing up \\?\D:\Incomplete\~!@#$%^&()_+.QWERTYUIOP{}\__ADMIN__\~!@#$%^&()_+.QWERTYUIOP{}.nzb.gz
2017-12-15 08:51:00,625::INFO::[newsunpack:2304] Running pre-queue script ['C:\\PreQueue\\PreQueue.exe', '\xfe!@#$%^&()\xf2+.QWERTYUIOP{}', '', '', '', '', '905314264', 'alt.binaries.xylo alt.binaries.goonies alt.binaries.goat alt.binaries.\x9flowed alt.binaries.superman', '', '', '', '']
2017-12-15 08:51:03,246::INFO::[newsunpack:2314] Pre-queue script returns 0 and output=
1
碀#$%^&()ի.QWERTYUIOP{}

Re: 2.3.2RC1 - PreQueue script not working anymore

Posted: December 15th, 2017, 10:09 am
by sander
@jippo

I tried with a pre-queue script , and I can NOT confirm.

For example: https://www.binsearch.info/index.php?q= ... aphernalia works perfectly for me.