clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
674 stars 176 forks source link

nzbdrone handling failed #355

Closed fredguy closed 10 years ago

fredguy commented 10 years ago

Running on syno dsm5 I can't make any sense of that, but seems like things aren't going the way they're supposed....

ERROR Tue Apr 29 2014 12:08:13 Post-process-script nzbToMedia/nzbToMedia.py for Hannibal.S02E01.720p.WEB-DL.DD5.1.H.264-NTb failed (terminated with unknown status) INFO Tue Apr 29 2014 12:08:13 nzbToMedia: IOError: [Errno 2] No such file or directory: '/volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/logs/nzbtomedia.log' INFO Tue Apr 29 2014 12:08:13 nzbToMedia: file = builtin.open(filename, mode, buffering) INFO Tue Apr 29 2014 12:08:13 nzbToMedia: File "/usr/local/python/lib/python2.7/codecs.py", line 881, in open INFO Tue Apr 29 2014 12:08:13 nzbToMedia: stream = codecs.open(self.baseFilename, self.mode, self.encoding) INFO Tue Apr 29 2014 12:08:13 nzbToMedia: File "/usr/local/python/lib/python2.7/logging/init.py", line 928, in _open INFO Tue Apr 29 2014 12:08:13 nzbToMedia: StreamHandler.init(self, self._open()) INFO Tue Apr 29 2014 12:08:13 nzbToMedia: File "/usr/local/python/lib/python2.7/logging/init.py", line 903, in init INFO Tue Apr 29 2014 12:08:13 nzbToMedia: file_handler = logging.FileHandler(self.log_file_path, encoding='utf-8') INFO Tue Apr 29 2014 12:08:13 nzbToMedia: File "/volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbtomedia/logger.py", line 116, in _config_handler INFO Tue Apr 29 2014 12:08:13 nzbToMedia: self.cur_handler = self._config_handler() INFO Tue Apr 29 2014 12:08:13 nzbToMedia: File "/volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbtomedia/logger.py", line 97, in initLogging INFO Tue Apr 29 2014 12:08:13 nzbToMedia: logger.ntm_log_instance.initLogging() INFO Tue Apr 29 2014 12:08:13 nzbToMedia: File "/volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbtomedia/init.py", line 190, in initialize INFO Tue Apr 29 2014 12:08:13 nzbToMedia: nzbtomedia.initialize(section) INFO Tue Apr 29 2014 12:08:13 nzbToMedia: File "/usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbToMedia.py", line 361, in main INFO Tue Apr 29 2014 12:08:13 nzbToMedia: exit(main(sys.argv)) INFO Tue Apr 29 2014 12:08:13 nzbToMedia: File "/usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbToMedia.py", line 511, in INFO Tue Apr 29 2014 12:08:13 nzbToMedia: Traceback (most recent call last): INFO Tue Apr 29 2014 12:08:13 nzbToMedia: !!! No log folder, logging to screen only!

clinton-hall commented 10 years ago

https://github.com/clinton-hall/nzbToMedia/issues/327

It appears that when installing on Synology, for some reason this script doesn't correctly make the logs directory and the autoProcessMedia.cfg

So, after cloning, please create a logs directory inside the nzbToMedia directory and also make a copy of autoProcessMedia.cfg.spec as autoProcessMedia.cfg (edit as required, or if using NZBGet, just set the details via the webui).

Please make sure these directories and files have appropriate permissions for the user that will be executing the script...

fredguy commented 10 years ago

better but not there yet. Can't shake the migration thingy although the rights are set to 777, and even made Nzbget the owner.

INFO Tue Apr 29 2014 15:39:34 Collection Hannibal.S02E01.720p.WEB-DL.DD5.1.H.264-NTb added to history ERROR Tue Apr 29 2014 15:39:34 Post-process-script nzbToMedia/nzbToMedia.py for Hannibal.S02E01.720p.WEB-DL.DD5.1.H.264-NTb failed (terminated with unknown status) INFO Tue Apr 29 2014 15:39:34 nzbToMedia: [15:39:34] [ERROR]::MAIN: Unable to migrate config file /volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/autoProcessMedia.cfg, exiting ... INFO Tue Apr 29 2014 15:39:32 Executing post-process-script nzbToMedia/nzbToMedia.py for Hannibal.S02E01.720p.WEB-DL.DD5.1.H.264-NTb INFO Tue Apr 29 2014 15:39:32 Post-process-script nzbToMedia/DeleteSamples.py for Hannibal.S02E01.720p.WEB-DL.DD5.1.H.264-NTb successful

