mdhiggins/sickbeard_mp4_automator

Latest git pull non convert

Closed this issue · 64 comments

I have simple Debian 10 setup with your outstanding scripts, with latest git pull non of my conversions are working. Nothing in the logs!

snaky

Try running manual.py and see if you get any error, if the logs aren't producing anything its probably some sort of import error

Will try it now,
Post-process-script NZBGetPostProcess.py for The.xxxx.xxxxdict.xxxiety.S01E08.xxxx-xxxusta failed (terminated with unknown status)

Thats from the NZBget log

Manual processor started.
Python 64-bit 3.7.3 (default, Jan 22 2021, 20:04:44) 
[GCC 8.3.0].
Guessit version: 3.3.1.
/usr/bin/python3
Loading config file /home/owner/.sickchill/sickbeard_mp4_automator/config/autoProcess.ini.
Pymediainfo exception.
Traceback (most recent call last):
  File "/home/owner/.sickchill/sickbeard_mp4_automator/resources/mediaprocessor.py", line 313, in isValidSource
    media_info = MediaInfo.parse(inputfile)
  File "/home/owner/.local/lib/python3.7/site-packages/pymediainfo/__init__.py", line 431, in parse
    lib, handle, lib_version_str, lib_version = cls._get_library(library_file)
  File "/home/owner/.local/lib/python3.7/site-packages/pymediainfo/__init__.py", line 331, in _get_library
    ", ".join(library_paths), ", ".join(exceptions)
OSError: Failed to load library from libmediainfo.so.0 - libmediainfo.so.0: cannot open shared object file: No such file or directory
Unable to retrieve rating.
Matched TV episode as The xxxxxxxxty (TMDB ID: 1xxxxxxx) S01E07

This a Problem?

Just tried a manual.py and it worked!

Yeah the one error there is from pymediainfo which is optional. What workflow isn't working?

After the download from NZBget process seems to stall and never goes into the directory and starts the conversion. It was fine until I did the git pull quite a few hours ago.
Already tried restarting sickchill a few times no luck, Maybe I will clear the .pyc files again, brb

That did not help still no logs!

nzbget log

NZBGetPostProcess: ImportError: cannot import name 'autoProcessMovie' from 'autoprocess' (/home/owner/.sickchill/sickbeard_mp4_automator/autoprocess/init.py)

Solved it I think, I did a new install "git clone" reinstalled all pip3 programs testing now!

Crap now tagging isn't working!

Any logs?

yes, I will grab them

