ArduCAM/RaspberryPi

Camera __init__ sequence did not complete.

Closed this issue · 3 comments

Since the last picamera2, libcamera update, the script is no longer functional. The camera fails to initialize. To reproduce the error, import picamera2 and initialize a camera object as such:


from picamera2 import Picamera2, Preview

camera = Picamera2()

Please tell me your picamera2 version and libcamera version.

sudo dpkg -l | grep libcamera
python3 -m pip list | grep picamera2

Thanks for pursuing @ketai-dhr . Here is my output:

pi@arducam-revert:~/RaspberryPi/Motorized_Focus_Camera/python $ sudo dpkg -l | grep libcamera
ii  libcamera-apps                       0~git20220830+1bf0cca-1          armhf        libcamera-apps
ii  libcamera-tools                      0~git20220826+3fad116f-1         armhf        complex camera support library (tools)
ii  libcamera0:armhf                     0~git20220826+3fad116f-1         armhf        complex camera support library
ii  python3-libcamera                    0~git20220826+3fad116f-1         armhf        complex camera support library (Python 3 bindings)


pi@arducam-revert:~/RaspberryPi/Motorized_Focus_Camera/python $ python3 -m pip list | grep picamera2
picamera2         0.2.3

I am aware that there is picamera2 version 0.3.3 but this is the last version where my setup worked. I have been troubleshooting and I have narrowed down the source to my dependency python3-libcamera. Recently there was some update (and I was stupid enough to update) and it has broken my whole setup. For more context, here is my requirements file:

python3-kms++=0~git20211110~105525+2236a8c-1
python3-libcamera=0~git20220705+f30ad033-1
python3-pyqt5=5.15.2+dfsg-3
python3-prctl=1.7-2+b2
libatlas-base-dev=3.10.3-10+rpi1
ffmpeg=7:4.3.4-0+deb11u1+rpt2
numpy==1.23.1
picamera2==0.2.3
opencv-python==4.6.0.66

This lists the versions of all my dependencies from the last time that my setup worked. Thanks in advance.

@ketai-dhr I found the problem and resolved it. The problem I was facing was due to an incompatibility between python3-libcamera and picamera2. I had to download the latest version of picamera2 from apt (instead of pip) and I got it working again. Thanks for taking the time to troubleshoot with me!

I appreciate your time and effort.