-
Notifications
You must be signed in to change notification settings - Fork 37
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
Usage in Python 3 without sudo #17
Comments
Hi ralphbe91, I'm afraid that the sudo might be necessary due to being required to read the serial port on RPi. I think your program calling mh_z19.read() also need the sudo to call without permission error. |
Hi UedaTakeyuki . Oh, too bad. Thanks for your quick response and your effort. If anyone has a solution, I'd love to hear it. |
Hi ralphbe91, After considered deeply, I've got an idea to improve this library to use without root permission. By the way, would you please tell me the result of |
Hi ralphbe91, I've updated this library for non-sudo support. Please refer here and try it. Thank you! |
Hi, thanks for your effort! But I have still the following problem:
Great!
Not that great... I get the same error in my program when I use Is there a problem with Python 3? BTW:
This should be fine. Thanks! |
Looks like the library you are using hasn't been updated. Would you please make sure the version?
The expected version is 0.5.1. Thank you! |
Thats it! After hours I got it working, thanks to your help. Keep up the good work! |
Is it possible to use this library with Python 3 without sudo?
When I use "import mh_z19" and "mh_z19.read()" in my program it doesn't work. Although I have activated the serial port (just as you and others decribed ist), I get the following error: PermissionError: [Errno 13] Permission denied: '/dev/serial0'. The sensor is working, because when I use "$ sudo python -m mh_z19" I get the desired result.
I am a beginner in Python, that has already taken up a lot of my time.
The text was updated successfully, but these errors were encountered: