I recently bought a Raspberry Pi 3B+ and a Pi Noir Camera and attempted to set them up. I followed the install instructions on the Pi website for the board and camera, and unfortunately received an error when trying to run the camera preview script.
The error was as follows:
camera = picamera.PiCamera()
mmal: mmal_vc_component_enable: failed to enable component : ENOSPC
Traceback (most recent call last):
File "<stdin>", line, in <module>
...
...
picamera.exc.PiCameraMMALError: Camera component couldn't be enabled: Out of
resources
I have verified that it is a software issue and not a hardware issue as I have tried setting up two different Pi boards and NOIR cameras.
I checked the connection of the camera to the pi board using vcngencmd get_camera. I then also attempted to substitute the camera module I had plugged in for a different one (as I bought two) and received the same error. I used the config utility to enable the camera and reboot the board after doing so.
I have also tried updating the packages, as recommmended in many previous forums, no dice.
Additionally, no manual changes were made to the /boot/config.txt and no other scripts are running. This is the first script to be run on the board. I have no other programs running or trying to access the camera as this was literally plugged in and set up straight out of the box.
Any help would be much appreciated. Thanks!
vcgencmd get_camera
say? BTW: do you know that there are some Pi3B+ out there that have the connector the wrong way around? – Dirk Nov 26 '18 at 20:28vcgencmd get_mem gpu
. Second one: multiple camera sessions. Have you made sure that there is just one program trying to access the camera board? – Dirk Nov 26 '18 at 20:37we reallocated 256 to the GPU memory
Just for my peace of mind: can you enable the camera again with raspi-config and then reboot. Check the camera and the actual allocated GPU memory (tbh: I doubt if increasing the GPU mem actually has any positive effect) – Dirk Nov 26 '18 at 20:49top
? – Fabian Nov 27 '18 at 14:57