clinton-hall / nzbToMedia

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

nzbToSickbeard.py results in KeyError: (3, 11) (from eol.py) #1997

Closed scronkey closed 4 months ago

scronkey commented 5 months ago

Describe the bug Running nzbToSickbeard.py causes a KeyError: (3, 11) This comes from a call within eol.py Specifically time_left = PYTHON_EOL[(major, minor)] - now

A bit of digging and I can see that eol.py does not have EOL date info for Python above 3.9, so not sure if that is the cause.

Technical Specs

  1. Running on Ubuntu 23.10 x64
  2. Python version 3.11.6
  3. Download Client SABnbzd
  4. Intended Media Management Medusa

Expected behavior Script to run and process media to library

Log Please provide an extract, or full debug log that indicates the issue.

Traceback (most recent call last):
  File "/opt/medusa/contrib/nzbToMedia/./nzbToSickBeard.py", line 270, in <module>
    import nzbToMedia
  File "/opt/medusa/contrib/nzbToMedia/nzbToMedia.py", line 727, in <module>
    eol.check()
  File "/opt/medusa/contrib/nzbToMedia/eol.py", line 100, in check
    warn_for_status(version, grace_period)
  File "/opt/medusa/contrib/nzbToMedia/eol.py", line 141, in warn_for_status
    days_left = lifetime(version)
                ^^^^^^^^^^^^^^^^^
  File "/opt/medusa/contrib/nzbToMedia/eol.py", line 71, in lifetime
    time_left = PYTHON_EOL[(major, minor)] - now
                ~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: (3, 11)
clinton-hall commented 5 months ago

What branch are you using? Are you on the latest version? This issue was resolved in Master some time ago, so hopefully doing a git pull should fix this.

scronkey commented 4 months ago

Thanks for clarifyling. I'm using the version that comes in the contrib directory of Medusa.

Do you know if they have stopped upstream updates, and should I manage your repository reperately?

clinton-hall commented 4 months ago

I don't know specifically what Medusa is doing. I just looked on their github page and can't see that this package is included. Have you installed from Docker or source etc?

The easiest way to resolve this would be to go to wherever nzbToMedia is (/opt/medusa/contrib/nzbToMedia) make a backup of your config file (/opt/medusa/contrib/nzbToMedia/autoProcessMedia.cfg) then remove all of the nzbToMedia directory and do a new git clone

something like this

cd /opt/medusa/contrib
mv nzbToMedia/autoProcessMedia.cfg autoProcessMedia.cfg
rm -rf nzbToMedia
git clone https://github.com/clinton-hall/nzbToMedia.git
mv autoProcessMedia.cfg  nzbToMedia/autoProcessMedia.cfg
scronkey commented 4 months ago

Thanks - I will try that

scronkey commented 4 months ago

All good, working now. Thanks Clinton!

clinton-hall commented 4 months ago

All good. Glad to hear it is working.