However sometimes when I boot up the raspberry the code crashes and by redirecting stderr on a log file I found out this traceback:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1704, in capture_continuous
'Timed out waiting for capture to end')
picamera.exc.PiCameraRuntimeError: Timed out waiting for capture to end
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/mlx90640-library/thermal.py", line 45, in <module>
for frame in camera.capture_continuous(rawCapture, format="rgb", use_video_port=True):
File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1710, in capture_continuous
encoder.close()
File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 431, in close
self.stop()
File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 419, in stop
self._close_output()
File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 349, in _close_output
mo.close_stream(output, opened)
File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 371, in close_stream
stream.flush()
File "/usr/lib/python3/dist-packages/picamera/array.py", line 238, in flush
self.array = bytes_to_rgb(self.getvalue(), self.size or self.camera.resolution)
File "/usr/lib/python3/dist-packages/picamera/array.py", line 127, in bytes_to_rgb
'Incorrect buffer length for resolution %dx%d' % (width, height))
picamera.exc.PiCameraValueError: Incorrect buffer length for resolution 288x368
I'm not expert on the picamera and the odd thing is that other times it works perfectly. If there was an error for the buffer length for resolution, shouldn't the code always fail instantly?
Is there a way to fix this issue?
Hi,
I've tinkered a little bit with your code in order to make it run fullscreen and I placed an instruction in
/etc/xdg/lxsession/LXDE-pi/autostartto make it autostart when the LXDE starts. The rest of the code is pretty much the same original one.However sometimes when I boot up the raspberry the code crashes and by redirecting stderr on a log file I found out this traceback:
I'm not expert on the picamera and the odd thing is that other times it works perfectly. If there was an error for the buffer length for resolution, shouldn't the code always fail instantly?
Is there a way to fix this issue?