[BUG] Exception during process_requests
See original GitHub issueI’m running the motion capture example without changing anything and it does capture the motion. However, after the 2nd motion capture, it just dies with an error.
- Copy paste the code AS-IS to main.py
- Run it as python main.py
Ideally, it should continue recording motion videos and continue to write it as output without dying.
[5:24:09.901470365] [975] INFO Camera camera_manager.cpp:293 libcamera v0.0.1+54-d528119f
[5:24:10.049589460] [976] INFO RPI raspberrypi.cpp:1414 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media3 and ISP device /dev/media0
[5:24:10.093262193] [975] INFO Camera camera.cpp:1026 configuring streams: (0) 1280x720-RGB888 (1) 320x240-YUV420
[5:24:10.095656178] [976] INFO RPI raspberrypi.cpp:800 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1920x1080-SGBRG10_1X10 - Selected unicam format: 1920x1080-pGAA
New Motion 7.809947916666666
New Motion 7.044270833333333
New Motion 7.252734375
Exception during process_requests()
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/picamera2/previews/null_preview.py", line 82, in handle_request
completed_request = picam2.process_requests()
File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 1135, in process_requests
self._encoder.encode(stream, display_request)
File "/usr/lib/python3/dist-packages/picamera2/encoders/v4l2_encoder.py", line 243, in encode
fcntl.ioctl(self.vd, VIDIOC_QBUF, buf)
OSError: [Errno 22] Invalid argument
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3/dist-packages/picamera2/previews/null_preview.py", line 30, in thread_func
callback(picam2)
File "/usr/lib/python3/dist-packages/picamera2/previews/null_preview.py", line 82, in handle_request
completed_request = picam2.process_requests()
File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 1135, in process_requests
self._encoder.encode(stream, display_request)
File "/usr/lib/python3/dist-packages/picamera2/encoders/v4l2_encoder.py", line 243, in encode
fcntl.ioctl(self.vd, VIDIOC_QBUF, buf)
OSError: [Errno 22] Invalid argument
^CTraceback (most recent call last):
File "/home/mohsin/cat-detector/main.py", line 27, in <module>
cur = picam2.capture_buffer("lores")
File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 1308, in capture_buffer
return self._execute_or_dispatch(partial(self.capture_buffer_, name), wait, signal_function)
File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 1212, in _execute_or_dispatch
return self.wait()
File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 1156, in wait
result = self._future.result()
File "/usr/lib/python3.9/concurrent/futures/_base.py", line 435, in result
self._condition.wait(timeout)
File "/usr/lib/python3.9/threading.py", line 312, in wait
waiter.acquire()
KeyboardInterrupt
Hardware :
- Raspberry Pi Zero W.
- 5MP Raspberry Pi Zero W Camera Module W/ HBV FFC Cable
Software : Raspian Pi Lite OS (Bullseye)
Issue Analytics
- State:
- Created 10 months ago
- Comments:5
Top Results From Across the Web
[Bug] Error: An unhandled exception occurred while ... - GitHub
Once the download was complete the Data page was unavailable with the error: An unhandled exception occurred while processing the request.
Read more >OSB XQuery Exception Processing Request - Oracle Support
This was a severe problem because our managed server did not process any requests during hours. Which are the cause of this exception?...
Read more >python - Exception happened during processing of request
This is the bug in python version 2.6, update your python. mine is working with 3.4.4 version. – Mahattam. Jan 27, 2016 at...
Read more >Error occurred during processing server request - null ...
There is an exception but I cannot see it's whole content. It disappears just after I place cursor over it's content area. This...
Read more >An unhandled exception occurred while processing the request.
This doesn't seem to be a bug in ASP.NET Core. The exception is being thrown from Oracle.ManagedDataAccess.Client.OracleCommand.ValidateStatePriorToExecution().
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just tested this using v 0.3.6 which I can replicate this issue in. (I also used a pizero)
If you upgrade your picamera version, to get v 0.3.7, which was released today, I believe this should be fixed.
Thanks for reporting this. I’ve just been testing it, but on a pi4, and it seems to work ok here, so I’ll see if I can find a pi zero w.