Posts: 1
Joined: Sat May 18, 2019 9:21 pm

problem with pi camera module in python, when running from pi shell

Sat May 18, 2019 9:41 pm

when I try run a python script that makes use of the PiCamara Library from the Pi Terminal i get the following errors:-

python timelapse.py
mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC
mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0x2384fe0 (ENOSPC)
mmal: mmal_connection_enable: output port couldn't be enabled
Traceback (most recent call last):
File "timelapse.py", line 10, in <module>
camera = PiCamera()
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 433, in __init__
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 513, in _init_preview
self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
File "/usr/lib/python2.7/dist-packages/picamera/renderers.py", line 558, in __init__
File "/usr/lib/python2.7/dist-packages/picamera/mmalobj.py", line 2212, in enable
prefix="Failed to enable connection")
File "/usr/lib/python2.7/dist-packages/picamera/exc.py", line 184, in mmal_check
raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources

it looks like to me something is not enabled correctly. I am new to the Pi and Python

I am using the PI GUI with the Pi plugged into a monitor

the camera is enabled as I have captured stills and Video using the built in commands

would someone be able to point me in the right direction.


Return to “Python”