clinton-hall commented 10 years ago

Can you do the following via ssh and post the output here.?

ps aux | grep nzbget
cd /volume1/@appstore/nzbget/share/nzbget/ppscripts
ls -l
cd nzbToMedia
ls -l
cd logs
ls -l
fredguy commented 10 years ago

There you go.

ps | grep nzbget 1971 nzbget 1963m S /usr/local/nzbget/bin/nzbget -c /usr/local/nzbget/var/nzbget.conf -D 22007 root 3820 S grep nzbget

Outland> pwd /volume1/@appstore/nzbget/share/nzbget/ppscripts Outland> ls -l -rwxr-xr-x 1 nzbget root 8593 Apr 16 18:10 EMail.py -rwxr-xr-x 1 nzbget root 3705 Apr 16 18:10 Logger.py drwxr-xr-x 7 root root 4096 Apr 29 15:32 nzbToMedia

Outland> pwd /volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia Outland> ls -l -rwxr-xr-x 1 root root 4903 Apr 29 11:34 DeleteSamples.py -rw-r--r-- 1 root root 4274 Apr 29 11:34 README.md -rwxr-xr-x 1 root root 3375 Apr 29 11:34 ResetDateTime.py -rwxr-xr-x 1 root root 17836 Apr 29 11:34 TorrentToMedia.py -rwxrwxrwx 1 nzbget root 11561 Apr 29 15:36 autoProcessMedia.cfg -rwxrwxrwx 1 nzbget root 11312 Apr 29 15:33 autoProcessMedia.cfg.old -rwxrwxrwx 1 nzbget root 11032 Apr 29 11:34 autoProcessMedia.cfg.spec -rw-r--r-- 1 root root 16004 Apr 29 11:34 changelog.txt -rwxr-xr-x 1 root root 504 Apr 29 11:34 getffmpeg.sh drwxr-xr-x 9 root root 4096 Apr 29 11:34 libs -rw-r--r-- 1 root root 35127 Apr 29 11:34 license.txt drwxrwxrwx 2 nzbget root 4096 Apr 29 15:11 logs -rwxr-xr-x 1 root root 3223 Apr 29 11:34 nzbToCouchPotato.py -rwxr-xr-x 1 root root 1789 Apr 29 11:34 nzbToGamez.py -rwxr-xr-x 1 root root 1887 Apr 29 11:34 nzbToHeadPhones.py -rwxr-xr-x 1 root root 16674 Apr 29 11:34 nzbToMedia.py -rwxr-xr-x 1 root root 1705 Apr 29 11:34 nzbToMylar.py -rwxr-xr-x 1 root root 2579 Apr 29 11:34 nzbToNzbDrone.py -rwxr-xr-x 1 root root 3192 Apr 29 11:34 nzbToSickBeard.py drwxr-xr-x 10 root root 4096 Apr 29 17:15 nzbtomedia drwxr-xr-x 2 root root 4096 Apr 29 11:34 tests

Outland> pwd /volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/logs Outland> ll drwxrwxrwx 2 nzbget root 4096 Apr 29 15:11 . drwxr-xr-x 7 root root 4096 Apr 29 15:32 .. -rwxrwxrwx 1 nzbget root 2379 Apr 30 04:27 nzbtomedia.log

clinton-hall commented 10 years ago

Can you please try the following and then confirm if this works?

cd /volume1/@appstore/nzbget/share/nzbget/ppscripts
chown -R nzbget nzbToMedia

I think the issue is that the entire nzbToMedia directory has root ownership (with rwxr-xr-x) so other users don't actually have write permissions in the directory. The above command should make nzbget the owner for all files and folders in (and including) nzbToMedia.

fredguy commented 10 years ago

