scene:
Raspberry pie 3B+
camera is official:
, ,
, ,
:
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))0x16b90b0 (ENOSPC)
mmal: mmal_connection_enable: output port couldn"t be enabled
Traceback (most recent call last):
File "main.py", line 91, in <module>
color_temp = recog_color()
File "/home/pi/Desktop/GO/recog_color.py", line 35, in recog_color
camera = PiCamera()
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 433, in __init__
self._init_preview()
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__
self.renderer.inputs[0].connect(source).enable()
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
pi@raspberrypi:~/Desktop/GO $ python main.py
/usr/lib/python2.7/dist-packages/picamera/encoders.py:544: PiCameraResolutionRounded: frame size rounded up from 150x150 to 160x160
width, height, fwidth, fheight)))
[[array([ 35, 128, 46]), array([ 77, 255, 255]), 2], [array([100, 40, 40]), array([140, 255, 255]), 3]]
[[array([100, 40, 40]), array([140, 255, 255]), 3]]
[]
VIDIOC_STREAMON: Invalid argument
None
Traceback (most recent call last):
File "main.py", line 116, in <module>
print_SPI(QRcode_str)
File "/home/pi/Desktop/GO/print_SPI.py", line 64, in print_SPI
draw.text((15, 96), str[0], fill = x2color_dict[ str[0] ], font = font)
TypeError: "NoneType" object has no attribute "__getitem__"
it is mainly the problem of VIDIOC_STREAMON: Invalid argument,
do I have to release camera resources manually? To solve, or, how to manually release camera resources?