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

Linux平台下端口名称格式为/dev/ttyUSB could not open port #1

Open
Tonymaxs opened this issue Aug 16, 2022 · 0 comments · May be fixed by #2
Open

Linux平台下端口名称格式为/dev/ttyUSB could not open port #1

Tonymaxs opened this issue Aug 16, 2022 · 0 comments · May be fixed by #2

Comments

@Tonymaxs
Copy link

Tonymaxs commented Aug 16, 2022

Linux平台下端口名称格式为/dev/ttyUSB + 编号, 示例如下:
下了:
arm = WlkataMirobot(portname='/dev/ttyUSB0')
Exception:
Traceback (most recent call last):
File "/home/tonyhsiao/wlkata-mirobot-python-main/wlkata_mirobot/wlkata_mirobot_serial.py", line 162, in open
self.serialport.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 2] could not open port : [Errno 2] No such file or directory: ''

只下arm = WlkataMirobot()能正常運行。

michaelbaisch added a commit to michaelbaisch/wlkata-mirobot-python that referenced this issue Oct 11, 2022
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

Successfully merging a pull request may close this issue.

1 participant