evilhero / mylar

An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents
GNU General Public License v3.0
977 stars 173 forks source link

PostProcessing Request for Info #162

Closed Rumtum closed 11 years ago

Rumtum commented 11 years ago

Great work on the dev stream by the way. Make sure this hobby of yours doesn't take up all your time so you can't actually read comics.

What is the current state of postprocessing?

I am using SABnzbd 0.7.9. on a QNAP NAS (linux) Mylar is running on Windows 7 - Version: 36840d3612335cd40e12328aa608d177510587f5 (development)

I have copied the latest versions of the pp scripts to my SABnzbd server.

The console reports 18-Jan-2013 11:55:15 - INFO :: CP Server Thread-10 : Starting postprocessing for : Elephantmen045(2013)(digital)(Son_of_Ultron-Empire).cbr 18-Jan-2013 11:58:20 - INFO :: CP Server Thread-2 : Starting postprocessing for : Saga009(2013)(digital)(Megan-Empire).cbr

but there is no evidence of anything happening in the mylar or SABnzbd log files. I get the same result no matter if the Rename File option is selected or not.

I'm assuming I have a config issue but without an error message, it is hard to know where to look! Does anybody else have postprocessing working?

evilhero commented 11 years ago

Post-Processing works - so it's a matter of figuring out what's not confgiured perhaps on your system that should be. After the job gets sent to SAB, is there anything under the SABlog for the job itself ? Mylar verbosely logs everything to the mylar.log file (in /logs usually) by default. Open up the log file and find the lines that coincide around the time when it is supposed to be post-processed and post those lines here.

in the autoProcess.cfg, web root should be left blank unless you reference Mylar at http:\localhost;8090\mylar (or something after the slash)...also make sure that the IP/host that you specify for Mylar in the Configuration is exactly the same as in your cfg file

Rumtum commented 11 years ago

The Mylar log doesn't have any entries other than the Start postprocessing one mentioned. Unless these are cache??

sabnzbd.log does have entries

2013-01-18 16:58:28,094::INFO::[postproc:342] unpack_magic finished on Diablo05(of05)(2012)_(digital-Empire) 2013-01-18 16:58:28,095::DEBUG::[misc:805] Moving. Old path:/share/MD0_DATA/Download/sabnzbd/incomplete/Diablo 05 (of 05) (2012) (digital-Empire)/Diablo 05 (of 05) (2012) (digital-Empire).cbz new path:/share/MD0_DATA/Download/sabnzbd/complete/comics/_UNPACK_Diablo05(of05)(2012)_(digital-Empire)/Diablo 05 (of 05) (2012) (digital-Empire).cbz overwrite?:0 2013-01-18 16:58:28,099::INFO::[newsunpack:143] Running external script /share/MD0_DATA/.qpkg/SickBeard/autoProcessTV/ComicRN.py(/share/MD0_DATA/Download/sabnzbd/complete/comics/Diablo05(of05)(2012)_(digital-Empire), Diablo 05 (of 05) (2012) (digital-Empire).nzb, Diablo05(of05)(2012)_(digital-Empire), , comics, alt.binaries.comics.dcp, 0) 2013-01-18 16:58:28,267::DEBUG::[interface:420] API-call from 192.168.1.99 [Python-urllib/2.7] {'output': 'xml', 'section': 'misc', 'apikey': '6edaa5e2521ee952e24902519a7e375a', 'mode': 'get_config'} 2013-01-18 16:58:28,507::INFO::[postproc:520] Cleaning up Diablo05(of05)(2012)_(digital-Empire) (keep_basic=False) 2013-01-18 16:58:28,510::INFO::[postproc:84] Saving postproc queue 2013-01-18 16:58:28,511::INFO::[init:904] Saving data for postproc1.sab in /share/MD0_DATA/.qpkg/SABnzbdplus/Config/admin/postproc1.sab 2013-01-18 16:58:28,516::INFO::[downloader:244] Post-processing finished, resuming download

My Mylar filesname settings are $Series $Issue ($Year).

I suppose I am expecting (as with Sickbeard), the comic file will get renamed and moved to the Mylar server. Is that correct?

evilhero commented 11 years ago

well that's the sab .log . I need to see the contents of the mylar.log file as it indicates therein what the name is of the nzb its trying to post-process and any problems. In sab, under the job itself you should have an option to view additional output or script output ..it will indicate its trying to reach the mylar server with a url that includes the nzbname.

