clinton-hall / nzbToMedia

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

Just installed nzbtomedia, have an error in SAB: Sickbeard failed to postprocess. Sickbeard did not respond! #872

Closed wigwam12 closed 4 months ago

wigwam12 commented 8 years ago

Hi I edited my new nzbto script and set it up in SAB, disabling processing in Sickrage First file was processed last night and I see on SAB in history the following comment: Exit (1) Exception TypeError "Nonetype object is non collable" and here is the log. Could you please demystify this for me. As it happens the post-processing seems to have worked perfectly fine with the file placed just where it should: This is on Xpenology 5.2 with latest SAB and Sickrage

[03:27:13] [INFO]::MAIN: Loading config from [/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/autoProcessMedia.cfg] [03:27:13] [INFO]::MAIN: Checking database structure... [03:27:13] [INFO]::MAIN: Checking if source needs an update /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/libs/requests/packages/urllib3/connectionpool.py:768: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning) [03:27:14] [ERROR]::MAIN: Unknown current version number, don't know if we should update or not [03:27:14] [INFO]::MAIN: nzbToMedia Version:10.12 Branch:master (Linux 3.10.35) [03:27:14] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled! [03:27:14] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... [03:27:14] [INFO]::MAIN: ######################################################### [03:27:14] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ## [03:27:14] [INFO]::MAIN: ######################################################### [03:27:14] [INFO]::MAIN: Script triggered from SABnzbd Traceback (most recent call last): File "/usr/local/sickrage/var/SickRage/contrib/nzbToMedia/nzbToSickBeard.py", line 252, in result = nzbToMedia.main(sys.argv, section) File "/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/nzbToMedia.py", line 712, in main download_id='') File "/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/nzbToMedia.py", line 522, in process download_id = get_nzoid(inputName) File "/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/core/nzbToMediaUtil.py", line 829, in get_nzoid r = requests.get(url, params=params, verify=False, timeout=(30, 120)) File "/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/libs/requests/api.py", line 69, in get return request('get', url, params=params, _kwargs) File "/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/libs/requests/api.py", line 50, in request response = session.request(method=method, url=url, _kwargs) File "/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/libs/requests/sessions.py", line 455, in request prep = self.prepare_request(req) File "/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/libs/requests/sessions.py", line 386, in prepare_request hooks=merge_hooks(request.hooks, self.hooks), File "/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/libs/requests/models.py", line 293, in prepare self.prepare_url(url, params) File "/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/libs/requests/models.py", line 347, in prepare_url raise InvalidURL(*e.args) requests.exceptions.InvalidURL: Failed to parse: 192.168.0.20:8080:8080 Exception TypeError: "'NoneType' object is not callable" in <bound method PosixProcess.del of <core.nzbToMediaUtil.PosixProcess instance at 0x7f23bfbf8830>> ignored

wigwam12 commented 8 years ago

Actually I have just spotted that the post-processing appears to have been done by SickRage not SAB. I could have sworn blind I unticked it when I set all this up last night but looked at the SR log and it said post-processin complete and it was ticked so I don't know if SAB even tried.

Here is my script:

nzbToMedia Configuration

For more information, visit https://github.com/clinton-hall/nzbToMedia/wiki

[General]

Enable/Disable update notifications

version_notify = 1
# Enable/Disable automatic updates
auto_update = 0
# Set to the full path to the git executable
git_path =
# GitHUB user for repo
git_user =
# GitHUB branch for repo
git_branch =
# Enable/Disable forceful cleaning of leftover files following postprocess 
force_clean = 0
# Enable/Disable logging debug messages to nzbtomedia.log
log_debug = 0
# Enable/Disable logging database messages to nzbtomedia.log
log_db = 0
# Enable/Disable logging environment variables to debug nzbtomedia.log (helpful to track down errors calling external tools.)
log_env = 0
# Enable/Disable logging git output to debug nzbtomedia.log (helpful to track down update failures.)
log_git = 0
# Set to the directory where your ffmpeg/ffprobe executables are located
ffmpeg_path =
# Enable/Disable media file checking using ffprobe.
check_media = 1
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectories by mistake.
safe_mode = 1

[Posix]

Process priority setting for External commands (Extractor and Transcoder) on Posix (Unix/Linux/OSX) systems.