2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Script triggered from NZBGet (11.0 or later).
2021-08-10 01:51:24 - resources.readsettings - INFO - /usr/bin/python3
2021-08-10 01:51:24 - resources.readsettings - INFO - Loading config file /home/owner/.sickchill/sickbeard_mp4_automator/config/autoProcess.ini.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Processing file /var/lib/mythtv/videos/Flix/tvtime/Ghosts.2019.S03E01.1080p.HEVC.x265-MeGusta/6ab28a7652f800a166101bcde
f8c2238.mkv.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Input Data
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - {
    "format": "matroska,webm",
    "format-fullname": "Matroska / WebM",
    "video": {
        "index": 0,
        "codec": "hevc",
        "pix_fmt": "yuv420p10le",
        "profile": "main10",
        "fps": 25.0,
        "framedata": {
            "pix_fmt": "yuv420p10le",
            "color_space": "bt709",
            "color_primaries": "bt709",
            "color_transfer": "bt709"
        },
        "dimensions": "1920x1080",
        "level": 4.0,
        "field_order": "progressive"
    },
    "audio": [
        {
            "index": 1,
            "codec": "aac",
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
        }
    ],
    "subtitle": [],
    "attachment": []
}
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Reading video stream.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Video codec detected: hevc.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Pix Fmt: yuv420p10le.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Profile: main10.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Video codec parameters None.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Creating copy video stream from source stream 0.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Reading audio streams.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Audio detected for stream 1 - aac eng 6 channel.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Creating ac3 audio stream from source stream 1.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Creating aac audio stream from source audio stream 1 [universal-audio].
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Copying audio stream from source stream 1 format aac [audio-copy-original].
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Default audio stream set to eng ac3 6 channel stream [default-more-channels: True].
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Reading subtitle streams.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Attempting to download subtitles.
2021-08-10 01:51:24 - NZBGetPostProcess - ERROR - Unable to download subtitles.
Traceback (most recent call last):
  File "/home/owner/.sickchill/sickbeard_mp4_automator/resources/mediaprocessor.py", line 1421, in downloadSubtitles
    subtitles = subliminal.download_best_subtitles([video], languages, hearing_impaired=self.settings.hearing_impaired, providers=self.settings.subproviders, provider_configs=self.settings.subproviders_auth)
  File "/home/owner/.local/lib/python3.7/site-packages/subliminal/core.py", line 651, in download_best_subtitles
    subtitles = pool.download_best_subtitles(pool.list_subtitles(video, languages - video.subtitle_languages),
  File "/home/owner/.local/lib/python3.7/site-packages/subliminal/core.py", line 139, in list_subtitles
    provider_subtitles = self.list_subtitles_provider(name, video, languages)
  File "/home/owner/.local/lib/python3.7/site-packages/subliminal/core.py", line 102, in list_subtitles_provider
    if not provider_manager[provider].plugin.check(video):
  File "/home/owner/.local/lib/python3.7/site-packages/stevedore/extension.py", line 355, in __getitem__
    return self._extensions_by_name[name]
KeyError: 'addic7ed'
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Tagging copied video stream as hvc1
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Output Data2021-08-10 01:51:24 - NZBGetPostProcess - INFO - {
    "source": [
        "/var/lib/mythtv/videos/Flix/tvtime/Ghosts.2019.S03E01.1080p.HEVC.x265-MeGusta/6ab28a7652f800a166101bcdef8c2238.mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "copy",
        "map": 0,
        "bitrate": 906.173,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "preset": null,
        "pix_fmt": null,
        "field_order": "progressive",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": null,
        "title": "FHD",
        "debug": "video"
    },
    "audio": [
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 96,
            "samplerate": null,
            "sampleformat": "",
            "filter": "pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE",
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "title": "Stereo",
            "debug": "universal-audio"
        },
        {
            "map": 1,
            "codec": "ac3",
            "channels": 6,
            "bitrate": 384,
            "filter": null,
            "samplerate": null,
            "sampleformat": "",
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "bsf": null,
            "title": "5.1 Channel",
            "debug": "audio"
        },
        {
            "map": 1,
            "codec": "copy",
            "channels": 6,
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "title": "5.1 Channel",
            "debug": "audio-copy-original"
        }
    ],
    "subtitle": [],
    "attachment": []
}
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Preopts
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - []
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Postopts
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - ["-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA",
    "-tag:v",
    "hvc1"
]
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Downloaded Subtitles
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - []
2021-08-10 01:51:24 - NZBGetPostProcess - INFO - Starting conversion.
2021-08-10 01:51:25 - NZBGetPostProcess - INFO - FFmpeg command:
2021-08-10 01:51:25 - NZBGetPostProcess - INFO - ======================
2021-08-10 01:51:25 - NZBGetPostProcess - INFO - /home/owner/.sickchill/sickbeard_mp4_automator/ffmpeg/ffmpeg -i /var/lib/mythtv/videos/Flix/tvtime/Ghosts.2019.S03E01.1080p.HEVC.x265-MeGusta/6ab28a7652f800a166101bcdef8c2238.mkv -vcodec copy -map 0:0 -metadata:s:v title=FHD -metadata:s:v handler_name=FHD -c:a:0 aac -map 0:1 -ac:a:0 2 -b:a:0 96k -metadata:s:a:0 BPS=96000 -metadata:s:a:0 BPS-eng=96000 -filter:a:0 pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE -metadata:s:a:0 title=Stereo -metadata:s:a:0 handler_name=Stereo -metadata:s:a:0 language=eng -disposition:a:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c:a:1 ac3 -map 0:1 -ac:a:1 6 -b:a:1 384k -metadata:s:a:1 BPS=384000 -metadata:s:a:1 BPS-eng=384000 -metadata:s:a:1 "title=5.1 Channel" -metadata:s:a:1 "handler_name=5.1 Channel" -metadata:s:a:1 language=eng -disposition:a:1 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:a:2 copy -map 0:1 -metadata:s:a:2 "title=5.1 Channel" -metadata:s:a:2 "handler_name=5.1 Channel" -metadata:s:a:2 language=eng -disposition:a:2 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -tag:v hvc1 -y /var/lib/mythtv/videos/Flix/tvtime/Ghosts.2019.S03E01.1080p.HEVC.x265-MeGusta/6ab28a7652f800a166101bcdef8c2238.mp4
2021-08-10 01:51:25 - NZBGetPostProcess - INFO - ======================
2021-08-10 01:51:26 - NZBGetPostProcess - INFO - 0
...
2021-08-10 01:51:59 - NZBGetPostProcess - INFO - 100
2021-08-10 01:51:59 - NZBGetPostProcess - INFO - /var/lib/mythtv/videos/Flix/tvtime/Ghosts.2019.S03E01.1080p.HEVC.x265-MeGusta/6ab28a7652f800a166101bcdef8c2238.mp4 created.
2021-08-10 01:51:59 - NZBGetPostProcess - INFO - Successfully processed /var/lib/mythtv/videos/Flix/tvtime/Ghosts.2019.S03E01.1080p.HEVC.x265-MeGusta/6ab28a7652f800a166101bcdef8c2238.mkv.
2021-08-10 01:51:59 - autoprocess.autoProcessTVSR - INFO - Opening URL: http://localhost:8081/api/*****/.
2021-08-10 01:51:59 - autoprocess.autoProcessTVSR - INFO - b'{"data": {}, "message": "Started post-process for /var/lib/mythtv/videos/Flix/tvtime/Ghosts.2019.S03E01.1080p.HEVC.x265-MeGusta", "result": "success"}'

