hardbyte / hardbyte/python-can

CAN Devices Not Detected When Executable Is Run

Đang mở
#1,840 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
1.6k
Fork
697
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Describe the bug

Hi,

I'm using your application to forward messages between CAN buses, and I've noticed an issue when running the executable file. When I call the detect_available_configs function, it does not detect any CAN devices. However, when I run the Python script directly, the CAN devices are detected without any problems.
![image](https://github.com/user-attachments/assets/a44a349d-94c0-4096-bb9f-2b288156fa27)
![微信图片_20240818184210](https://github.com/user-attachments/assets/aa4e44fa-04f5-40b4-855f-056de72b25a0)

### To Reproduce

### Expected behavior

### Additional context

OS and version: Windows 10
Python version:Python 3.8.5
python-can version:4.2.2
python-can interface/s (if applicable):detect_available_configs
Executable Creation Tool:auto-py-to-exe,cmd is:pyinstaller --noconfirm --onefile --windowed --hidden-import "Pyqt5-sip" --hidden-import "can" --hidden-import "python-can" "C:\Users\Administrator\Desktop\TsPy" "C:\Users\Administrator\Desktop\TsPy\zhuanfagui.py"

Traceback and logs

```python
def func():
return "hello, world!"
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.