Outland> ll drwxr-xr-x 7 nzbget root 4096 Apr 29 15:32 . drwxr-xr-x 3 nzbget root 4096 Apr 29 11:34 .. drwxr-xr-x 8 nzbget root 4096 Apr 30 09:51 .git -rw-r--r-- 1 nzbget root 555 Apr 29 11:34 .gitattributes -rw-r--r-- 1 nzbget root 68 Apr 29 11:34 .gitignore -rwxr-xr-x 1 nzbget root 4903 Apr 29 11:34 DeleteSamples.py -rw-r--r-- 1 nzbget root 4274 Apr 29 11:34 README.md -rwxr-xr-x 1 nzbget root 3375 Apr 29 11:34 ResetDateTime.py -rwxr-xr-x 1 nzbget root 17836 Apr 29 11:34 TorrentToMedia.py -rwxrwxrwx 1 nzbget root 11561 Apr 29 15:36 autoProcessMedia.cfg -rwxrwxrwx 1 nzbget root 11312 Apr 29 15:33 autoProcessMedia.cfg.old -rwxrwxrwx 1 nzbget root 11032 Apr 29 11:34 autoProcessMedia.cfg.spec -rw-r--r-- 1 nzbget root 16004 Apr 29 11:34 changelog.txt -rwxr-xr-x 1 nzbget root 504 Apr 29 11:34 getffmpeg.sh drwxr-xr-x 9 nzbget root 4096 Apr 29 11:34 libs -rw-r--r-- 1 nzbget root 35127 Apr 29 11:34 license.txt drwxrwxrwx 2 nzbget root 4096 Apr 29 15:11 logs -rwxr-xr-x 1 nzbget root 3223 Apr 29 11:34 nzbToCouchPotato.py -rwxr-xr-x 1 nzbget root 1789 Apr 29 11:34 nzbToGamez.py -rwxr-xr-x 1 nzbget root 1887 Apr 29 11:34 nzbToHeadPhones.py -rwxr-xr-x 1 nzbget root 16674 Apr 29 11:34 nzbToMedia.py -rwxr-xr-x 1 nzbget root 1705 Apr 29 11:34 nzbToMylar.py -rwxr-xr-x 1 nzbget root 2579 Apr 29 11:34 nzbToNzbDrone.py -rwxr-xr-x 1 nzbget root 3192 Apr 29 11:34 nzbToSickBeard.py drwxr-xr-x 10 nzbget root 4096 Apr 30 09:51 nzbtomedia drwxr-xr-x 2 nzbget root 4096 Apr 29 11:34 tests

done but still ... NFO Wed Apr 30 2014 10:09:31 Collection Supernatural.S09E20.720p.HDTV.X264-DIMENSION added to history ERROR Wed Apr 30 2014 10:09:31 Post-process-script nzbToMedia/nzbToMedia.py for Supernatural.S09E20.720p.HDTV.X264-DIMENSION failed INFO Wed Apr 30 2014 10:09:31 nzbToMedia: [10:09:31] [ERROR]::MAIN: Unable to migrate config file /volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/autoProcessMedia.cfg, exiting ... INFO Wed Apr 30 2014 10:09:30 Executing post-process-script nzbToMedia/nzbToMedia.py for Supernatural.S09E20.720p.HDTV.X264-DIMENSION INFO Wed Apr 30 2014 10:09:30 Post-process-script nzbToMedia/DeleteSamples.py for Supernatural.S09E20.720p.HDTV.X264-DIMENSION skipped

fredguy commented 10 years ago

So after fiddling around, I notice that I have the error IF I edit the autoprocessmedia.cfg If I simply cp the .spec without editing, i meet a different behavior :

On the webui of NZBget, i changed the sickbeard category to tvsb, in booth nzbtomedia and nzbtosickbeard.... but i still have the issue.

Feels like the webui isn't changing anything within the autprocessmedia files.

current nzbget : 12.0

