Secondly, for systems that would execute the .py file directly, the files use the shebang "/usr/bin/env python" to operate using the default Python interpreter on the user's path. This causes a problem in several situations, as the default Python interpreter can easily differ from that running SABnzbd. This is particularly notable when the system-level Python differs by version - eg system is Python 3.x vs a locally-compiled 2.x installation.
My suggestion is to adjust the code so all Python scripts run using the same interpreter that started SABnzbd, changing line 141-142 like so:
Code: Select all
if extern_proc.endswith('.py') and (sabnzbd.WIN32 or not os.access(extern_proc, os.X_OK)):
command.insert(0, 'python')
Code: Select all
if extern_proc.endswith('.py'):
command.insert(0, sys.executable)