caronc / nzb-notify

Push Notifications to a large number of supported services for NZBGet and SABnzbd (based on Apprise)
GNU General Public License v3.0
129 stars 16 forks source link

exit code 127 and output "env: ‘python’: No such file or directory " #92

Open IIIdefconIII opened 1 year ago

IIIdefconIII commented 1 year ago

:beetle: Describe the bug After adding, i do have the script option in sabnzdb, but it fails. Notification script returned exit code 127 and output "env: ‘python’: No such file or directory "

:bulb: Screenshots and Logs

Notification script returned exit code 127 and output "env: ‘python’: No such file or directory "

Dozzle log: 2023-01-06 17:29:41,196::INFO::[misc:1166] [N/A] Running external command: ['/config/scripts/sabnzbd-notify.py', 'other', 'SABnzbd: Other Messages', 'Test Notification', 'https://discord.com/api/webhooks/personaldisordlink] 06-01-2023 17:29:41 2023-01-06 17:29:41,199::ERROR::[notifier:375] Notification script returned exit code 127 and output "env: ‘python’: No such file or directory

image :computer: Your System Details:

:crystal_ball: Additional context Add any other context about the problem here.

caronc commented 1 year ago

Your copy of Python can't be found on your Synology device.

You could try hacking it a bit and just update the nzb-notify.py script and change the first line to: #!/usr/bin/env /usr/local/bin/python

Alternatively there is some good advice here on how you might be able to fix your environment up.

IIIdefconIII commented 1 year ago

Thanks for you message, oldo i dont have the gile nzb-notify, myne is called sabnzbd-notify.py and i dont seem to find out what linke is should adjust, edit i found some line in sabnzbd. should i uncomment it? Commentes it still gives me an error:

ERROR a few seconds ago Notification script returned exit code 127 and output "env: ‘/usr/local/bin/python’: No such file or directory

uncommented i get another error:

Notification script returned exit code 1 and output "  File "/config/scripts/sabnzbd-notify.py", line 1
    !/usr/bin/env /usr/local/bin/python
SyntaxError: invalid syntax

this seems how the directory is listed:

root@IIIdefconnasIII:/usr/local/bin# cd python
python2     python2.7   python3.10

I tried all three folders instead but im keep ketting the error:

 Notification script returned exit code 1 and output "  File "/config/scripts/sabnzbd-notify.py", line 1
    !/usr/bin/env /usr/local/bin/python2
    ^
SyntaxError: invalid syntax
"
IIIdefconIII commented 1 year ago

@caronc Hi, do you have any other suggestiosn? Thank you,!

caronc commented 1 year ago

I don't, it seems Python isn't in your Linux path. I don't have a Synology device, so i don't know how to troubleshoot that. You could try asking about the pyhon path in their forums. The link i shared from Stack overflow is the issue

IIIdefconIII commented 1 year ago

just for some futures answers: i installed python 3.10