Wed Apr 30 2014 14:47:33 Collection Almost.Human.S01E13.720p.WEB-DL.DD5.1.H.264-BS added to history ERROR Wed Apr 30 2014 14:47:33 Post-process-script nzbToMedia/nzbToMedia.py for Almost.Human.S01E13.720p.WEB-DL.DD5.1.H.264-BS failed INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [ERROR]::MAIN: A problem was reported in the /usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbToMedia.py script. INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [ERROR]::MAIN: Category:[tv] is not unique, ['SickBeard', 'NzbDrone'] are using it. Please rename it or disable all other sections using the same category name in your autoProcessMedia.cfg and try again. INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [INFO]::MAIN: Script triggered from NZBGet (11.0 or later). INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [INFO]::MAIN: ######################################################### INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [INFO]::MAIN: ######################################################### INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [WARNING]::MAIN: Failed to locate ffprobe, video corruption detection disabled! INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [INFO]::MAIN: nzbToMedia Version:e3f896d316333d9ccd528f5ba24e0da5988cba23 Branch:dev (Linux 3.2.40) INFO Wed Apr 30 2014 14:47:33 nzbToMedia: [14:47:33] [INFO]::MAIN: There is a newer version available (you're 1 commit behind) INFO Wed Apr 30 2014 14:47:32 nzbToMedia: [14:47:32] [INFO]::MAIN: Checking if git needs an update INFO Wed Apr 30 2014 14:47:32 nzbToMedia: [14:47:32] [INFO]::MAIN: Checking database structure... INFO Wed Apr 30 2014 14:47:32 nzbToMedia: [14:47:32] [INFO]::MAIN: Loading config from [/volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/autoProcessMedia.cfg] INFO Wed Apr 30 2014 14:47:31 Executing post-process-script nzbToMedia/nzbToMedia.py for Almost.Human.S01E13.720p.WEB-DL.DD5.1.H.264-BS INFO Wed Apr 30 2014 14:47:31 Post-process-script nzbToMedia/DeleteSamples.py for Almost.Human.S01E13.720p.WEB-DL.DD5.1.H.264-BS successful INFO Wed Apr 30 2014 14:47:31 DeleteSamples: Script triggered from NZBGet (11.0 or later). INFO Wed Apr 30 2014 14:47:30 Executing post-process-script nzbToMedia/DeleteSamples.py for Almost.Human.S01E13.720p.WEB-DL.DD5.1.H.264-BS INFO Wed Apr 30 2014 14:47:30 Nothing to cleanup for Almost.Human.S01E13.720p.WEB-DL.DD5.1.H.264-BS INFO Wed Apr 30 2014 14:47:30 Cleaning up Almost.Human.S01E13.720p.WEB-DL.DD5.1.H.264-BS INFO Wed Apr 30 2014 14:47:30 Queueing Almost.Human.S01E13.720p.WEB-DL.DD5.1.H.264-BS for post-processing INFO Wed Apr 30 2014 14:47:30 Almost.Human.S01E13.720p.WEB-DL.DD5.1.H.264-BS returned from history back to download queue

clinton-hall commented 10 years ago

after making changes in nzbget webui you need to save changes and then restart...

fredguy commented 10 years ago

i did, and even stop and restarted the package. no luck there

fredguy commented 10 years ago

welll.... so weird. after a git pull. i'm back to the migration thingy. I have no idea what its trying to achieve... maybe it's looking for a way to attach itself on humans to drain their energy... ?

ERROR Wed Apr 30 2014 18:22:15 Post-process-script nzbToMedia/nzbToMedia.py for XIII.The.Series.2011.S01E03.Lockdown.720p.WEB-DL.AVC-iON failed INFO Wed Apr 30 2014 18:22:15 nzbToMedia: [18:22:15] [ERROR]::MAIN: Unable to migrate config file /volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/autoProcessMedia.cfg, exiting ... INFO Wed Apr 30 2014 18:22:14 Executing post-process-script nzbToMedia/nzbToMedia.py for XIII.The.Series.2011.S01E03.Lockdown.720p.WEB-DL.AVC-iON INFO Wed Apr 30 2014 18:22:14 Post-process-script nzbToMedia/DeleteSamples.py for XIII.The.Series.2011.S01E03.Lockdown.720p.WEB-DL.AVC-iON successful INFO Wed Apr 30 2014 18:22:14 DeleteSamples: Script triggered from NZBGet (11.0 or later). INFO Wed Apr 30 2014 18:22:13 Executing post-process-script nzbToMedia/DeleteSamples.py for XIII.The.Series.2011.S01E03.Lockdown.720p.WEB-DL.AVC-iON INFO Wed Apr 30 2014 18:22:12 Queueing XIII.The.Series.2011.S01E03.Lockdown.720p.WEB-DL.AVC-iON for post-processing INFO Wed Apr 30 2014 18:22:12 XIII.The.Series.2011.S01E03.Lockdown.720p.WEB-DL.AVC-iON returned from history back to download queue INFO Wed Apr 30 2014 18:20:32 Collection XIII.The.Series.2011.S01E03.Lockdown.720p.WEB-DL.AVC-iON added to history

clinton-hall commented 10 years ago

Draining energy wasn't my intention here... Although the magnitude of permissions issues that always accompany a Synology NAS becomes rather draining!

clinton-hall commented 10 years ago

I'll try and see if I can "bypass" these issues and just load the config without migrating when running nzbget.... It may work... I'll try and put an update out soon.

fredguy commented 10 years ago

what i the migrating doing exactly ? Is it the proces of picking up what ever wass entered in nzbget into the autoprocesmedia ?

clinton-hall commented 10 years ago

