question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Camera __init__ sequence did not complete.

See original GitHub issue

I 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:closed
  • Created a year ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
davidplowmancommented, Sep 6, 2022

Glad to hear it! I’ll close this now - please feel free to open another issue if anything else comes up.

0reactions
robokrishancommented, Sep 6, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem trying to install picamera2 - Raspberry Pi Cameras
raise RuntimeError(“The camera init sequence was not completed.”) RuntimeError: The init sequence of the camera was not completed.
Read more >
Cameras Suddenly Not Found [3B Bullseye HQ]
Hi, I worked through all the challenges of the bullseye transition using my 3B Pi and got my camera working using Picamera2.
Read more >
Common errors using the Raspberry Pi camera module
Are you trying to use the Raspberry Pi camera module, Python, and the picamera library? Did you run in to an error message?...
Read more >
Raspberry Pi Error with picamera.exc.PiCameraMMALError ...
I'm using a Raspberry Pi HQ Camera that can go up to 4056x3040 , and instanciated my camera object with full res. Lowering...
Read more >
Source code for picamera.camera
When you are finished with the camera, you should ensure you call the ... __init__ MAX_FRAMERATE = PiCameraMaxFramerate # modified by PiCamera.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found