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

Errors with Code #5

Open
RobinPun opened this issue Apr 10, 2022 · 1 comment
Open

Errors with Code #5

RobinPun opened this issue Apr 10, 2022 · 1 comment

Comments

@RobinPun
Copy link

Hello,

I was trying to use your code to gain some graphs with the distance detection performed. However the code seems to have some errors when I run it. For instance after configuring the TF-Luna Lidar camera with my Pi, I tried to run the tfluna_test code whivh gave me this:
Python 3.9.2 (/usr/bin/python3)

%Run tfluna_test.py
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 322, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
PermissionError: [Errno 13] Permission denied: '/dev/serial0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pi/Desktop/tfluna-python-main/tfluna_test.py", line 19, in
ser = serial.Serial("/dev/serial0", 115200,timeout=0) # mini UART serial device
File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 244, in init
self.open()
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 325, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/serial0: [Errno 13] Permission denied: '/dev/serial0'

Please may I receive a solution to this error code promptly,

Thank you very much,
Robin

@krukhlis
Copy link

It's not a python issue.
Probably, you have to disable serial console in raspi-config.

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

No branches or pull requests

2 participants