Two things happen. First is migrates everything in autoProcessMedia.cfg into the same template as the .spec (I.e it allows us to pull in new features). Then it also loads the details from NZBGet...

clinton-hall commented 10 years ago

So, if you did a git pull as root, it is probable that the .spec file has been set back to root ownership etc... So try doing the chown command again... Then the the script update when it runs (as this should retain nzbget ownership.

Again, I'll see if I can allow the script to run even if migrate fails, but this may not work...

fredguy commented 10 years ago

i started from scratch and cloned the rep. switched all to nzbget ownersship, and even put all at 777...

It does generate the autprocessmedia.cfg file bassed on the spec one, plus the details from nzbget. one things thou... the new autoprocessmedia.cfg ends up with 2 sickbeard section, one with the [tv] tag, and one with the one from nzbget.

In the end, i have 2 tv sections. that may mess up thing on a later statge... or not.. :)

So anyway, the new conf file is ther and the rightss seem good. 777/nzbget

Still end up with the same message : unable to migrate. Never had that issue before. All started with dsm5/nzbdrone.

clinton-hall commented 10 years ago

The 2 sections isn't an issue.

I need to get to work now and get onto a conference call, but in about. 3 hours. I should be able to push a "bypass" for this check and see what it does.

Unfortunately I don't have Synology so. I can't really test this myself... I never get this on any Debian or Ubuntu VM, QNAP, or Asustor NAS... There is probably something obvious that I don't know about, but between this project and CouchPotato forums I have seen a huge number of issues relating to permissions on Synology even when files have 777 permissions... I wish I could find the solution to these.

clinton-hall commented 10 years ago

Ok.. I created a new branch. syno-debug.

Please switch to this branch and try running. This should bypass some failures and add more logging. I don't know if it will run to completion... this depends on where the failure occurs.

fredguy commented 10 years ago

cloned a fresh install cp autoprocessmedia.pec into CFG manually edited autoprocessmedia.cfg

output :

INFO Thu May 01 2014 12:09:59 Collection Jekyll.1x02.UNCUT.DVDRip XviD-FoV added to history ERROR Thu May 01 2014 12:09:59 Post-process-script nzbToMedia/nzbToMedia.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV failed (terminated with unknown status) INFO Thu May 01 2014 12:09:59 nzbToMedia: SyntaxError: invalid syntax INFO Thu May 01 2014 12:09:59 nzbToMedia: ^ INFO Thu May 01 2014 12:09:59 nzbToMedia: CFG = config.addnzbget(): INFO Thu May 01 2014 12:09:59 nzbToMedia: File "/volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbtomedia/init.py", line 205 INFO Thu May 01 2014 12:09:59 nzbToMedia: import nzbtomedia INFO Thu May 01 2014 12:09:59 nzbToMedia: File "/usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbToMedia.py", line 279, in INFO Thu May 01 2014 12:09:59 nzbToMedia: Traceback (most recent call last): INFO Thu May 01 2014 12:09:59 Executing post-process-script nzbToMedia/nzbToMedia.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV ERROR Thu May 01 2014 12:09:59 Post-process-script nzbToMedia/DeleteSamples.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV failed (terminated with unknown status) INFO Thu May 01 2014 12:09:59 DeleteSamples: SyntaxError: invalid syntax INFO Thu May 01 2014 12:09:59 DeleteSamples: ^ INFO Thu May 01 2014 12:09:59 DeleteSamples: CFG = config.addnzbget(): INFO Thu May 01 2014 12:09:59 DeleteSamples: File "/volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbtomedia/init.py", line 205 INFO Thu May 01 2014 12:09:59 DeleteSamples: import nzbtomedia INFO Thu May 01 2014 12:09:59 DeleteSamples: File "/usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/DeleteSamples.py", line 34, in INFO Thu May 01 2014 12:09:59 DeleteSamples: Traceback (most recent call last): INFO Thu May 01 2014 12:09:59 Executing post-process-script nzbToMedia/DeleteSamples.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV INFO Thu May 01 2014 12:09:58 Queueing Jekyll.1x02.UNCUT.DVDRip XviD-FoV for post-processing INFO Thu May 01 2014 12:09:58 Jekyll.1x02.UNCUT.DVDRip XviD-FoV returned from history back to download queue INFO Thu May 01 2014 12:09:52 Messages have been deleted

clinton-hall commented 10 years ago

Sorry, that was stupid of me. Can you update and run again?

fredguy commented 10 years ago

