ValueError: non-hexadecimal number found in fromhex() arg at position 15
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- networking
研究方向
從 can/interfaces/slcan.py 第 218 行開始,追蹤 bus.recv(35) 如何將收到的 SLCAN 資料傳遞給 fromhex()。在 Ubuntu 上使用 TITAN USB-CAN-M 重現此故障,並檢查會產生位置 1 或 15 的影格。需要先釐清對格式錯誤影格的預期處理方式,以及應該略過封包還是將其呈現出來,才能定義何時算完成。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
I've updated Python Can to 4.4.2 (not sure which version I was using before).
All of a sudden I'm getting a "ValueError" exception in bus.recv() every few minutes.
For now, I've handled the exception and proceed to wait for the next message.
it works, but now I miss an occasional packet from the CAN bus.
the exact message is:
/can/interfaces/slcan.py", line 218, in _recv_internal
ValueError: non-hexadecimal number found in fromhex() arg at position 15
the "position" always seems to be either 1 or 15 (havent seen any other numbers.
To Reproduce
the code I use is simple:
CanMessage = bus.recv(35)
Expected behavior
previous versions did not throw this error (ever)
Additional context
OS and version: Ubuntu 24.04 LTS
Python version: 3.8.10
python-can version: 4.4.2
python-can interface/s (if applicable): SLCAN interface from TITAN (USB adapter)
https://www.titan.tw/product/usb-can-m/
Traceback and logs
def func():
return "hello, world!"
- 主要語言
- Python
- 星號
- 1.6k
- 分支
- 715
- 平均合併
- 2 天 4 小時
- 30 天內合併 PR
- 42
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hardbyte/python-can 的其他 Issue
-
serial: a frame cut off by the read timeout raises struct.error / TypeError instead of CanOperationError可能已有人在做 @aloneangel45 於 1 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 78/100
hardbyte/python-can#2157 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 1/5 1 小時以內 新手友好度 68/100
hardbyte/python-can#1922 · 1 個 reaction ·
維護者通常 1 天內回覆
-
enhancement
難度 5/5 一週以上 新手友好度 25/100
hardbyte/python-can#2159 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 35/100
hardbyte/python-can#2121 · 2 個 reaction ·
維護者通常 1 天內回覆
-
Make socket binding exceptions more debugable可能已有人在做 @vonpanda 於 57 天前認領。 未關閉enhancement
難度 3/5 1-2 天 新手友好度 75/100
hardbyte/python-can#2104 ·
維護者通常 1 天內回覆
查看 hardbyte/python-can 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
-
bug
難度 2/5 1-3 小時 新手友好度 74/100
daniel-ospina/tortoise#15014 ·
維護者通常 1 天內回覆
-
area:api p2 product:business triage:active type:feat
難度 2/5 1-3 小時 新手友好度 68/100
cuadrao-ai/argus#2656 ·
維護者通常 1 天內回覆
-
documentation good first issue help wanted
難度 2/5 1-3 小時 新手友好度 84/100
-
good first issue tests
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