Camera __init__ sequence did not complete.
See original GitHub issueI have been working with a camera module which worked perfectly with picamera2 as of a month ago. My big mistake was performing an apt update. Now I am unable to use the picamera2 library for interfacing my camera module. I am working with the OV5647 camera. I was initially on picamera2 0.2.3 (now 0.3.3). I tried reverting back to the older version but still not working. I think there are a bunch of other libraries that got updated as well. My working script is now completely broken. The script fails to initalize the camera. I get the following output on my terminal when I try to run the script:
`[0:28:02.822312015] [1895] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3866-0c55e522
2022-09-05T13:23:01.484Z | ERROR | Camera(s) not found (Do not forget to disable legacy camera with raspi-config).
2022-09-05T13:23:01.485Z | ERROR | Camera __init__ sequence did not complete.
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/picamera2/picamera2.py", line 123, in __init__
self._open_camera()
File "/home/pi/.local/lib/python3.9/site-packages/picamera2/picamera2.py", line 305, in _open_camera
if self._initialize_camera():
File "/home/pi/.local/lib/python3.9/site-packages/picamera2/picamera2.py", line 271, in _initialize_camera
raise RuntimeError("Camera(s) not found (Do not forget to disable legacy camera with raspi-config).")
RuntimeError: Camera(s) not found (Do not forget to disable legacy camera with raspi-config).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/RaspberryPi/Motorized_Focus_Camera/python/FocuserExample.py", line 187, in <module>
main()
File "/home/pi/RaspberryPi/Motorized_Focus_Camera/python/FocuserExample.py", line 175, in main
camera = Camera()
File "/home/pi/RaspberryPi/Motorized_Focus_Camera/python/RpiCamera.py", line 20, in __init__
self.open_camera(width, height)
File "/home/pi/RaspberryPi/Motorized_Focus_Camera/python/RpiCamera.py", line 23, in open_camera
self.cam = Picamera2()
File "/home/pi/.local/lib/python3.9/site-packages/picamera2/picamera2.py", line 130, in __init__
raise RuntimeError("Camera __init__ sequence did not complete.")
RuntimeError: Camera __init__ sequence did not complete.`
I have ensured that the Legacy Camera stack is disabled in raspi-config. I tried initializing the camera on a fresh script but the moment the interpreter runs Picamera2(), this error is thrown. I am at a loss here. Can someone please tell me which libraries were updated that broke the install? I want to revert all the dependencies to the previous version and see if I can salvage my script.
Thanks in advance.
Issue Analytics
- State:
- Created a year ago
- Comments:13 (2 by maintainers)
Top GitHub Comments
Glad to hear it! I’ll close this now - please feel free to open another issue if anything else comes up.
OMG You are a lifesaver! It worked! I uninstalled from pip, then installed as you suggested and voila! Thanks so much @davidplowman , appreciate your time and effort.