so now 2 things happen : i copy .spec to .conf First run : INFO Thu May 01 2014 15:17:18 Collection Jekyll.1x02.UNCUT.DVDRip XviD-FoV added to history INFO Thu May 01 2014 15:17:18 nzbToMedia: [15:17:18] [ERROR]::MAIN: A problem was reported in the /usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbToMedia.py script. INFO Thu May 01 2014 15:17:18 nzbToMedia: [15:17:18] [ERROR]::MAIN: Category:[tv] is not unique, ['SickBeard', 'NzbDrone'] are using it. Please rename it or disable all other sections using the same category name in your autoProcessMedia.cfg and try again. INFO Thu May 01 2014 15:17:18 nzbToMedia: [15:17:18] [INFO]::MAIN: Script triggered from NZBGet (11.0 or later). INFO Thu May 01 2014 15:17:18 nzbToMedia: [15:17:18] [INFO]::MAIN: ######################################################### INFO Thu May 01 2014 15:17:18 nzbToMedia: [15:17:18] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## INFO Thu May 01 2014 15:17:18 nzbToMedia: [15:17:18] [INFO]::MAIN: ######################################################### INFO Thu May 01 2014 15:17:17 nzbToMedia: [15:17:17] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... INFO Thu May 01 2014 15:17:17 nzbToMedia: [15:17:17] [WARNING]::MAIN: Failed to locate ffprobe, video corruption detection disabled! INFO Thu May 01 2014 15:17:17 nzbToMedia: [15:17:17] [INFO]::MAIN: nzbToMedia Version:5fdf4e10e3a342b29fe2be2483c77fb595a79039 Branch:dev (Linux 3.2.40) INFO Thu May 01 2014 15:17:17 nzbToMedia: [15:17:17] [INFO]::MAIN: No update needed INFO Thu May 01 2014 15:17:17 nzbToMedia: [15:17:17] [ERROR]::MAIN: Unable to contact github, can't check for update INFO Thu May 01 2014 15:17:17 nzbToMedia: [15:17:17] [INFO]::MAIN: Checking if git needs an update INFO Thu May 01 2014 15:17:17 nzbToMedia: [15:17:17] [INFO]::MAIN: Checking database structure... INFO Thu May 01 2014 15:17:16 Executing post-process-script nzbToMedia/nzbToMedia.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV INFO Thu May 01 2014 15:17:16 Post-process-script nzbToMedia/DeleteSamples.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV successful INFO Thu May 01 2014 15:17:16 DeleteSamples: Script triggered from NZBGet (11.0 or later). INFO Thu May 01 2014 15:17:15 Executing post-process-script nzbToMedia/DeleteSamples.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV INFO Thu May 01 2014 15:17:15 Queueing Jekyll.1x02.UNCUT.DVDRip XviD-FoV for post-processing INFO Thu May 01 2014 15:17:15 Jekyll.1x02.UNCUT.DVDRip XviD-FoV returned from history back to download queue INFO Thu May 01 2014 15:17:10 Messages have been deleted

Then second run :

INFO Thu May 01 2014 15:18:38 Collection Jekyll.1x02.UNCUT.DVDRip XviD-FoV added to history INFO Thu May 01 2014 15:18:38 nzbToMedia: NameError: global name 'logger' is not defined INFO Thu May 01 2014 15:18:38 nzbToMedia: logger.debug("Error %s when copying to .cfg" % (e)) INFO Thu May 01 2014 15:18:38 nzbToMedia: File "/volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbtomedia/nzbToMediaConfig.py", line 109, in migrate INFO Thu May 01 2014 15:18:38 nzbToMedia: if not config.migrate(): INFO Thu May 01 2014 15:18:38 nzbToMedia: File "/volume1/@appstore/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbtomedia/init.py", line 196, in initialize INFO Thu May 01 2014 15:18:38 nzbToMedia: nzbtomedia.initialize(section) INFO Thu May 01 2014 15:18:38 nzbToMedia: File "/usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbToMedia.py", line 361, in main INFO Thu May 01 2014 15:18:38 nzbToMedia: exit(main(sys.argv)) INFO Thu May 01 2014 15:18:38 nzbToMedia: File "/usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbToMedia.py", line 511, in INFO Thu May 01 2014 15:18:38 nzbToMedia: Traceback (most recent call last): INFO Thu May 01 2014 15:18:37 Executing post-process-script nzbToMedia/nzbToMedia.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV INFO Thu May 01 2014 15:18:37 Post-process-script nzbToMedia/DeleteSamples.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV successful INFO Thu May 01 2014 15:18:37 DeleteSamples: Script triggered from NZBGet (11.0 or later). INFO Thu May 01 2014 15:18:37 Executing post-process-script nzbToMedia/DeleteSamples.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV INFO Thu May 01 2014 15:18:36 Queueing Jekyll.1x02.UNCUT.DVDRip XviD-FoV for post-processing INFO Thu May 01 2014 15:18:36 Jekyll.1x02.UNCUT.DVDRip XviD-FoV returned from history back to download queue