# Set the Niceness value for the nice command. These range from -20 (most favorable to the process) to 19 (least favorable to the process).
niceness = 0
# Set the ionice scheduling class. 0 for none, 1 for real time, 2 for best-effort, 3 for idle.
ionice_class = 0
# Set the ionice scheduling class data. This defines the class data, if the class accepts an argument. For real time and best-effort, 0-7 is valid data.
ionice_classdata = 0

[CouchPotato]

autoProcessing for Movies

#### movie - category that gets called for post-processing with CPS
[[movie]]
    enabled = 1
    apikey = API_Key
    host = 192.168.0.20:5050
    port = 5050
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    ssl = 0
    web_root =
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 1
    method = renamer
    delete_failed = 1
    wait_for = 2
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleteing ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if Couchpotato is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = /volume1/Downloads/complete/movies

[SickBeard]

autoProcessing for TV Series

#### tv - category that gets called for post-processing with SB
[[tv]]
    enabled = 1
    host = 192.168.0.20:8899
    port = 8899
    username = wigwam12
    password = ****
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    web_root =
    ssl = 0
    fork = auto
    delete_failed = 0
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    process_method =
    # force processing of already processed content when running a manual scan.
    force = 0
    extract = 1
    nzbExtractionBy = Downloader
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleteing ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if SickBeard is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = /volume1/Downloads/complete/tv

[NzbDrone]

autoProcessing for TV Series

#### ndCategory - category that gets called for post-processing with NzbDrone
[[tv]]
    enabled = 0
    apikey =
    host = localhost
    port = 8989
    username =
    password =
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    web_root =
    ssl = 0
    delete_failed = 0
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    extract = 1
    nzbExtractionBy = Downloader
    wait_for = 2
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleteing ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if NzbDrone is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir =

[HeadPhones]

autoProcessing for Music

#### music - category that gets called for post-processing with HP
[[music]]
    enabled = 0
    apikey =
    host = localhost
    port = 8181
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    ssl = 0
    web_root =
    wait_for = 2
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleteing ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if HeadPhones is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir =

[Mylar]

autoProcessing for Comics

#### comics - category that gets called for post-processing with Mylar
[[comics]]
    enabled = 0
    host = localhost
    port= 8090
    username=
    password=
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    web_root=
    ssl=0
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleteing ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if Mylar is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir =

[Gamez]

autoProcessing for Games

#### games - category that gets called for post-processing with Gamez
[[games]]
    enabled = 0
    apikey =
    host = localhost
    port = 8085
    ###### 
    library = Set to path where you want the processed games to be moved to.
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    ssl = 0
    web_root =
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleteing ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if Gamez is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir =

[Network]

Enter Mount points as LocalPath,RemotePath and separate each pair with '|'

# e.g. MountPoints = /volume1/Public/,E:|/volume2/share/,\NAS\
mount_points = 

[Nzb]

clientAgent - Supported clients: sabnzbd, nzbget
clientAgent = sabnzbd
###### SabNZBD (You must edit this if your using nzbToMedia.py with SabNZBD)
sabnzbd_host = 192.168.0.20:8080
sabnzbd_port = 8080
sabnzbd_apikey = API_Key
sabnzbd_username= wigwam12
sabnzbd_password= ****
###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.
default_downloadDirectory = /volume1/Downloads/complete/tv

[Torrent]

clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, vuze, other
clientAgent = transmission
###### useLink - Set to hard for physical links, sym for symbolic links, move to move, and no to not use links (copy)
useLink = hard
###### outputDirectory - Default output directory (categories will be appended as sub directory to outputDirectory)
outputDirectory = /abs/path/to/complete/
###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode. 
default_downloadDirectory = /volume1/Downloads/complete/movies
###### Other categories/labels defined for your downloader. Does not include CouchPotato, SickBeard, HeadPhones, Mylar categories.
categories = music_videos,pictures,software,manual
###### A list of categories that you don't want to be flattened (i.e preserve the directory structure when copying/linking.
noFlatten = pictures,manual
###### uTorrent Hardlink solution (You must edit this if your using TorrentToMedia.py with uTorrent)
uTorrentWEBui = http://localhost:8090/gui/
uTorrentUSR = your username
uTorrentPWD = your password
###### Transmission (You must edit this if your using TorrentToMedia.py with uTorrent)
TransmissionHost = localhost
TransmissionPort = 9091
TransmissionUSR = wigwam12
TransmissionPWD = ******
#### Deluge (You must edit this if your using TorrentToMedia.py with deluge. Note that the host/port is for the deluge daemon, not the webui)
DelugeHost = localhost
DelugePort = 58846
DelugeUSR = your username
DelugePWD = your password
###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
deleteOriginal = 0

