Page 8 of 8

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 28 Nov 2016, 05:06
by dagoob
Awesome. Thanks!

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 12 Feb 2017, 19:04
by war59312
ezhik wrote:If anybody is running into issues with PasswordDetector or FakeDetector complaining about:

ERROR Post-process-script PasswordDetector.py for **** failed (terminated with unknown status)
ERROR Post-process-script FakeDetector.py for **** failed (terminated with unknown status)

Most likely it is due to temp_file_name issue.

To fix this, open both files and update the following:

From:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/PasswordDetector/' + os.environ.get(Prefix + 'NZBID')

To:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/PasswordDetector/' + re.sub("\D", "", os.environ.get(Prefix + 'NZBID'))


Same for Fake Detector:

From:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/FakeDetector/' + os.environ.get(Prefix + 'NZBID')

to:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/FakeDetector/' + re.sub("\D", "", os.environ.get(Prefix + 'NZBID'))


PS. Encountered this with 16.4.
Hi,

I'm having a similar issue, but sadly above does NOT fix it.

This is what I am seeing in the log:
ERROR Sun Feb 12 2017 13:48:36 PasswordDetector: Failed 53b4cd4c6a0c4436be44f735708e92e8.part17.rar: [Errno 2] No such file or directory
ERROR Sun Feb 12 2017 13:48:36 FakeDetector: Failed 53b4cd4c6a0c4436be44f735708e92e8.part17.rar: [Errno 2] No such file or directory
The files do exist, under "InterDir".

Running latest PasswordDetector and FakeDetector on NZBGet 17.1 built from official source on Ubuntu 16.04.

Thanks,

Will

Edit: Sadly, happening with NZBGet 18.0 as well. :o

Must be some odd permission error. Never had this problem before.

FakeDetector ... am I using this right?

Posted: 27 Feb 2019, 14:40
by Departed
Hoping to get a little help with the FakeDetector script. I'm seeing a lot of errors in the log, so I'm not sure if it is working correctly. Can someone take a look at these log entries and let me know if they are normal? Thanks!

Code: Select all

Wed Feb 27 2019 09:30:13	FakeDetector: httplib.InvalidURL: nonnumeric port: 'FFL>7QMfid8v'
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 793, in _get_hostport
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: (self.host, self.port) = self._get_hostport(host, port)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 751, in __init__
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: self._connection = host, httplib.HTTPConnection(chost)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1386, in make_connection
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: h = self.make_connection(host)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1300, in single_request
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: return self.single_request(host, handler, request_body, verbose)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1280, in request
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: verbose=self.__verbose
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1599, in __request
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: return self.__send(self.__name, args)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1240, in __call__
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: nzbget.editqueue('FileMoveTop', 0, '', [file_id])
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/Users/bink/Library/Application Support/NZBGet/scripts/FakeDetector.py", line 347, in sort_inner_files
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: sort_inner_files()
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/Users/bink/Library/Application Support/NZBGet/scripts/FakeDetector.py", line 418, in main
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: main()
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/Users/bink/Library/Application Support/NZBGet/scripts/FakeDetector.py", line 457, in <module>
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: Traceback (most recent call last):

Re: [Queue-Script] FakeDetector - early detection of fake videos

Posted: 27 Feb 2019, 17:13
by hugbug
These errors are not normal. They probably occur because the script doesn't properly encode username and password when connecting to nzbget. Check ControlUsername and ControlPassword in nzbget settings and if they contain special characters try removing them.

Re: [Queue-Script] FakeDetector - early detection of fake videos

Posted: 27 Feb 2019, 17:51
by Departed
That worked, thank you!

I would consider this a bug. Since NZBGet allows special characters in the password, it seems strange that those characters would cause a problem in this script. It's easily fixed by removing the special characters, but it isn't immediately apparent why the errors are occurring.

Thanks again for the help!

Re: [Queue-Script] FakeDetector - early detection of fake videos

Posted: 14 Jan 2020, 14:15
by EC28
I'm getting this error when trying to execute the command. Has anyone seen this? Thanks!

Code: Select all

Traceback (most recent call last):
  File "./FakeDetector.py", line 79, in <module>
    bannedMediaExtensions = os.environ.get('NZBPO_BANNEDEXTENSIONS').replace(' ', '').split(',')
AttributeError: 'NoneType' object has no attribute 'replace'
This is what the code currenty reads as:

Code: Select all

bannedMediaExtensions = os.environ.get('NZBPO_BANNEDEXTENSIONS').replace(' ', '').split(',')
And this is what I have the banned extensions set as if it matters:

Code: Select all

BannedExtensions= '.cbr', '.exe', '.com', '.pif', '.scr', '.bat', '.cmd', '.lnk', '.url', '.html', '.htm', '.pdf' 

Re: [Queue-Script] FakeDetector - early detection of fake videos

Posted: 11 Jun 2020, 23:14
by ezhik
Could somebody migrate this to python3 ?

Re: [Queue-Script] FakeDetector - early detection of fake videos

Posted: 11 Jul 2020, 00:45
by prinz2311
My fork is py2 and 3 compatible. Tested with 3.7+

I added a few other changes:
- added xmlrpclib_to lib (supports timeout, to prevent hanging script when calling nzbget to sort nzb)
- add 'RARBG_DO_NOT_MIRROR.exe' , 'File Renamer' to allowed list
- make check of allow list case insensitive

https://github.com/Prinz23/FakeDetector