0
from picamera import PiCamera
import time

camera = PiCamera()
camera.resolution = (3280,2464)
time.sleep(2)
camera.capture("test1.bmp")  # This code doesn't work
#camera.capture("test1.jpg")  # This code does work

returns errors:

> mmal: mmal_vc_port_enable: failed to enable port
> vc.ril.image_encode:out:0(BMP ): ENOSPC
> 
> mmal: mmal_port_enable: failed to enable port
> vc.ril.image_encode:out:0(BMP )(0x1caf8d0) (ENOSPC)
> 
> Traceback (most recent call last):
>   File "/home/pi/Desktop/aut.py", line 10, in <module>
>     camera.capture("test1.bmp")  # This code doesn't work
>   File "/home/pi/Desktop/picamera/camera.py", line 1418, in capture
>     encoder.start(output)
>   File "/home/pi/Desktop/picamera/encoders.py", line 1126, in start
>     super(PiCookedOneImageEncoder, self).start(output)
>   File "/home/pi/Desktop/picamera/encoders.py", line 377, in start
>     self.output_port.enable(self._callback)
>   File "/home/pi/Desktop/picamera/mmalobj.py", line 1249, in enable
>     prefix="Unable to enable port %s" % self.name)
>   File "/home/pi/Desktop/picamera/exc.py", line 184, in mmal_check
>     raise PiCameraMMALError(status, prefix)
> picamera.exc.PiCameraMMALError: Unable to enable port vc.ril.image_encode:out:0: Out of resources
  • 1
    Does it work if you reduce the resolution? My guess is that there is an internal buffer that is not big enough for the uncompressed bmp file. – Craig Jan 15 at 21:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.