Thats sma.log

Everything here looks like it worked appropriately

NZBGetPostProcess never did tagging and isn't supposed to, it should now notify Sickrage/chill which should move, rename, then tag

Are there any errors in the logs of Sickrage/chill? Is the file being moved/renamed?

Different file but similar issue,

2021-08-11 05:25:17 INFO :: POSTPROCESSOR-AUTO :: Auto post processing task for /var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta completed 2021-08-11 05:25:17 INFO :: POSTPROCESSOR-AUTO :: Deleting folder: /var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta 2021-08-11 05:25:17 INFO :: POSTPROCESSOR-AUTO :: Processing succeeded for /var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta/d6820383441406335714dddb257ab038.mp4 2021-08-11 05:25:16 INFO :: POSTPROCESSOR-AUTO :: Executing command: ['//usr/bin/python', '//home//owner//.sickchill//sickbeard_mp4_automator//postSickbeard.py', '/var/lib/media/videos/TV/Superman & Lois/Season 01/Superman.and.Lois.01x14.The.Eradicator.mp4', '/var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta/d6820383441406335714dddb257ab038.mp4', '375655', '1', '14', '2021-08-10'] 2021-08-11 05:25:12 INFO :: POSTPROCESSOR-AUTO :: Processing /var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta/d6820383441406335714dddb257ab038.mp4 (None) 2021-08-11 05:25:12 INFO :: POSTPROCESSOR-AUTO :: Processing /var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta 2021-08-11 05:25:12 INFO :: POSTPROCESSOR-AUTO :: Beginning auto post processing task: /var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta 2021-08-11 05:25:12 INFO :: WEBSERVER :: Auto post processing task for /var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta was added to the queue 2021-08-11 04:34:18 INFO :: SHOWQUEUE-FORCE-UPDATE :: Metadata writer is unable to find episode 1x0 of Superman & Lois on theTVDB...has it been removed? Should I delete from db? 2021-08-11 04:34:18 INFO :: SHOWQUEUE-FORCE-UPDATE :: Could not find any season_banner images on Fanart.tv for Superman & Lois 2021-08-11 04:34:17 INFO :: SHOWQUEUE-FORCE-UPDATE :: Could not find any season_banner images on Fanart.tv for Superman & Lois 2021-08-11 04:34:15 INFO :: SHOWQUEUE-FORCE-UPDATE :: Metadata writer is unable to find episode 1x0 of Superman & Lois on theTVDB...has it been removed? Should I delete from db? 2021-08-11 04:34:14 INFO :: SHOWQUEUE-FORCE-UPDATE :: Performing refresh on Superman & Lois 

