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

This isn't a bug report for nzbtomedia, but I wasn't sure where I should post - python-guessit and sub downloads breaking processing #1857

Closed tixetsal closed 7 months ago

tixetsal commented 3 years ago

I've been getting traceback error output in my nzbtomedia logs recently based on python-guessit and most new shows were not being properly processed, due to the guessit errors.

I tried to compile my own guessit. I tried reinstalling packages because I had read that this could possibly be related to an issue with slightly different revs of python, but nothing worked. In the nzbtomedia.log, I noticed that the error occurred each time right after I would attempt to auto-download subtitles.

After disabling the subtitle download, I no longer experience the issue and media is again being processed correctly. I hope this helps someone else who has been fighting the same issue. It seems that we'll have to wait for python-guessit to be fixed before re-enabling subs downloads, if I am understanding the root cause of the issue. HTH.

clinton-hall commented 3 years ago

Can you post those tracebacks? nzbToMedia includes guessit so that the version should be compatible. I'll try some tests here and update if needed.

operinko commented 3 years ago

===================== Guessit Exception Report =====================
version=3.0.3
string=\\pine64\Download\Complete\movies\movie_name_sanitized.mkv
options={}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\sabnzbd scripts\nzbToMedia\libs\common\guessit\api.py", line 179, in guessit
    config = self.configure(options, sanitize_options=False)
  File "D:\sabnzbd scripts\nzbToMedia\libs\common\guessit\api.py", line 150, in configure
    self.rebulk = rules_builder(advanced_config)
  File "D:\sabnzbd scripts\nzbToMedia\libs\common\guessit\rules\__init__.py", line 56, in rebulk_builder
    rebulk.rebulk(episodes(_config('episodes')))
  File "D:\sabnzbd scripts\nzbToMedia\libs\common\guessit\rules\properties\episodes.py", line 150, in episodes
    rebulk.chain(formatter={'season': int, 'episode': int},
  File "D:\sabnzbd scripts\nzbToMedia\libs\common\rebulk\chain.py", line 115, in regex
    pattern = self.rebulk.build_re(*pattern, **kwargs)
  File "D:\sabnzbd scripts\nzbToMedia\libs\common\rebulk\rebulk.py", line 133, in build_re
    return RePattern(*pattern, **kwargs)
  File "D:\sabnzbd scripts\nzbToMedia\libs\common\rebulk\pattern.py", line 378, in __init__
    pattern = call(re.compile, pattern, **self._kwargs)
  File "D:\sabnzbd scripts\nzbToMedia\libs\common\rebulk\loose.py", line 60, in call
    return function(*call_args, **call_kwargs)
  File "C:\Users\ollie\AppData\Local\Programs\Python\Python38\lib\site-packages\regex\regex.py", line 351, in compile
    return _compile(pattern, flags, ignore_unused, kwargs, _cache_all)
  File "C:\Users\ollie\AppData\Local\Programs\Python\Python38\lib\site-packages\regex\regex.py", line 602, in _compile
    raise ValueError('unused keyword argument {!a}'.format(any_one))
ValueError: unused keyword argument 'private_parent'```

I've had multiple failures due to that recently as well.
operinko commented 3 years ago

Haven't yet tested again with the latest nightly, but that was on: nzbToMedia Version:213f1f6f1065cd9cecc9087e99b80cd0ca2d5220 Branch:nightly (Windows 10) <- Windows 11, actually. Python 3.9.8

I'll report back in a few minutes after a postprocessing run on Version:48154d0c3c27b337355a184cb25fc8d0e30800d9 completes.

operinko commented 3 years ago

Yeah, same issue still. Apparently, it's most likely caused by babelfish and Python 3.9. The version of guessit packaged with nzbtomedia doesn't have a version constraint on babelfish, and <0.6.0 has issues with Python 3.9: https://github.com/guessit-io/guessit/issues/711

operinko commented 3 years ago

Manually updating babelfish to 0.6.0 from 0.5.5-dev in libs/common without touching any other libraries does not fix the issue, however.

clinton-hall commented 3 years ago

ok, I have tried Python 3.9.6 on linux and can't reproduce the error at this end. Will try and set up a windows test to see what I can do.

tixetsal commented 3 years ago

Sorry, I wasn't paying attention to email for a bit and missed these notifications. It seems that others are now facing this as well. I see another couple threads that don't have very much info but are similar, which make me wonder if they're related.

Would you still like some log output from a linux machine? I've just left everything turned off, but I can flip it back on again and capture some output, if it will be helpful.

clinton-hall commented 3 years ago

any logging would be helpful as I haven't been able to reproduce.