1

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!

13
  • Can you explain in more detail why you think it's a software problem? It's not clear to me what exactly you did to conclude that. Also: no resources can mean the camera is not properly enabled. Did you use the RPF config utility or did you do that manually? Did you make any manual changes to /boot/config.txt? Are you running more than 1 program/script that uses the camera concurrently? The camera hardware does not support that.
    – Dirk
    Nov 26, 2018 at 20:01
  • Please add any additional details to your question
    – Dirk
    Nov 26, 2018 at 20:12
  • Hi Dirk, I believe it is a software problem because 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 did use the config utility to enable the camera and reboot the board after doing so. 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.
    – user94448
    Nov 26, 2018 at 20:12
  • What did 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, 2018 at 20:28
  • It displayed: supported = 1 detected = 1. I did try reversing the connector with no luck. I also tried the camera on a pi zero W and it displayed the same error.
    – user94448
    Nov 26, 2018 at 20:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.