no tagging or metadata strange Im the only one with the problem!

Trying running that command manually and see if it gives you an error

/usr/bin/python /home/owner/.sickchill/sickbeard_mp4_automator/postSickbeard.py '/var/lib/media/videos/TV/Superman & Lois/Season 01/Superman.and.Lois.01x14.The.Eradicator.mp4' '/var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta/d6820383441406335714dddb257ab038.mp4' 375655 1 14 2021-08-10
/usr/bin/python /home/owner/.sickchill/sickbeard_mp4_automator/postSickbeard.py '/var/lib/media/videos/TV/Superman & Lois/Season 01/Superman.and.Lois.01x14.The.Eradicator.mp4' '/var/lib/mythtv/videos/Flix/tvtime/Superman.and.Lois.S01E14.720p.HEVC.x265-MeGusta/d6820383441406335714dddb257ab038.mp4' 375655 1 14 2021-08-10
Traceback (most recent call last):
  File "/home/owner/.sickchill/sickbeard_mp4_automator/postSickbeard.py", line 12, in <module>
    from resources.metadata import MediaType
  File "/home/owner/.sickchill/sickbeard_mp4_automator/resources/metadata.py", line 3, in <module>
    import requests
ImportError: No module named requests
owner@HpServ:~/media/videos/TV/Destination Fear/Season 03$ pip3 install requests
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.21.0)
owner@HpServ:~/media/videos/TV/Destination Fear/Season 03$ sudo pip3 install requests
[sudo] password for owner: 
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.21.0)

Try running /usr/bin/python3 instead of /usr/bin/python since you're installing under pip3

