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

exit(-1) cannot run script c:\nzbtomedia\ #1880

Closed Jonnehs closed 2 years ago

Jonnehs commented 2 years ago

Describe the bug Migrated all downloaders etc to a new 2022 VM, but the scripts will not work when called from SABnzbd

Technical Specs Windows 2022 Python 3.73 SABnzbd SichChill, Radarr

Expected behavior SABnzbd calls the script, but it exits with the error "exit(-1) cannot run script c:\nzbtomedia... .py"

Log No nzbtomedia logs seem to be generated

Jonnehs commented 2 years ago

From SABnzbd log:

2022-03-17 15:52:21,785::DEBUG::[newsunpack:235] Failed script C:\nzbToMedia\nzbToMedia.py, Traceback: Traceback (most recent call last): File "sabnzbd\newsunpack.py", line 216, in external_processing File "sabnzbd\misc.py", line 1163, in build_and_run_command File "subprocess.py", line 966, in init File "subprocess.py", line 1435, in _execute_child FileNotFoundError: [WinError 2] The system cannot find the file specified

clinton-hall commented 2 years ago

the problem here is that SABnzbd is not able to find nzbToMedia to run.

Check the SABnzbd settings to ensure this is pointing at the correct location for nzbToMedia.py. i.e. is this really located at C:\nzbToMedia\nzbToMedia.py?

It is odd that you get this with Windows. On linux I would have said the shebang was wrong or basically your shell couldn;t find the python interpreter.

For windows, perhaps check that you have set a PATH variable for python. https://www.educative.io/edpresso/how-to-add-python-to-path-variable-in-windows

Jonnehs commented 2 years ago

Thanks. Honestly I think a reboot fixed this as it just started working after i logged this, so just some strange transient issue.