[Extensions] compressedExtensions = .zip,.rar,.7z,.gz,.bz,.tar,.arj,.1,.01,.001 mediaExtensions = .mkv,.avi,.divx,.xvid,.mov,.wmv,.mp4,.mpg,.mpeg,.vob,.iso,.m4v audioExtensions = .mp3, .aac, .ogg, .ape, .m4a, .asf, .wma, .flac metaExtensions = .nfo,.sub,.srt,.jpg,.gif

[Plex] plex_host = localhost plex_port = 32400 plex_token = plex_ssl = 0

Enter Plex category to section mapping as Category,section and separate each pair with '|'

# e.g. plex_sections = movie,3|tv,4
plex_sections = 

[Transcoder]

getsubs. enable to download subtitles.

getSubs = 0
# subLanguages. create a list of languages in the order you want them in your subtitles. 
subLanguages = eng,spa,fra
# transcode. enable to use transcoder
transcode = 0
###### duplicate =1 will cretae a new file. =0 will replace the original
duplicate = 1
# concat. joins cd1 cd2 etc into a single video.
concat = 1
ignoreExtensions = .avi,.mkv,.mp4
# outputFastStart. 1 will use -movflags + faststart. 0 will disable this from being used.
outputFastStart = 0
# outputQualityPercent. used as -q:a value. 0 will disable this from being used.
outputQualityPercent = 0
# outputVideoPath. Set path you want transcoded videos moved to. Leave blank to disable.
outputVideoPath = 
# processOutput. 1 will send the outputVideoPath to SickBeard/CouchPotato. 0 will send original files.
processOutput = 0
# audioLanguage. set the 3 letter language code you want as your primary audio track.
audioLanguage = eng
# allAudioLanguages. 1 will keep all audio tracks (uses AudioCodec3) where available.
allAudioLanguages = 0
# allSubLanguages. 1 will keep all exisiting sub languages. 0 will discare those not in your list above.
allSubLanguages = 0
# embedSubs. 1 will embded external sub/srt subs into your video if this is supported.
embedSubs = 1
# burnInSubtitle. burns the default sub language into your video (needed for players that don't support subs)
burnInSubtitle = 0
# extractSubs. 1 will extract subs from the video file and save these as external srt files.
extractSubs = 0
# externalSubDir. set the directory where subs should be saved (if not the same directory as the video)
externalSubDir =
# hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg)
hwAccel = 0
# generalOptions. Enter your additional ffmpeg options here with commas to separate each option/value (i.e replace spaces with commas).
generalOptions =
# outputDefault. Loads default configs for the selected device. The remaining options below are ignored.
# If you want to use your own profile, leave this blank and set the remaining options below.
# outputDefault profiles allowed: iPad, iPad-1080p, iPad-720p, Apple-TV2, iPod, iPhone, PS3, xbox, Roku-1080p, Roku-720p, Roku-480p, mkv, mp4-scene-release
outputDefault =
#### Define custom settings below.
outputVideoExtension = .mp4
outputVideoCodec = libx264
VideoCodecAllow = 
outputVideoPreset = medium
outputVideoResolution = 1920:1080
outputVideoFramerate = 24
outputVideoBitrate = 800000
outputVideoCRF = 19
outputVideoLevel = 3.1
outputAudioCodec = ac3
AudioCodecAllow = 
outputAudioChannels = 6
outputAudioBitrate = 640k
outputAudioTrack2Codec = libfaac
AudioCodec2Allow = 
outputAudioTrack2Channels = 2 
outputAudioTrack2Bitrate = 128000
outputAudioOtherCodec = libmp3lame
AudioOtherCodecAllow = 
outputAudioOtherChannels =
outputAudioOtherBitrate = 128000
outputSubtitleCodec =

[WakeOnLan]

set wake = 1 to send WOL broadcast to the mac and test the server (e.g. xbmc) the host and port specified.
wake = 0
host = 192.168.1.37
port = 80
mac = 00:01:2e:2D:64:e1

[UserScript]

Use user_script for uncategorized downloads