2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Reading video stream.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Video codec detected: hevc.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p10le.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Profile: main10.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Video codec parameters None.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Reading audio streams.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Audio detected for stream 1 - aac und 2 channel.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Creating copy audio stream from source stream 1.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Audio detected for stream 2 - ac3 und 6 channel.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Creating copy audio stream from source stream 2.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Creating aac audio stream from source audio stream 2 [universal-audio].
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Default audio stream set to und copy 6 channel stream [default-more-channels: True].
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Reading subtitle streams.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Attempting to download subtitles.
2021-08-13 06:49:31 - resources.mediaprocessor - ERROR - Unable to download subtitles.
Traceback (most recent call last):
  File "/home/owner/.sickchill/sickbeard_mp4_automator/resources/mediaprocessor.py", line 1421, in downloadSubtitles
    subtitles = subliminal.download_best_subtitles([video], languages, hearing_impaired=self.settings.hearing_impaired, providers=self.settings.subproviders, provider_configs=self.settings.subproviders_auth)
  File "/home/owner/.local/lib/python3.7/site-packages/subliminal/core.py", line 651, in download_best_subtitles
    subtitles = pool.download_best_subtitles(pool.list_subtitles(video, languages - video.subtitle_languages),
  File "/home/owner/.local/lib/python3.7/site-packages/subliminal/core.py", line 139, in list_subtitles
    provider_subtitles = self.list_subtitles_provider(name, video, languages)
  File "/home/owner/.local/lib/python3.7/site-packages/subliminal/core.py", line 102, in list_subtitles_provider
    if not provider_manager[provider].plugin.check(video):
  File "/home/owner/.local/lib/python3.7/site-packages/stevedore/extension.py", line 355, in __getitem__
    return self._extensions_by_name[name]
KeyError: 'addic7ed'
2021-08-13 06:49:31 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2021-08-13 06:49:31 - resources.mediaprocessor - INFO - Tagging copied video stream as hvc1
2021-08-13 06:49:31 - resources.mediaprocessor - INFO - Input and output extensions are the same so passing back the original file [process-same-extensions: False].
2021-08-13 06:49:31 - resources.mediaprocessor - INFO - Bypassing conversion and setting outputfile to inputfile.
2021-08-13 06:49:33 - resources.mediaprocessor - INFO - Tagging /var/lib/media/videos/TV/Superman & Lois/Season 01/Superman.and.Lois.01x14.The.Eradicator.mp4 with TMDB ID 95057.
2021-08-13 06:49:33 - resources.metadata - INFO - Tagging file: /var/lib/media/videos/TV/Superman & Lois/Season 01/Superman.and.Lois.01x14.The.Eradicator.mp4.
2021-08-13 06:49:35 - resources.metadata - INFO - Trying to write tags.
2021-08-13 06:49:35 - resources.metadata - INFO - Tags written successfully using mutagen.
2021-08-13 06:49:36 - resources.mediaprocessor - INFO - Relocating MOOV atom to start of file.
2021-08-13 06:49:36 - qtfaststart - INFO - Removing free atom at 28 (8 bytes)
2021-08-13 06:49:36 - qtfaststart - INFO - Patching stco with 57513 entries
2021-08-13 06:49:36 - qtfaststart - INFO - Patching stco with 94737 entries
2021-08-13 06:49:36 - qtfaststart - INFO - Patching stco with 74964 entries
2021-08-13 06:49:36 - qtfaststart - INFO - Writing output...

Oops let me see if I can get all of it!

2021-08-13 06:49:28 - SickbeardPostProcess - INFO - Sickbeard extra script post processing started.
2021-08-13 06:49:28 - resources.readsettings - INFO - /usr/bin/python3
2021-08-13 06:49:28 - resources.readsettings - INFO - Loading config file /home/owner/.sickchill/sickbeard_mp4_automator/config/autoProcess.ini.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Processing /var/lib/media/videos/TV/Superman & Lois/Season 01/Superman.and.Lois.01x14.The.Eradicator.mp4.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Input Data
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - {
    "format": "mov,mp4,m4a,3gp,3g2,mj2",
    "format-fullname": "QuickTime / MOV",
    "video": {
        "index": 0,
        "codec": "hevc",
        "bitrate": 605024,
        "pix_fmt": "yuv420p10le",
        "profile": "main10",
        "fps": 23.976023976023978,
        "framedata": {
            "pix_fmt": "yuv420p10le"
        },
        "dimensions": "1280x580",
        "level": 3.1,
        "field_order": "unknown"
    },
    "audio": [
        {
            "index": 1,
            "codec": "aac",
            "bitrate": 96391,
            "channels": 2,
            "samplerate": 48000,
            "language": "und",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
        },
        {
            "index": 2,
            "codec": "ac3",
            "bitrate": 384000,
            "channels": 6,
            "samplerate": 48000,
            "language": "und",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
        }
    ],
    "subtitle": [],
    "attachment": []
}
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Reading video stream.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Video codec detected: hevc.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p10le.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Profile: main10.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Video codec parameters None.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Reading audio streams.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Audio detected for stream 1 - aac und 2 channel.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Creating copy audio stream from source stream 1.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Audio detected for stream 2 - ac3 und 6 channel.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Creating copy audio stream from source stream 2.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Creating aac audio stream from source audio stream 2 [universal-audio].
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Default audio stream set to und copy 6 channel stream [default-more-channels: True].
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Reading subtitle streams.
2021-08-13 06:49:30 - resources.mediaprocessor - INFO - Attempting to download subtitles.
2021-08-13 06:49:31 - resources.mediaprocessor - ERROR - Unable to download subtitles.
Traceback (most recent call last):
  File "/home/owner/.sickchill/sickbeard_mp4_automator/resources/mediaprocessor.py", line 1421, in downloadSubtitles
    subtitles = subliminal.download_best_subtitles([video], languages, hearing_impaired=self.settings.hearing_impaired, providers=self.settings.subproviders, provider_configs=self.settings.subproviders_auth)
  File "/home/owner/.local/lib/python3.7/site-packages/subliminal/core.py", line 651, in download_best_subtitles
    subtitles = pool.download_best_subtitles(pool.list_subtitles(video, languages - video.subtitle_languages),
  File "/home/owner/.local/lib/python3.7/site-packages/subliminal/core.py", line 139, in list_subtitles
    provider_subtitles = self.list_subtitles_provider(name, video, languages)
  File "/home/owner/.local/lib/python3.7/site-packages/subliminal/core.py", line 102, in list_subtitles_provider
    if not provider_manager[provider].plugin.check(video):
  File "/home/owner/.local/lib/python3.7/site-packages/stevedore/extension.py", line 355, in __getitem__
    return self._extensions_by_name[name]
KeyError: 'addic7ed'
2021-08-13 06:49:31 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2021-08-13 06:49:31 - resources.mediaprocessor - INFO - Tagging copied video stream as hvc1
2021-08-13 06:49:31 - resources.mediaprocessor - INFO - Input and output extensions are the same so passing back the original file [process-same-extensions: False].
2021-08-13 06:49:31 - resources.mediaprocessor - INFO - Bypassing conversion and setting outputfile to inputfile.
2021-08-13 06:49:33 - resources.mediaprocessor - INFO - Tagging /var/lib/media/videos/TV/Superman & Lois/Season 01/Superman.and.Lois.01x14.The.Eradicator.mp4 with TMDB ID 95057.
2021-08-13 06:49:33 - resources.metadata - INFO - Tagging file: /var/lib/media/videos/TV/Superman & Lois/Season 01/Superman.and.Lois.01x14.The.Eradicator.mp4.
2021-08-13 06:49:35 - resources.metadata - INFO - Trying to write tags.
2021-08-13 06:49:35 - resources.metadata - INFO - Tags written successfully using mutagen.
2021-08-13 06:49:36 - resources.mediaprocessor - INFO - Relocating MOOV atom to start of file.
2021-08-13 06:49:36 - qtfaststart - INFO - Removing free atom at 28 (8 bytes)
2021-08-13 06:49:36 - qtfaststart - INFO - Patching stco with 57513 entries
2021-08-13 06:49:36 - qtfaststart - INFO - Patching stco with 94737 entries
2021-08-13 06:49:36 - qtfaststart - INFO - Patching stco with 74964 entries
2021-08-13 06:49:36 - qtfaststart - INFO - Writing output...

Seems to work from the command line

So all fixed?

Nope does work with Sickchill only with manual.py!

What is your sick chill post process configuration exactly?

Looks like someone else is having issues with requests not being imported / installed

No idea why that would be

@kr889063 @mediacowboy Were there any errors during the application of the SMA-mod?

The requests library is installed in the virtual environment during the startup process by https://github.com/mdhiggins/sma-mod/blob/master/root/etc/cont-init.d/90-sma-config with the line https://github.com/mdhiggins/sma-mod/blob/42271ebd18ecce99c1da0c1242e0a3c45c7f1689/root/etc/cont-init.d/90-sma-config#L38

This corresponds to https://github.com/mdhiggins/sickbeard_mp4_automator/blob/master/setup/requirements.txt with requests being the first package on there

If there was a problem with pip maybe that caused requests to not be installed but otherwise I can't imagine why that library wouldn't be available

@snakerman situation is a little different since I don't believe this is a docker setup, I suspect that it's an issue with multiple python environments in that case but for the docker the only way it would be an issue is if you weren't executing with the virtual environment

@mediacowboy please double check and ensure you're using SABPostProcess.sh and not SABPostProcess.py since that would cause this error but this does not apply to @snakerman unless you're using the mod as well

No errors with the 90-sma-sonfig.

Also double checked and verified I am using the SABPostProcess.sh file.

Can you try and run
/usr/local/sma/venv/bin/pip install requests from inside the docker container and see if that does anything?

I guess also see if
/usr/local/sma/venv/bin/pip3 install requests produces any different results

@mdhiggins

root@df4af27cf901:~# python3 /usr/local/sma/venv/bin/pip3 install requests
Requirement already satisfied: requests in /usr/local/lib/python3.8/dist-packages (2.26.0)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests) (3.2)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests) (2021.5.30)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.8/dist-packages (from requests) (2.0.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests) (1.26.6)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@df4af27cf901:~# python3 /usr/local/sma/venv/bin/pip install requests
Requirement already satisfied: requests in /usr/local/lib/python3.8/dist-packages (2.26.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests) (1.26.6)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.8/dist-packages (from requests) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests) (3.2)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests) (2021.5.30)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Hm very strange so requests is already installed

