applesauce
Posts: 1
Joined: Thu Jul 11, 2019 11:06 pm

PiCamera not working

Thu Jul 11, 2019 11:23 pm

Hey! I'm new to the Raspberry Pi and have recently run into an issue.

I have updated and upgraded Raspbian multiple times in preparation to use my camera. My camera is attached correctly and I have enabled the camera software on my Pi. However, whenever I input raspistill -o cam.jpg into my terminal, I get the following error message:

Code: Select all

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates.
Whenever I try to use Python to take a photo, I get this message:

Code: Select all

Traceback (most recent call last):
  File "/home/pi/DukeTip/camera.py", line 4, in <module>
    camera = PiCamera()
  File "/usr/lib/python3/dist-packages/picamera/camera.py", line 433, in __init__
    self._init_preview()
  File "/usr/lib/python3/dist-packages/picamera/camera.py", line 513, in _init_preview
    self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
  File "/usr/lib/python3/dist-packages/picamera/renderers.py", line 558, in __init__
    self.renderer.inputs[0].connect(source).enable()
  File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 2212, in enable
    prefix="Failed to enable connection")
  File "/usr/lib/python3/dist-packages/picamera/exc.py", line 184, in mmal_check
    raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources
I have updated my firmware multiple times while trying to figure this out. I have discussed this with multiple people, but I can't find a solution. How can I fix this?

Thanks!

User avatar
B.Goode
Posts: 7870
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: PiCamera not working

Fri Jul 12, 2019 6:37 am

Welcome to the Raspberry Pi forums.


The official Raspberry Pi documentation for the Camera Module, including Troubleshooting, is here: https://www.raspberrypi.org/documentati ... /camera.md


To highlight some possibilities:
The camera module needs to be enabled in your installed Operating System.
There are 3 connections that need checking.
The camera can only be used by one script or tool at a time.

Return to “Camera board”