miked63017 / dinolite_uvc_led_control

Python module to control LEDs, AE, and other UVC controls for the Dino Lite USB microscopes
26 stars 11 forks source link

cam0 = worker.ourDevices[0] IndexError: list index out of range #9

Closed Bobbobbob22 closed 2 years ago

Bobbobbob22 commented 2 years ago

I am trying to use your code to turn off the LEDs but am unable to access the camera. On a Raspberry pi. Error: " Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 007: ID 17ef:608d Lenovo Optical Mouse Bus 001 Device 008: ID 17ef:608c Lenovo Lenovo Calliope USB Keyboard Bus 001 Device 006: ID a168:0870 AnMo Electronics Corporation Dino-Lite Premier Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub ['a168', '0870'] 'Devices:' [] Traceback (most recent call last): File "/home/pi/Desktop/Recording.py", line 13, in cam0 = worker.ourDevices[000] IndexError: list index out of range " As you can see, the devices list is empty but there is clearly a camera attached

Bobbobbob22 commented 2 years ago

Added my device to devices in directory and reinstalled. Found camera now