Try editing SABPostProcess.py and add
print(sys.executable) on line 3 right after import sys

This should print out what python executable is being used (won't be in the log files but should show up in SAB's logs before the exception). Will help see if its being executed using the correct virtual environment

So I am not seeing in the sab logs or any logs the print(sys.executable)

SABnzbd version: 3.3.1

/usr/local/sma/venv/bin/python3 Traceback (most recent call last): File "/usr/local/sma/SABPostProcess.py", line 9, in <module> from resources.mediaprocessor import MediaProcessor File "/usr/local/sma/resources/mediaprocessor.py", line 12, in <module> from resources.metadata import Metadata, MediaType File "/usr/local/sma/resources/metadata.py", line 3, in <module> import requests ModuleNotFoundError: No module named 'requests'

I think I found it

If you run the following command outside of docker and replace <container name> with your SAB container

docker exec -it --user abc <container name> /usr/local/sma/venv/bin/python

That should bring up the python terminal as your abc user

Then try typing import requests and see if you get an error

Leave the user as abc, don't change that

docker exec -it --user abc sabnzbd /usr/local/sma/venv/bin/python
Python 3.8.10 (default, Jun  2 2021, 10:49:15) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'requests'

Alright try the following

docker exec -it <container> /usr/local/sma/venv/bin/pip3 uninstall requests
docker exec -it <container> chown abc:abc -R /usr/local/sma
docker exec -it --user abc <container> /usr/local/sma/venv/bin/pip3 install requests