clinton-hall commented 10 years ago

Ok... Firstly, try manually setting [SickBeard][[tv]] enabled=0 in cfg. Then try again.

fredguy commented 10 years ago

on which one... .spec or .cfg ? or both ?

fredguy commented 10 years ago

I rm .conf, and edited .spec. Sb was already at 0 and ND to 1 o i simply deleted all SB section. Now having the following.

Thu May 01 2014 15:37:49 Collection Jekyll.1x02.UNCUT.DVDRip XviD-FoV added to history INFO Thu May 01 2014 15:37:48 nzbToMedia: [15:37:48] [ERROR]::MAIN: A problem was reported in the /usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbToMedia.py script. INFO Thu May 01 2014 15:37:48 nzbToMedia: [15:37:48] [POSTPROCESS]::NZBDRONE: [] INFO Thu May 01 2014 15:37:48 nzbToMedia: [15:37:48] [POSTPROCESS]::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request INFO Thu May 01 2014 15:37:48 nzbToMedia: [15:37:48] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/complete/tv/Jekyll.1x02.UNCUT.DVDRip XviD-FoV INFO Thu May 01 2014 15:37:48 nzbToMedia: [15:37:48] [INFO]::MAIN: NzbDrone:tv fork set to default INFO Thu May 01 2014 15:37:48 nzbToMedia: [15:37:48] [INFO]::MAIN: NzbDrone:tv fork auto-detection failed INFO Thu May 01 2014 15:37:48 nzbToMedia: [15:37:48] [INFO]::MAIN: Attempting to auto-detect tv fork INFO Thu May 01 2014 15:37:48 nzbToMedia: [15:37:48] [INFO]::MAIN: Calling NzbDrone:tv to post-process:Jekyll.1x02.UNCUT.DVDRip XviD-FoV.nzb INFO Thu May 01 2014 15:37:48 nzbToMedia: [15:37:48] [INFO]::MAIN: Auto-detected SECTION:NzbDrone INFO Thu May 01 2014 15:37:46 nzbToMedia: [15:37:46] [INFO]::MAIN: Script triggered from NZBGet (11.0 or later). INFO Thu May 01 2014 15:37:46 nzbToMedia: [15:37:46] [INFO]::MAIN: ######################################################### INFO Thu May 01 2014 15:37:46 nzbToMedia: [15:37:46] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## INFO Thu May 01 2014 15:37:46 nzbToMedia: [15:37:46] [INFO]::MAIN: ######################################################### INFO Thu May 01 2014 15:37:46 nzbToMedia: [15:37:46] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... INFO Thu May 01 2014 15:37:46 nzbToMedia: [15:37:46] [WARNING]::MAIN: Failed to locate ffprobe, video corruption detection disabled! INFO Thu May 01 2014 15:37:46 nzbToMedia: [15:37:46] [INFO]::MAIN: nzbToMedia Version:5fdf4e10e3a342b29fe2be2483c77fb595a79039 Branch:dev (Linux 3.2.40) INFO Thu May 01 2014 15:37:46 nzbToMedia: [15:37:46] [INFO]::MAIN: No update needed INFO Thu May 01 2014 15:37:46 nzbToMedia: [15:37:46] [ERROR]::MAIN: Unable to contact github, can't check for update INFO Thu May 01 2014 15:37:45 nzbToMedia: [15:37:45] [INFO]::MAIN: Checking if git needs an update INFO Thu May 01 2014 15:37:45 nzbToMedia: [15:37:45] [INFO]::MAIN: Checking database structure... INFO Thu May 01 2014 15:37:44 Executing post-process-script nzbToMedia/nzbToMedia.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV INFO Thu May 01 2014 15:37:44 Post-process-script nzbToMedia/DeleteSamples.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV successful INFO Thu May 01 2014 15:37:44 DeleteSamples: Script triggered from NZBGet (11.0 or later). INFO Thu May 01 2014 15:37:43 Executing post-process-script nzbToMedia/DeleteSamples.py for Jekyll.1x02.UNCUT.DVDRip XviD-FoV INFO Thu May 01 2014 15:37:43 Queueing Jekyll.1x02.UNCUT.DVDRip XviD-FoV for post-processing INFO Thu May 01 2014 15:37:43 Jekyll.1x02.UNCUT.DVDRip XviD-FoV returned from history back to download queue INFO Thu May 01 2014 15:37:35 Messages have been deleted

