EdjeElectronics/TensorFlow-Object-Detection-on-the-Raspberry-Pi

Incorrect buffer length for resolution ...

KoizumiNao opened this issue · 1 comments

Hi does anyone encounter this kind of problem? How did you all solve it after encountering this problem?
**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 "Object_detection_picamera.py", line 130, in
for frame1 in camera.capture_continuous(rawCapture, format="bgr",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 640x480**

Device: Raspberry Pi 3 B+

Thank you in advance if there is.

I am also dealing with this issue except the resolution given is 1280x720 and not 640x480. No solutions found yet.