#Set the categories to use external script.
#Use "UNCAT" to process non-category downloads, and "ALL" for all defined categories.
[[UNCAT]]
    #Enable/Disable this subsection category
    enabled = 0
    Torrent_NoLink = 0
    extract = 1
    #Enable if you are sending commands to a remote server for this category
    remote_path = 0
    #What extension do you want to process? Specify all the extension, or use "ALL" to process all files.
    user_script_mediaExtensions = .mkv,.avi,.divx,.xvid,.mov,.wmv,.mp4,.mpg,.mpeg
    #Specify the path to your custom script. Use "None" if you wish to link this category, but NOT run any external script.
    user_script_path = /nzbToMedia/userscripts/script.sh
    #Specify the argument(s) passed to script, comma separated in order.
    #for example FP,FN,DN, TN, TL for file path (absolute file name with path), file name, absolute directory name (with path), Torrent Name, Torrent Label/Category.
    #So the result is /media/test/script/script.sh FP FN DN TN TL. Add other arguments as needed eg -f, -r
    user_script_param = FN
    #Set user_script_runOnce = 0 to run for each file, or 1 to only run once (presumably on teh entire directory).
    user_script_runOnce = 0
    #Specify the successcodes returned by the user script as a comma separated list. Linux default is 0
    user_script_successCodes = 0
    #Clean after? Note that delay function is used to prevent possible mistake :) Delay is intended as seconds
    user_script_clean = 1
    delay = 120
    #Unique path (directory) created for every download. set 0 to disable.
    unique_path = 1
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir =

[ASCII]

Set convert =1 if you want to convert any "foreign" characters to ASCII (UTF8) before passing to SB/CP etc. Default is disabled (0).

convert = 0

[passwords]

enter the full path to a text file containing passwords to be used for extraction attempts.

# In the passwords file, every password should be on a new line
PassWordFile =

[Custom]

enter a list (comma separated) of Group Tags you want removed from filenames to help with subtitle matching.

# e.g remove_group = [rarbag],-NZBgeek
# be careful if your "group" is a common "real" word. Please report if you have any group replacments that would fall in this category.
remove_group = 
wigwam12 commented 8 years ago

looking at all the gobbledigook, my eye is drawn to the end when it says it can't resolve url 192.168.0.20:8080:8080 I suspect it is because I put the url as 192.168.0.20:8080 and also entered the port in the line below SO - I will edit the url as http:// without the :8080 and see if that works...

wigwam12 commented 8 years ago

well that got rid of one problem but it now gives me another error: Sickbeard failed to postprocess. Sickbeard did not respond!

Please help as I have exhausted my limited knowledge on what I could do to fix

[01:29:21] [INFO]::MAIN: Loading config from [/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/autoProcessMedia.cfg] [01:29:21] [INFO]::MAIN: Checking database structure... [01:29:21] [INFO]::MAIN: Checking if source needs an update /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/libs/requests/packages/urllib3/connectionpool.py:768: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning) [01:29:22] [ERROR]::MAIN: Unknown current version number, don't know if we should update or not [01:29:22] [INFO]::MAIN: nzbToMedia Version:10.12 Branch:master (Linux 3.10.35) [01:29:22] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled! [01:29:22] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... [01:29:22] [ERROR]::MAIN: Failed to connect to Transmission [01:29:22] [INFO]::MAIN: ######################################################### [01:29:22] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ## [01:29:22] [INFO]::MAIN: ######################################################### [01:29:22] [INFO]::MAIN: Script triggered from SABnzbd [01:29:22] [ERROR]::MAIN: Unable to open URL [01:29:23] [INFO]::MAIN: Auto-detected SECTION:SickBeard [01:29:23] [INFO]::MAIN: Calling SickBeard:tv to post-process:(name of show).nzb [01:29:23] [ERROR]::SICKBEARD: Server did not respond. Exiting [01:29:23] [ERROR]::MAIN: A problem was reported in the /usr/local/sickrage/var/SickRage/contrib/nzbToMedia/nzbToSickBeard.py script. SickBeard: Failed to post-process - SickBeard did not respond.!

clinton-hall commented 8 years ago

Same issue... In [SickBeard][[tv]] you have the port added to the SickBeard host. Remove this, as the port is specified in the port option.

wigwam12 commented 8 years ago

Hi Clinton. After spotting the url issue I edited the script to say just http://192.168.0.20 and just left the port in the port section. That's when the error changed to what it is above. I use http not https. Is there any setting in the script that is making it try to call https?

wigwam12 commented 8 years ago