Rumtum commented 11 years ago

As ever, you know your stuff...

Loading config from /share/MD0_DATA/.qpkg/SickBeard/autoProcessTV/autoProcessComics.cfg Opening URL: http://192.168.1.99:8090/post_process?nzb_name=Dancer_005_%282012%29_%28digital-Empire%29.cbr&nzb_folder=%2Fshare%2FMD0_DATA%2FDownload%2Fsabnzbd%2Fcomplete%2Fcomics%2FDancer_005_%282012%29_%28digital-Empire%29.cbr <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

500 Internal Server Error

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "C:\Program Files (x86)\evilhero\cherrypy_cprequest.py", line 645, in respond
    response.body = self.handler()
  File "C:\Program Files (x86)\evilhero\cherrypy\lib\encoding.py", line 188, in **call**
    self.body = self.oldhandler(_args, *_kwargs)
  File "C:\Program Files (x86)\evilhero\cherrypy_cpdispatch.py", line 29, in **call**
    return self.callable(_self.args, *_self.kwargs)
  File "C:\Program Files (x86)\evilhero\mylar\webserve.py", line 225, in post_process
    result = PostProcess.Process()
  File "C:\Program Files (x86)\evilhero\mylar\PostProcessor.py", line 302, in Process
    self._log("Original Filename: " + ofilename, logger.DEBUG)
UnboundLocalError: local variable 'ofilename' referenced before assignment
Powered by CherryPy 3.2.0
evilhero commented 11 years ago

I just get lucky quite abit :)

From what I can see from that log now, irs passing an invalid nzb name from sabnzbd to mylar for some reason. It's invalid because it has the .cbr at the end of both the nzbname and folder name. I thought I had it so that Mylar removed all extensions but it would appear I missed something. I'll check on the oname error but I think its due to the nzb name being passed wronf.

Can you find out which provider it came from .. it'll say in the logs as well as in sab where it came from (if its a newznab you can hust say that).

Rumtum commented 11 years ago

How does the provider affect things?

My search settings are only set for NZB.su and Experimental.

18-Jan-2013 17:35:01 - DEBUG :: Thread-16 : url: http://nzbindex.nl/download/73879082/0-Day-Week-of-2012.09.26-Part-1-Dancer-005-2012-digital-Empire.cbr.nzb

evilhero commented 11 years ago

Provider affects things because they each pass the nzb file to Mylar in different ways...some don't modify the filenames prior, others replace spaces on the nzb path, and others let custom renames happen. Experimental is one of those that. I'm just trying to figure out if it's a problem with the way the Experimental is handling the nzb or if it's the way your SAB is throwing it....

mightyflub commented 11 years ago

I seem to be having exactly the same problems with post processing. I've tested it indivdually with nzb.su and experimental and the sabnzbd logs show the same error 500.

mightyflub commented 11 years ago

Got mine working. It's because I was running Mylar on one server and sabnzbd on another and the file paths didn't match. Sorted now and working great

evilhero commented 11 years ago

aights in all of my tests thus far, I'm not seeing the problems. One or both of you are going to have to paste in your mylar.log file (not the log from within Mylar, the file has tons more info)

Rumtum commented 11 years ago

I too am running on two different servers (one linux, one windows), so I am sure I have a path issue (see issue 83), but that shouldn't cause the 500 error.

I will do some experiments and get a clean mylar.log file.

evilhero commented 11 years ago

If the paths are incorrect you would get the 500 error because it can't locate the physical file to rename. Make sure that Mylar has access to the path location that sabnzbd sends back in the postprocess url nzb_folder:. /share/MD0_DATA/Download/sabnzbd/complete/comics/:

Rumtum commented 11 years ago

Ok, I think I'm stuffed then. The two servers can access the drive, but the paths are different

Sabnzbd Linux - /share/MD0_DATA/Download/sabnzbd/complete/comics/ Mylar Windows - L:\sabnzbd\complete\comics\

I can't make "/share/MD0_DATA/Download/sabnzbd/complete/comics/" mean anything to windows. I need to be able to pass a path that Mylar can understand. Sickbeard gets around this with the post-processing "TV Download Dir" parameter.

I can confirm that if I manually change the URL, and cut&paste it to my browser, the postprocessing works as-per-design. I suppose this is really an enhancement request.

Rumtum commented 11 years ago

Very happy, hands free post-processing. Thanks.