LeoDJ / P2Pro-Viewer

A viewer and API for the InfiRay P2 Pro thermal camera module
MIT License
171 stars 22 forks source link

usb.core can't find usb device by idVendor=0x0BDA and idProduct=0x5830 #13

Open AsherPhan opened 1 year ago

AsherPhan commented 1 year ago

The camera is connected and I can open it using the default camera app in windows 10. If I use:

import win32com.client wmi = win32com.client.GetObject ("winmgmts:") for usb in wmi.InstancesOf ("Win32_USBHub"): print(usb.DeviceID)

It returns: USB\VID_0BDA&PID_5830\200901010001

when I run: python main.py

It returns: INFO:P2Pro.recorder:Starting video recording to file test.mkv ... Traceback (most recent call last): File "C:\path\P2Pro-Viewer-main\main.py", line 25, in cam_cmd = P2Pro_CMD.P2Pro() File "C:\path\P2Pro-Viewer-main\P2Pro\P2Pro_cmd.py", line 84, in init raise FileNotFoundError("Infiray P2 Pro thermal module not found, please connect and try again!") FileNotFoundError: Infiray P2 Pro thermal module not found, please connect and try again!

The problem is in line 84: self._dev = usb.core.find(idVendor=0x0BDA, idProduct=0x5830)

I tried this line only import usb.core dev = usb.core.find(idVendor=0x0BDA, idProduct=0x5830) print(dev)

It returns: None

Please help.