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/ttyS0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/rancho/programs/jiguang.py", line 4, in <module> ser = serial.Serial('/dev/ttyS0',230400) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/ttyS0: [Errno 13] Permission denied: '/dev/ttyS0'