This is what that section looks like now:

[SickBeard]

autoProcessing for TV Series

tv - category that gets called for post-processing with SB

[[tv]] enabled = 1 host = http://192.168.0.20 port = 8899 username = wigwam12 password = ****

ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING

web_root = ssl = 0 fork = sickrage delete_failed = 0

Enable/Disable linking for Torrents

Torrent_NoLink = 0 process_method =

force processing of already processed content when running a manual scan.

force = 0 extract = 1 nzbExtractionBy = Downloader

Set this to minimum required size to consider a media file valid (in MB)

minSize = 0

Enable/Disable deleteing ignored files (samples and invalid media files)

delete_ignored = 0

Enable if SickBeard is on a remote server for this category

remote_path = 0

Set to path where download client places completed downloads locally for this category

watch_dir = /volume1/Downloads/complete/tv

wigwam12 commented 8 years ago

Ditto for the sab section

wigwam12 commented 8 years ago

I have now changed to host = http://localhohst to see if that will make any difference

clinton-hall commented 8 years ago

Please enable debug logging and try again. This will show exactly what URL is being called.

wigwam12 commented 8 years ago

Okay I enabled debug logging and went for something I already have. The normal eror log is exacrtly the same as above in SAB but here is the debug log when I go into "status; show logging" - I cut and paste from where it executes the script: I don't see mention of the URL. (I enabled debugging in SAB but going into status, logging and clicking on +debug).

Running external script /usr/local/sickrage/var/SickRage/contrib/nzbToMedia/nzbToSickBeard.py(/volume1/Downloads/complete/tv/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION, The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION.nzb, The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION, , tv, alt.binaries.teevee, 0, ) 2015-11-08 22:49:39,304::DEBUG::[notifier:112] Sending registration to localhost:23053 2015-11-08 22:49:39,304::DEBUG::[notifier:102] Checking icon 2015-11-08 22:49:39,305::DEBUG::[notifier:219] To : localhost:23053 <<class 'gntp.GNTPRegister'>> 2015-11-08 22:49:39,305::DEBUG::[growler:193] Cannot register with Growl [Errno 111] Connection refused 2015-11-08 22:49:39,845::INFO::[postproc:543] Cleaning up The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION (keep_basic=False) 2015-11-08 22:49:39,845::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_CHs2q2 removed 2015-11-08 22:49:39,846::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_FFuO6A removed 2015-11-08 22:49:39,846::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_fZTqGL removed 2015-11-08 22:49:39,846::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_CMIlLj removed 2015-11-08 22:49:39,846::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_Kw707C removed 2015-11-08 22:49:39,846::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_P2ra7H removed 2015-11-08 22:49:39,847::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_LfPpJC removed 2015-11-08 22:49:39,847::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_8Lb84L removed 2015-11-08 22:49:39,847::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_WGp7Oa removed 2015-11-08 22:49:39,847::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_VIP3Dg removed 2015-11-08 22:49:39,847::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_KAayNK removed 2015-11-08 22:49:39,848::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_djrmUu removed 2015-11-08 22:49:39,848::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_AnJHKx removed 2015-11-08 22:49:39,848::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_UlMr8j removed 2015-11-08 22:49:39,848::INFO::[init:908] /volume1/Downloads/incomplete/The.Good.Wife.S07E01.1080p.HDTV.X264-DIMENSION/ADMIN/SABnzbd_nzf_ylSjJ9 removed 2015-11-08 22:49:39,852::INFO::[postproc:85] Saving postproc queue 2015-11-08 22:49:39,852::INFO::[init:919] Saving data for postproc1.sab in /usr/local/sabnzbd/var/admin/postproc1.sab 2015-11-08 22:49:39,852::INFO::[downloader:246] Post-processing finished, resuming download 2015-11-08 22:49:40,853::INFO::[nzbqueue:218] Saving queue 2015-11-08 22:49:40,854::INFO::[init:919] Saving data for queue9.sab in /usr/local/sabnzbd/var/admin/queue9.sab 2015-11-08 22:49:40,871::INFO::[init:919] Saving data for totals9.sab in /usr/local/sabnzbd/var/admin/totals9.sab 2015-11-08 22:49:40,871::INFO::[init:919] Saving data for rss_data.sab in /usr/local/sabnzbd/var/admin/rss_data.sab 2015-11-08 22:49:40,872::INFO::[init:919] Saving data for bookmarks.sab in /usr/local/sabnzbd/var/admin/bookmarks.sab 2015-11-08 22:49:40,872::INFO::[init:919] Saving data for Rating.sab in /usr/local/sabnzbd/var/admin/Rating.sab 2015-11-08 22:49:40,873::INFO::[init:919] Saving data for watched_data.sab in /usr/local/sabnzbd/var/admin/watched_data.sab 2015-11-08 22:49:40,873::INFO::[postproc:85] Saving postproc queue 2015-11-08 22:49:40,874::INFO::[init:919] Saving data for postproc1.sab in /usr/local/sabnzbd/var/admin/postproc1.sab 2015-11-08 22:49:40,874::INFO::[postproc:677] Queue has finished, launching: None (None)