Then try the
docker exec -it --user abc <container name> /usr/local/sma/venv/bin/python and import requests again and see if that works

This is what I got on the first command.

docker exec -it sabnzbd /usr/local/sma/venv/bin/pip3 uninstall requests

Traceback (most recent call last):
  File "/usr/local/sma/venv/bin/pip3", line 7, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'

Tried exactly as you wrote it and tried without the 3 in on the pip

I wonder if you should just delete your /usr/local/sma folder and restart the container, seems the python install is messed up

That should kick off a reinstall of the script and virtual environment

That may have done it. I removed my sabnzbd container. Deleted all the files except my config in the sma folder. Then reran my compose and it seems that these commands work now. I will try grabbing something and see what happens.

docker exec -it --user abc sabnzbd /usr/local/sma/venv/bin/python
import requests

Nice, yeah for whatever reason it looked like your pip installation was corrupted and that may have had downstream effects on all packages that it was installing, including requests I guess, weird but hopefully fixed

Well one step forward and one step backwards.

Traceback (most recent call last):
File "/usr/local/sma/SABPostProcess.py", line 8, in <module>
from resources.mediaprocessor import MediaProcessor
File "/usr/local/sma/resources/mediaprocessor.py", line 12, in <module>
from resources.metadata import Metadata, MediaType
File "/usr/local/sma/resources/metadata.py", line 12, in <module>
import tmdbsimple as tmdb
ModuleNotFoundError: No module named 'tmdbsimple'

Tried to do an import after getting the above error in Sab and yeah.

>>> import tmdbsimple
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tmdbsimple'

Are you certain the setup process completed before you tried doing stuff? It can be kind of slow, check the container logs to make sure it was finished

Are you certain the setup process completed before you tried doing stuff? It can be kind of slow, check the container logs to make sure it was finished

Let me try the whole thing again

I just made a container using linuxservers' SABNZBD (I don't use it on my normal setup) with a fresh pull and SMA mod and I can run the follwing

root@server:~# docker exec -it --user abc sabnzbd /usr/local/sma/venv/bin/python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> import tmdbsimple
>>>

No errors

I just made a container using linuxservers' SABNZBD (I don't use it on my normal setup) with a fresh pull and SMA mod and I can run the follwing

root@server:~# docker exec -it --user abc sabnzbd /usr/local/sma/venv/bin/python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> import tmdbsimple
>>>

No errors

Yeah I redid everything again I like i said further up and let it restart. I was able to run the script within SAB with no problems for a tv episode and a movie.

Weird but it's working again so... YAY

Good stuff, glad its working

Good stuff, glad its working

Me too. Now to go fix everything that the script didn't work on. :(

Did you ever get Sonarr and Radarr scripts to run correctly? I saw your comment of giving up.

Not sure what you're referring to

@mdhiggins,

The post sonarr and radarr scripts for the mod.

https://github.com/mdhiggins/sma-mod/tree/master/extras

They should work fine

They should work fine

Thanks. I will give them a try.

@mdhiggins, so I playing around earlier and I think I found an issue with either your mod or the way the containers work.

