linuxserver / docker-nzbget

GNU General Public License v3.0
149 stars 83 forks source link

New update has resulted in broken python extension scripts #108

Closed rosarch closed 4 years ago

rosarch commented 4 years ago

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Add .py extension scripts to nzbget config: https://github.com/nzbget/FakeDetector https://github.com/JVMed/PasswordDetector

These are queried as part of the download process to help identify fake files and files with passwords.

Current Behavior

Errors are thrown and files are not downloaded:

today at 11:01 AM [INFO] FakeDetector:   File "/app/nzbget/scripts/FakeDetector.py", line 371
today at 11:01 AM [INFO] FakeDetector:     os.environ.get('NZBPR_FAKEDETECTOR_SORTED') <> 'yes'):
today at 11:01 AM [INFO] FakeDetector:                                                  ^
today at 11:01 AM [INFO] FakeDetector: SyntaxError: invalid syntax
today at 11:01 AM [INFO] PasswordDetector:   File "/app/nzbget/scripts/PasswordDetector.py", line 148
today at 11:01 AM [INFO] PasswordDetector:     print("out: " + outtext.translate(None,'\r\n'))
today at 11:01 AM [INFO] PasswordDetector:                                                   ^
today at 11:01 AM [INFO] PasswordDetector: TabError: inconsistent use of tabs and spaces in indentation

Steps to Reproduce

  1. Download linuxserver/nzbget:latest
  2. Setup nzbget to use latest PasswordDetector and FakeDetector .py extension's
  3. Download a file

Environment

OS: Ubuntu 20.4 CPU architecture: x86_64
How docker service was installed: Installed docker-ce, pulled down the image for nzbget from a docker-compose file.

Command used to create docker container (run/create/compose/screenshot)

docker-compose -f docker-compose-t2.yml up -d

Docker logs

today at 11:01 AM [INFO] FakeDetector:   File "/app/nzbget/scripts/FakeDetector.py", line 371
today at 11:01 AM [INFO] FakeDetector:     os.environ.get('NZBPR_FAKEDETECTOR_SORTED') <> 'yes'):
today at 11:01 AM [INFO] FakeDetector:                                                  ^
today at 11:01 AM [INFO] FakeDetector: SyntaxError: invalid syntax
today at 11:01 AM [INFO] PasswordDetector:   File "/app/nzbget/scripts/PasswordDetector.py", line 148
today at 11:01 AM [INFO] PasswordDetector:     print("out: " + outtext.translate(None,'\r\n'))
today at 11:01 AM [INFO] PasswordDetector:                                                   ^
today at 11:01 AM [INFO] PasswordDetector: TabError: inconsistent use of tabs and spaces in indentation

The issue is around dropping support for python 2, whilst I appreciate that this is NOT an issue with this image and actually a problem around the scripts and updatig the scripts will work. Anyone that uses these scripts will have an issue so I thought I would flag it here.

I have posted messages in the relevant script repos advising of the issue.

tobbenb commented 4 years ago

There are multiple issues regarding this that have been closed recently. We are not changing back to python 2.