clinton-hall commented 8 years ago

to enable debug logging, edit autoProcessMedia.cfg

[General]
    log_debug = 1
wigwam12 commented 8 years ago

Oops. Many thanks will sort tonight

wigwam12 commented 8 years ago

Here is the debug log. Frustratingly it doesn't seem to mention which URL it is trying to open:

2015-11-10 03:02:46 INFO ::MAIN: Loading config from [/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/autoProcessMedia.cfg] 2015-11-10 03:02:46 INFO ::MAIN: Checking database structure... 2015-11-10 03:02:46 DEBUG ::MAIN: Checking Initial Schema database upgrade 2015-11-10 03:02:46 DEBUG ::MAIN: InitialSchema upgrade not required 2015-11-10 03:02:46 INFO ::MAIN: Checking if source needs an update 2015-11-10 03:02:46 DEBUG ::MAIN: cur_commit = None % (newest_commit)= 1cd64053b0da1d351bb6af392e1ebb904c6b6ce2, num_commits_behind = 0 2015-11-10 03:02:46 ERROR ::MAIN: Unknown current version number, don't know if we should update or not 2015-11-10 03:02:46 INFO ::MAIN: nzbToMedia Version:10.12 Branch:master (Linux 3.10.35) 2015-11-10 03:02:46 WARNING ::MAIN: Failed to locate ffprobe. Video corruption detection disabled! 2015-11-10 03:02:46 WARNING ::MAIN: Install ffmpeg with x264 support to enable this feature ... 2015-11-10 03:02:46 DEBUG ::MAIN: Connecting to transmission: http://http://192.168.0.20:9091 2015-11-10 03:02:47 ERROR ::MAIN: Failed to connect to Transmission 2015-11-10 03:02:47 INFO ::MAIN: ######################################################### 2015-11-10 03:02:47 INFO ::MAIN: ## ..::[nzbToMedia.pyc]::.. ## 2015-11-10 03:02:47 INFO ::MAIN: ######################################################### 2015-11-10 03:02:47 DEBUG ::MAIN: Options passed into nzbToMedia: ['/usr/local/sickrage/var/SickRage/contrib/nzbToMedia/nzbToSickBeard.py', '/volume1/Downloads/complete/tv/Gotham.S02E08.1080p.HDTV.X264-DIMENSION', 'Gotham.S02E08.1080p.HDTV.X264-DIMENSION.nzb', 'Gotham.S02E08.1080p.HDTV.X264-DIMENSION', '', 'tv', 'alt.binaries.teevee', '0'] 2015-11-10 03:02:47 INFO ::MAIN: Script triggered from SABnzbd 2015-11-10 03:02:47 DEBUG ::MAIN: Searching for nzoid from SAbnzbd ... 2015-11-10 03:02:47 ERROR ::MAIN: Unable to open URL 2015-11-10 03:02:47 DEBUG ::MAIN: Adding NZB download info for directory /volume1/Downloads/complete/tv/Gotham.S02E08.1080p.HDTV.X264-DIMENSION to database 2015-11-10 03:02:47 INFO ::MAIN: Auto-detected SECTION:SickBeard 2015-11-10 03:02:47 DEBUG ::MAIN: Checking for archives to extract in directory: /volume1/Downloads/complete/tv/Gotham.S02E08.1080p.HDTV.X264-DIMENSION 2015-11-10 03:02:47 INFO ::MAIN: Calling SickBeard:tv to post-process:Gotham.S02E08.1080p.HDTV.X264-DIMENSION.nzb 2015-11-10 03:02:47 ERROR ::SICKBEARD: Server did not respond. Exiting 2015-11-10 03:02:47 ERROR ::MAIN: A problem was reported in the /usr/local/sickrage/var/SickRage/contrib/nzbToMedia/nzbToSickBeard.py script.