If I mount the same mod for both radarr and sonarr or radarr, sonarr, and sabnzbd it seems to corrupt the venv for all but one of them. I have stuck with only using it on sabnzbd for now. If you need further test just tag me in the mod repository.

How are you mounting? You should only be mounting the config folder not the whole sma folder

That might explain it. Would this be the correct way? With the autoProcess.ini in the sma folder.

${USERDIR}/docker/sma:/usr/local/sma/config   

That was it. I was mounting wrong.

Thank you for all your help and such an awesome piece of code

@mdhiggins

I'm thinking this is an issue with the radarr container but I noticed this morning the below in the container logs. I tried to follow your sma-config file for the mod and am recieve the same error.

[cont-init.d] 90-sma-config: executing... ,
[90-sma-config] Creating python virtual environment and installing requirements,
[90-sma-config] Installing additional deluge/qbittorrent requirements,
[90-sma-config] Downloading and installing FFMpeg,
tar (child): xz: Cannot exec: No such file or directory,
tar (child): Error is not recoverable: exiting now,
tar: Child returned status 2,
tar: Error is not recoverable: exiting now,
chown: cannot access '/usr/local/bin/ffmpeg': No such file or directory,
chown: cannot access '/usr/local/bin/ffprobe': No such file or directory,
chmod: cannot access '/usr/local/bin/ffmpeg': No such file or directory,
chmod: cannot access '/usr/local/bin/ffprobe': No such file or directory,

I noticed this after letting radarr sit for several hours and it downloaded a movie. The movie did not convert so I started digging.

Just looks like FFMpeg failed to download. If you are making tons of containers and remaking them and make too many download requests that server will block you I’ve had it happen to me a few times during testing

Maybe, I was able to get access to the docker container and was able to download the zip manually but it doesn't seem to want to unzip.

Just looks like FFMpeg failed to download. If you are making tons of containers and remaking them and make too many download requests that server will block you I’ve had it happen to me a few times during testing

Look's like maybe xz-utils is not installed in the Radarr image. I connected to the docker and installed that and was able to install ffmpeg on my Radarr image.

Were you getting some kind of error before installing? It shouldn't be required

@mdhiggins

I'm thinking this is an issue with the radarr container but I noticed this morning the below in the container logs. I tried to follow your sma-config file for the mod and am recieve the same error.

[cont-init.d] 90-sma-config: executing... ,
[90-sma-config] Creating python virtual environment and installing requirements,
[90-sma-config] Installing additional deluge/qbittorrent requirements,
[90-sma-config] Downloading and installing FFMpeg,
tar (child): xz: Cannot exec: No such file or directory,
tar (child): Error is not recoverable: exiting now,
tar: Child returned status 2,
tar: Error is not recoverable: exiting now,
chown: cannot access '/usr/local/bin/ffmpeg': No such file or directory,
chown: cannot access '/usr/local/bin/ffprobe': No such file or directory,
chmod: cannot access '/usr/local/bin/ffmpeg': No such file or directory,
chmod: cannot access '/usr/local/bin/ffprobe': No such file or directory,

I noticed this after letting radarr sit for several hours and it downloaded a movie. The movie did not convert so I started digging.

Just this error but what was weird is I could connect to the docker via portainer and run the same wget command that your script called for and it would download but when I tried to untar it I would get the xz error. So I installed the xz-utils and was able to untar and follow through with your 90-sma-config script.

When I Google the error status code everything pointed to the xz-utils not being installed.

tar (child): xz: Cannot exec: No such file or directory

And this is on the Linuxserver Radarr container presumably.

I'm just confused since the Radarr-sma container doesn't install this and uses the same command / script to download FFMpeg and has thousands of downloads without issues. Can't imagine why this would fail. I guess I can include it though just not sure where the difference lies

And this is on the Linuxserver Radarr container presumably.

I'm just confused since the Radarr-sma container doesn't install this and uses the same command / script to download FFMpeg and has thousands of downloads without issues. Can't imagine why this would fail. I guess I can include it though just not sure where the difference lies

That is correct. Linuxserver.io Radarr image

Made some small updates to sma-mod, see if that resolves the Radarr issue

Made some small updates to sma-mod, see if that resolves the Radarr issue

No error's this time when rebuilding the Linuxserver.io image. You are amazing,

Excellent. Gonna close this then feel free to reopen with further issues