bluerobotics / bluerobotics/ping-python
Wrong 'serial' module present can cause strange errors
- Ngôn ngữ chính
- Python
- Star
- 60
- Fork
- 39
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
The ['serial'](https://pypi.org/project/serial/) package can cause some mistakes.
the correct one is 'pyserial'
error in python2:
```
python2 simplePingExample.py --device /dev/ttyUSB0 --baudrate 115200
Opening /dev/ttyUSB0 at 115200 bps
Failed to open the given serial port
('\t', AttributeError("'module' object has no attribute 'Serial'",))
```
Python3:
```
Failed to open the given serial port
module 'serial' has no attribute 'Serial'
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start with simplePingExample.py and reproduce the Python 2 or Python 3 serial-port failure using the command shown. Trace how the serial module is installed and imported, then verify that the correct pyserial package provides Serial and that the example no longer reports the missing-attribute error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100