Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
IIIdefconIII opened this issue Jan 6, 2023 · 5 comments
Labels

Comments

@IIIdefconIII
Copy link

IIIdefconIII commented Jan 6, 2023

🪲 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 "

💡 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
💻 Your System Details:

  • OS: Synology DSM

🔮 Additional context
Add any other context about the problem here.

@caronc
Copy link
Owner

caronc commented Jan 6, 2023

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
Copy link
Author

IIIdefconIII commented Jan 6, 2023

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
Copy link
Author

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

@caronc
Copy link
Owner

caronc commented Jan 7, 2023

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
Copy link
Author

just for some futures answers: i installed python 3.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants