Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when i use uvc to get device_list, error happened, uvc has no attribute 'device_list' #103

Open
justdomyself opened this issue Nov 14, 2024 · 1 comment

Comments

@justdomyself
Copy link

I use windows system, pycharm。 python3.85.

`from rich import print
from rich.logging import RichHandler
import uvc

def main():

for device in uvc.device_list():

    cap = uvc.Capture(device["uid"])

    for mode in cap.available_modes:
        print(f"{cap.name} running at {mode}")
        try:
            cap.frame_mode = mode
        except uvc.InitError as err:
            print(f"{cap.name} mode selection - {err}")
            continue
        try:
            for x in range(10):
                frame = cap.get_frame_robust()
                print("frame gray mean", frame.gray.mean())
            # print(frame.img.mean())
        except uvc.InitError as err:
            print(f"{cap.name} getting frames - {err}")

    cap.close()`

error message below :

Traceback (most recent call last):
File "F:\Python\python_libuvc\uvc.py", line 48, in
main()
File "F:\Python\python_libuvc\uvc.py", line 8, in main
for device in uvc.device_list():
AttributeError: module 'uvc' has no attribute 'device_list'

@justdomyself
Copy link
Author

any body have some suggestion ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant