OneCDOnly / sherpa

A mini-package-manager for QNAP NAS
GNU General Public License v3.0
114 stars 13 forks source link

SickChill and Python 3.10.0 Compatibility Issues #164

Closed ouija closed 2 years ago

ouija commented 2 years ago

Hey,

Having issues after Entware installed/upgraded to latest Python and now my whole system is buggered; I was initially having issues with IPKG failing to update when running sherpa upgrade all command, but after it failing after multiple attempted, I essentially started from scratch by removing all related QPKGs (sherpa, Entware, SABnzbd and SickChill) and then doing a fresh installation.

I first attempted to install SABnzbd and it appears to work without issuse, however, SickChill is now failing to start after a fresh install, which I'm currently debugging. Here's the log:

start daemon: failed!
= ExecuteAndLog()
output: "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/sickchill/locale
/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/sickchill/locale
Traceback (most recent call last):
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/SickChill.py", line 14, in <module>
    import sickchill.start
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/sickchill/__init__.py", line 1, in <module>
    from .show.indexers import indexer, ShowIndexer
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/sickchill/show/indexers/__init__.py", line 1, in <module>
    from .handler import ShowIndexer
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/sickchill/show/indexers/handler.py", line 5, in <module>
    from sickchill.tv import Show, TVEpisode
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/sickchill/tv.py", line 33, in <module>
    from sickchill.oldbeard import db, helpers, network_timezones, notifiers, postProcessor, subtitles
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/sickchill/oldbeard/postProcessor.py", line 9, in <module>
    import sickchill.oldbeard.subtitles
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/sickchill/oldbeard/subtitles.py", line 8, in <module>
    import subliminal
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/lib3/subliminal/__init__.py", line 11, in <module>
    from .core import (AsyncProviderPool, ProviderPool, check_video, download_best_subtitles, download_subtitles,
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/lib3/subliminal/core.py", line 11, in <module>
    from babelfish import Language, LanguageReverseError
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/lib3/babelfish/__init__.py", line 20, in <module>
    from .converters import (LanguageConverter, LanguageReverseConverter, LanguageEquivalenceConverter, CountryConverter,
  File "/share/CACHEDEV3_DATA/.qpkg/SickChill/SickChill/lib3/babelfish/converters/__init__.py", line 11, in <module>
    class CaseInsensitiveDict(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'"
result: [1]

Edit: Just came across this forum with people having similar issues...

It appear the issues with SickChill (and Medusa, according to that forum link above), are due to bablefish requiring an update in order to resolve the issue with Collections.MutableMapping being renamed; I discovered this when realizing that nzbToMedia also needed to be updated.

...although further inspect reveals that this is indeed updated in the master repo as of last month, it just seems that the local repo isn't checking out the head / latest changes for some odd reason..

ouija commented 2 years ago

Figured I'd update this issue with what was discussed on this forum:

Essentially, the issue with SickChill is that it's "frozen" at an older commit and not receiving updates, via this line in the sickchill.sh startup script:

if [[ -d $QPKG_GIT_PATH/.git ]]; then
        ExecuteAndLog "workaround (https://github.com/SickChill/SickChill/issues/7249)" "cd /tmp; /opt/bin/git -C $QPKG_GIT_PATH  reset --hard v2021.04.10-1
        ExecuteAndLog "disable auto-update" "/sbin/setcfg General auto_update 0 -f $QPKG_INI_PATHFILE"
fi

This is by design, as newer builds were causing issues with sherpa and therefore SickChill does not have proper support for Python 3.10.0.

However, I've managed to clone that v2021.04.10-1 branch and modify it to included an updated version of babelfish 0.6.0 and can confirm that SickChill does successfully load with Python 3.10.0 now!

Basically, I modified the version installed via sherpa to use my repository instead (which has these changes in place), and it's loading now without issue.

This could prolong the life for those who wish to continue utilizing SickChill, but knowing now that it's been reverting back to an older commit (and hasn't actually been getting updated in some time) is making my decision to switch much easier (I wish I realized this sooner!)

@OneCDOnly feel free to update the SIckChill QPKG to utilize my repo (even temporarily) if you want to prolong the life of it: https://github.com/ouija/SickChill

OU812-me2 commented 2 years ago

@ouija I'm having a similar issue now with NZBtoMedia and OMedusa (Medusa). NZBtoMedia is referencing Python 3.10 (KeyError (3, 10) ) as the error via script postprocessing to Medusa. Any guesses for a workaround?

ouija commented 2 years ago

@OU812-me2 If nzbToMedia is complaining, you'll need to update it to the NIGHTLY branch for Python 3.10 support

OU812-me2 commented 2 years ago

@OU812-me2 If nzbToMedia is complaining, you'll need to update it to the NIGHTLY branch for Python 3.10 support

Didn't even think of checking the Nightly build. Great call. I'll give that a shot. Cheers!!!

OU812-me2 commented 2 years ago

@ouija Thanks for the tip, updating to Nightly worked! Cheers!!!

OneCDOnly commented 2 years ago

@ouija will your SickChill repo work as-is or does it need to be update-locked to prevent it doing that unwanted package installation thing?

Will you continue to maintain that repo, or is it only for a short time while people ditch SickChill?

I'm happy to modify the sherpa SickChill QPKG to use your repo instead of the main one. Let me know if you'd be happy to support sherpa-SickChill installations that use your repo.

OneCDOnly commented 2 years ago

Hi @ouija, please let me know regarding support for your SickChill fork.

Cheers! 👍🏽

ouija commented 2 years ago

My repo is based off that older "version locked" revision that works with sherpa, but has been modified to support Python 3.10 / babelfish 0.6.0.

I'll certainly keep this repo around for some time, and feel free to use in in your Sherpa package if you'd like!

Just note that it will likely remain at this older version for some time, as my willingness to update it beyond that older version has somewhat deminished with my success of switching to SickGear, so I'd maybe include a note in your package that SickChill won't be receiving any updates. (had I known this sooner, I would have switched to SickGear much earlier than I did!)

Thanks for developing and maintaining such a useful utility for QNAP devices!

OneCDOnly commented 2 years ago

Thanks @ouija. As mentioned on the QNAP forum, I'll remove SickChill as an installable package so we won't need to keep supporting it. Hopefully, all the sherpa users have dumped it by now.

Please let me know if you're interested in developing other packages for sherpa. 🤓