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

[OTHER] IndexError #1081

Closed
mbauer575 opened this issue Jul 30, 2024 · 2 comments
Closed

[OTHER] IndexError #1081

mbauer575 opened this issue Jul 30, 2024 · 2 comments

Comments

@mbauer575
Copy link

Getting an IndexError when running picamera2 on rpi 5. I was able to run this program awhile ago but now im getting this error every time I run it.

    picam2 = Picamera2()
             ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 246, in __init__
    camera_num = self.global_camera_info()[camera_num]['Num']
                 ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
IndexError: list index out of range

Any ideas what could be wrong?

@davidplowman
Copy link
Collaborator

davidplowman commented Jul 31, 2024

Maybe start by having a look at what Picamera2.global_camera_info() is returning. Perhaps your camera (or cameras) are not being detected for some reason?

@mbauer575
Copy link
Author

I reseated the camera cable and it seems to work fine now.

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

2 participants