wigwam12 commented 8 years ago

Actually it just occurred to me. It is not able to connect to Transmission either and that url should be correct too. I seem to have made a small fundamental error here and cant for the life of me work out what!

clinton-hall commented 8 years ago

If SABnzbd and sickrage etc are on the same system, change the "host" to either "localhost" or "127.0.0.1" instead of the "192.168.0.20" See if that works?

wigwam12 commented 8 years ago

I've so far tried 192.168.0.20, localhost and http://localhost all with no joy. Will try 127.0.0.1

Yes they are both installed on the same machine. I've even given both root access.

clinton-hall commented 8 years ago

can you confirm what URL you use to view the home page of sickrage?

wigwam12 commented 8 years ago

Http://192.168.0.20:8899

Looking at the debug log I note I have to take out the http:// (I put it in when it wasn't working without it so wondered if that was needed but see it isn't as that is hopefully the reason Transmission is failing to connect)

wigwam12 commented 8 years ago

I set 192.168.0.20 as a fixed address in the router for the server

wigwam12 commented 8 years ago

Firstly, thank you again for your contined support. It looks like the last set of tweaks - and using just localhost for the url worked as I got a "post processing success!" Message in Sab :-)

Only oddity is in the destination folder the date last modified for this file is set to midnight 2010??

clinton-hall commented 8 years ago

SABnzbd has an option to ignore dates in extraction... by default unrar will extract files and folders with the date from when the rar archive was created.

drezdun commented 8 years ago

i have been having essentially the same problem with my setup as well. banging my head against the wall for days over this. following what was done here i finally got the script communicating with sabnzbd when the movies category is used, however its still not finding any imdb information on the movie and subsequently no renaming is occurring nor are the files being moved from my completed download folder to my separate movies hard drive as it should.

Its worth noting that the script works absolutely perfectly when handling tv downloads with sick rage

Hopefully someone here can help me?

heres the log file from a recent download:

