Page 1 of 1

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

Posted: Sat May 18, 2019 9:41 pm
by IanRaPi
when I try run a python script that makes use of the PiCamara Library from the Pi Terminal i get the following errors:-

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 "", line 10, in <module>
camera = PiCamera()
File "/usr/lib/python2.7/dist-packages/picamera/", line 433, in __init__
File "/usr/lib/python2.7/dist-packages/picamera/", line 513, in _init_preview
self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
File "/usr/lib/python2.7/dist-packages/picamera/", line 558, in __init__
File "/usr/lib/python2.7/dist-packages/picamera/", line 2212, in enable
prefix="Failed to enable connection")
File "/usr/lib/python2.7/dist-packages/picamera/", 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.