haileyw
Posts: 35
Joined: Thu May 25, 2017 4:10 pm

Error Taking Photos With Pi Camera

Mon May 29, 2017 6:24 pm

I'm trying to take a time lapse with the raspberry pi camera module V2, but I keep getting the following error when I try to run the python:

mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
Traceback (most recent call last):
File "gpioTest.py", line 13, in <module>
camera = picamera.PiCamera(resolution=(3264,2448))
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 431, in __init__
self._init_camera(camera_num, stereo_mode, stereo_decimate)
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 460, in _init_camera
"Camera is not enabled. Try running 'sudo raspi-config' "
picamera.exc.PiCameraError: Camera is not enabled. Try running 'sudo raspi-config' and ensure that the camera has been enabled.

I'm confused because the command works for the pi camera attatched to the actual pi board.

Online I saw people saying to reconnect the sunny connector which I tried (although it doesn't say sunny on my cameras) and the same error still shows up. I think I need to reconnect/add the cameras to the pi on the terminal but I'm not sure how to do that. Any thoughts?

DirkS
Posts: 10398
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Error Taking Photos With Pi Camera

Mon May 29, 2017 6:30 pm

Have you tried to enable the camera again in raspi-config (or the GUI configuration utility)?
What is the output of

Code: Select all

vcgencmd get_camera
Can you also post /boot/config.txt?
Did you make any (manual) changes to that file?

haileyw
Posts: 35
Joined: Thu May 25, 2017 4:10 pm

Re: Error Taking Photos With Pi Camera

Mon May 29, 2017 6:31 pm

It says:

supported=1 detected=0

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

Re: Error Taking Photos With Pi Camera

Mon May 29, 2017 6:31 pm

picamera/camera.py", line 460, in _init_camera
"Camera is not enabled. Try running 'sudo raspi-config' "
picamera.exc.PiCameraError: Camera is not enabled. Try running 'sudo raspi-config' and ensure that the camera has been enabled.

I'm confused because the command works for the pi camera attatched to the actual pi board.
So how is the camera connected if it isn't "attached to the actual pi board"?

PS: editted to observe that detected=0 indicates some sort of cable/connection problem.

User avatar
Strider64
Posts: 13
Joined: Sat May 13, 2017 12:35 pm
Location: Livonia (Detroit), Mi
Contact: Website

Re: Error Taking Photos With Pi Camera

Mon May 29, 2017 6:34 pm

do you have the cable running from the Pi Camera to the rPi in correctly?
"Insanity Is Doing the Same Thing Over and Over Again and Expecting Different Results" ~ Albert Einstein

haileyw
Posts: 35
Joined: Thu May 25, 2017 4:10 pm

Re: Error Taking Photos With Pi Camera

Mon May 29, 2017 6:44 pm

Okay, I think the issue is that the cameras are not connected to the actual board. I have one board set up and 4 cameras, will this work or do I need to attach more boards?

DirkS
Posts: 10398
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Error Taking Photos With Pi Camera

Mon May 29, 2017 6:45 pm

haileyw wrote:Okay, I think the issue is that the cameras are not connected to the actual board. I have one board set up and 4 cameras, will this work or do I need to attach more boards?
So what board exactly is the camera connected to?

haileyw
Posts: 35
Joined: Thu May 25, 2017 4:10 pm

Re: Error Taking Photos With Pi Camera

Mon May 29, 2017 6:49 pm

The raspberry pi 3 is the main board with one camera immediately attached to it. The other 3 cameras are not physically connected.

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

Re: Error Taking Photos With Pi Camera

Mon May 29, 2017 7:34 pm

I don't think I understand what you are trying to accomplish.

But I think I am right in saying the the connection between an RPi board and an 'official' camera module is a One-to-one option only.

That is: an RPi board can only connect to a single camera, and a camera module can only connect to a single RPi.

Does that 'break' what you are planning to do?

haileyw
Posts: 35
Joined: Thu May 25, 2017 4:10 pm

Re: Error Taking Photos With Pi Camera

Tue May 30, 2017 12:56 pm

So I realized that the cameras were not capturing pictures because they disconnected from the pi zeros I have set up. Now I'm able to take picture time lapses but for some reason when I try to take a video, the videos that it takes are just of a black screen (which I know is not what it should look like since when I take photos it is not just a black screen). Any ideas on why this is happening?

DirkS
Posts: 10398
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Error Taking Photos With Pi Camera

Tue May 30, 2017 1:29 pm

Do you use python + picamera module for video?
Have you tried if it work with raspivid?

haileyw
Posts: 35
Joined: Thu May 25, 2017 4:10 pm

Re: Error Taking Photos With Pi Camera

Thu Jun 01, 2017 2:50 pm

Raspivid worked perfectly for what I need, thanks!

One more similarly related question: When I try and take photo timelapses, I get an error saying my pi failed to create a camera component and I was wondering if any of you knew how to fix this?

I've already tried doing sudo raspi-config and enabling the camera but this does not change anything.

Return to “Troubleshooting”