[01:11:27] [INFO]::MAIN: Loading config from [E:\Libary\downloads\scripts\nzbToMedia-master\autoProcessMedia.cfg] [01:11:27] [INFO]::MAIN: Checking database structure... [01:11:27] [DEBUG]::MAIN: Checking Initial Schema database upgrade [01:11:27] [DEBUG]::MAIN: InitialSchema upgrade not required [01:11:27] [INFO]::MAIN: Checking if source needs an update [01:11:27] [DEBUG]::MAIN: cur_commit = None % (newest_commit)= 2d770510a284fadc6b44628626f5769789086dbb, num_commits_behind = 0 [01:11:27] [ERROR]::MAIN: Unknown current version number, don't know if we should update or not [01:11:27] [INFO]::MAIN: nzbToMedia Version:10.15 Branch:master (Windows 7) [01:11:27] [INFO]::MAIN: ######################################################### [01:11:27] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ## [01:11:27] [INFO]::MAIN: ######################################################### [01:11:27] [DEBUG]::MAIN: Options passed into nzbToMedia: ['E:\Libary\downloads\scripts\nzbToMedia-master\nzbToCouchPotato.py', 'e:\Libary\downloads\complete\X-Men 1 2000 720p Bluray AC3 x264 - AdiT', 'X-Men 1 2000 720p Bluray AC3 x264 - AdiT.nzb', 'X-Men 1 2000 720p Bluray AC3 x264 - AdiT', '', 'movie', 'alt.binaries.moovee', '0'] [01:11:27] [INFO]::MAIN: Script triggered from SABnzbd [01:11:27] [DEBUG]::MAIN: Searching for nzoid from SAbnzbd ... [01:11:27] [DEBUG]::MAIN: Found nzoid: SABnzbd_nzo_w_oi6x [01:11:27] [DEBUG]::MAIN: Adding NZB download info for directory e:\Libary\downloads\complete\X-Men 1 2000 720p Bluray AC3 x264 - AdiT to database [01:11:28] [INFO]::MAIN: Auto-detected SECTION:CouchPotato [01:11:28] [DEBUG]::MAIN: Checking for archives to extract in directory: e:\Libary\downloads\complete\X-Men 1 2000 720p Bluray AC3 x264 - AdiT [01:11:28] [INFO]::MAIN: Calling CouchPotato:movie to post-process:X-Men 1 2000 720p Bluray AC3 x264 - AdiT.nzb [01:11:29] [INFO]::MAIN: Attemping imdbID lookup for X-Men 1 2000 720p Bluray AC3 x264 - AdiT.nzb [01:11:29] [INFO]::MAIN: Searching folder and file names for imdbID ... [01:11:29] [INFO]::MAIN: Searching IMDB for imdbID ... [01:11:29] [DEBUG]::MAIN: Opening URL: http://www.omdbapi.com [01:11:29] [WARNING]::MAIN: Unable to find a imdbID for X-Men 1 2000 720p Bluray AC3 x264 - AdiT.nzb [01:11:29] [DEBUG]::MAIN: Opening URL: http://localhost:8082/api/c04fc0c2a4e24696a73bbb9493c3e2aa/media.list with PARAMS: {} [01:11:31] [DEBUG]::MAIN: calling command: E:\Libary\downloads\scripts\ffmpeg-20160825-01aee81-win64-static\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error E:\Libary\downloads\scripts\nzbToMedia-master\tests\test.mp4 [01:11:31] [INFO]::TRANSCODER: Checking [X-Men (2000) 720p Bluray AC3 x264 - AdiT.mkv] for corruption, please stand by ... [01:11:31] [DEBUG]::MAIN: calling command: E:\Libary\downloads\scripts\ffmpeg-20160825-01aee81-win64-static\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error e:\Libary\downloads\complete\X-Men 1 2000 720p Bluray AC3 x264 - AdiT\X-Men (2000) 720p Bluray AC3 x264 - AdiT.mkv [01:11:31] [INFO]::TRANSCODER: SUCCESS: [X-Men (2000) 720p Bluray AC3 x264 - AdiT.mkv] has no corruption. [01:11:31] [DEBUG]::COUCHPOTATO: Opening URL: http://localhost:8082/api/c04fc0c2a4e24696a73bbb9493c3e2aa/renamer.scan with PARAMS: {'download_id': u'SABnzbd_nzo_w_oi6x', 'media_folder': 'e:\Libary\downloads\complete\X-Men 1 2000 720p Bluray AC3 x264 - AdiT', 'downloader': 'sabnzbd'} [01:11:31] [POSTPROCESS]::COUCHPOTATO: Starting renamer scan for X-Men 1 2000 720p Bluray AC3 x264 - AdiT.nzb [01:11:32] [POSTPROCESS]::COUCHPOTATO: SUCCESS: Finished renamer scan for folder e:\Libary\downloads\complete\X-Men 1 2000 720p Bluray AC3 x264 - AdiT [01:11:32] [POSTPROCESS]::COUCHPOTATO: Checking for status change, please stand by ... [01:11:32] [DEBUG]::MAIN: Opening URL: http://localhost:8082/api/c04fc0c2a4e24696a73bbb9493c3e2aa/media.list with PARAMS: {} [01:11:34] [POSTPROCESS]::COUCHPOTATO: SUCCESS: Movie None has now been added to CouchPotato [01:11:34] [INFO]::CLEANDIRS: Directory e:\Libary\downloads\complete\X-Men 1 2000 720p Bluray AC3 x264 - AdiT still contains 1 unprocessed file(s), skipping ... [01:11:34] [INFO]::MAIN: The E:\Libary\downloads\scripts\nzbToMedia-master\nzbToCouchPotato.py script completed successfully. CouchPotato: Successfully post-processed X-Men 1 2000 720p Bluray AC3 x264 - AdiT.nzb!

and the (i think) relevant sections of settings from nzbtomedia config file: [Nzb]

clientAgent - Supported clients: sabnzbd, nzbget
clientAgent = sabnzbd
###### SabNZBD (You must edit this if your using nzbToMedia.py with SabNZBD)
sabnzbd_host = 192.168.0.110
sabnzbd_port = 8080
sabnzbd_apikey = my api key
###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.
default_downloadDirectory = E:\Libary\downloads\complete

[CouchPotato]

autoProcessing for Movies

#### movie - category that gets called for post-processing with CPS
[[movie]]
    enabled = 1
    apikey = my api key
    host = localhost
    port = 8082
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    ssl = 0
    web_root = ""
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    keep_archive = 1
    method = renamer
    delete_failed = 0
    wait_for = 2
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 1
    ##### Enable if Couchpotato is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = E:\Libary\downloads\complete