Hey everybody,
My code works perfectly fine on my machine, but when I deploy it to Ubuntu server (Ubuntu 20.04 (LTS) x64) I get the following error:
(env) root@ubuntu-s-1vcpu-1gb-intel-nyc1-01:~/demo# python run.py
What could be the problem?
Thank you so much for your help! niko
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Not entirely sure of what might cause this, but input/output error might have to do with permissions. Is this writing to the terminal or a (virtual?) serial port?
In the latter case, make sure you are added to the correct group (
modem
, I believe, then logout and login again).In the former, check who owns the python script you’re trying to run. Go to the folder where
run.py
is located and runls -lh
Try running as root (sudo python run.py
) to see if it fixes it.If it works under
sudo
, it is most likely a permissions issue.If you’ve uploaded the file as root, then the regular user may not be allowed to run the script (just a thought).