clinton-hall commented 10 years ago

ok... So the script Ran :) but the response from NZBDrone was Null

[POSTPROCESS]::NZBDRONE: []

This now appears to be the same as #356

Everything should be passing correctly, so I'm wondering if NZBDrone doesn't return any data if the directory is not valid (i.e permissions issues)?

Can you confirm the owner and permissions for /volume1/downloads/complete/tv/Jekyll.1x02.UNCUT.DVDRip XviD-FoV and also confirm the user that runs NZBDrone?

clinton-hall commented 10 years ago

ok... In installed nzbdrone to test... did some research and it looks like we changed to a get to keep things the same... but the documentation actually shows that the api/command is a POST

https://github.com/NzbDrone/NzbDrone/wiki/Command

I suspect for people running reverse proxy this still worked due to some change/manipulation???

In anycase, using requests.get I got a [] return, but with requests.post I got a valid response :)

Please update and test.

fredguy commented 10 years ago

almost there... I'm not sure if that relates to pp script or to nd though. Fri May 02 2014 09:36:43 Collection Jekyll.1x03.UNCUT.DVDRip XviD-FoV added to history INFO Fri May 02 2014 09:36:43 Cleaning up download queue for Jekyll.1x03.UNCUT.DVDRip XviD-FoV ERROR Fri May 02 2014 09:36:43 Post-process-script nzbToMedia/nzbToMedia.py for Jekyll.1x03.UNCUT.DVDRip XviD-FoV failed INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [ERROR]::MAIN: A problem was reported in the /usr/local/nzbget/share/nzbget/ppscripts/nzbToMedia/nzbToMedia.py script. INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [ERROR]::NZBDRONE: Server returned status 201 INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [POSTPROCESS]::NZBDRONE: } INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [POSTPROCESS]::NZBDRONE: "id": 101814 INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [POSTPROCESS]::NZBDRONE: "state": "pending", INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [POSTPROCESS]::NZBDRONE: "sendUpdatesToClient": false, INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [POSTPROCESS]::NZBDRONE: "stateChangeTime": "2014-05-02T07:36:43.335982Z", INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [POSTPROCESS]::NZBDRONE: "startedOn": "0001-01-01T00:00:00Z", INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [POSTPROCESS]::NZBDRONE: "name": "DownloadedEpisodesScan", INFO Fri May 02 2014 09:36:43 nzbToMedia: [09:36:43] [POSTPROCESS]::NZBDRONE: { INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [POSTPROCESS]::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/complete/tv/Jekyll.1x03.UNCUT.DVDRip XviD-FoV INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: NzbDrone:tv fork set to default INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: NzbDrone:tv fork auto-detection successful ... INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: Attempting to auto-detect tv fork INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: Calling NzbDrone:tv to post-process:Jekyll.1x03.UNCUT.DVDRip XviD-FoV.nzb INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: Auto-detected SECTION:NzbDrone INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: Script triggered from NZBGet (11.0 or later). INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: ######################################################### INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: ######################################################### INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [WARNING]::MAIN: Failed to locate ffprobe, video corruption detection disabled! INFO Fri May 02 2014 09:36:42 nzbToMedia: [09:36:42] [INFO]::MAIN: nzbToMedia Version:45883ab23854c69a4223fdecfbf555463605fb36 Branch:dev (Linux 3.2.40)

fredguy commented 10 years ago

Hey there, just wanted to give you a final update. I switched back to the dev branch and it seems like everything is back to normal. However, i had to delete the whole sickbeard section in the .spec file so that it wouldn't show up in the cfg file during processing. As soon as i did so, all went great. (Otherwise i had the SB vs ND issue both under using the same category. Changing the category in SB on nzbget would create a new section, but the Tv setion would be still there. )

Cheers.

clinton-hall commented 10 years ago

I understand that the .spec file will import the SickBeard TV section, but that should keep enabled = 0 and therefore shouldn't cause a conflict....

anyways, thanks for the feedback, I'll look through this again to check if there is anything that I can do.