Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while processing websocket request #8

Open
zdavatz opened this issue Apr 14, 2021 · 1 comment
Open

Error while processing websocket request #8

zdavatz opened this issue Apr 14, 2021 · 1 comment
Assignees
Labels
comp:demo Demo related isssues Hardware:Dev Board Coral Dev Board issues subtype:Mendel Linux Mendel Linux Build/installation issues type:support Support question or issue

Comments

@zdavatz
Copy link

zdavatz commented Apr 14, 2021

I am fooling around with the tooling and noted the following:

  1. run the samples with
  2. edgetpu_detect_server --model mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite --labels coco_labels.txt --filter person,car,truck,bus,motocycle,bicycle --threshold 0.4 --print
  3. Normally everything works fine and I watch my output on 192.168.0.7:4664
  4. But sometimes the whole thing crashes with the following output:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/edgetpuvision/gstreamer.py", line 230, in on_new_sample
    command=custom_command)
  File "/usr/lib/python3/dist-packages/edgetpuvision/camera.py", line 43, in render_overlay
    self.render_overlay(tensor, layout, command)
  File "/usr/lib/python3/dist-packages/edgetpuvision/apps.py", line 48, in render_overlay
    overlay = gen.send((tensor, layout, command))
StopIteration
INFO:edgetpuvision.streaming.server:Server is shutting down
INFO:edgetpuvision.streaming.server:Camera stop recording
INFO:edgetpuvision.streaming.server:[192.168.0.1:60322] Stopping...
ERROR:edgetpuvision.streaming.server:[192.168.0.1:60322] Error while processing websocket request
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/edgetpuvision/streaming/server.py", line 584, in _receive_message
    packet = self._receive_packet()
  File "/usr/lib/python3/dist-packages/edgetpuvision/streaming/server.py", line 626, in _receive_packet
    packet.fin = buf[0] & 0x80 > 0
IndexError: index out of range
INFO:edgetpuvision.streaming.server:[192.168.0.1:60322] Tx thread finished
INFO:edgetpuvision.streaming.server:[192.168.0.1:60322] Rx thread finished
INFO:edgetpuvision.streaming.server:[192.168.0.1:60322] Stopped.
INFO:edgetpuvision.streaming.server:[192.168.0.1:35718] Stopping...
INFO:edgetpuvision.streaming.server:[192.168.0.1:35718] Tx thread finished
ERROR:edgetpuvision.streaming.server:[192.168.0.1:35718] Error while processing websocket request
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/edgetpuvision/streaming/server.py", line 584, in _receive_message
    packet = self._receive_packet()
  File "/usr/lib/python3/dist-packages/edgetpuvision/streaming/server.py", line 626, in _receive_packet
    packet.fin = buf[0] & 0x80 > 0
IndexError: index out of range
INFO:edgetpuvision.streaming.server:[192.168.0.1:35718] Rx thread finished
INFO:edgetpuvision.streaming.server:[192.168.0.1:35718] Stopped.
INFO:edgetpuvision.streaming.server:Done
    0: Object(id=0, score=0.58203125, bbox=BBox(xmin=143, ymin=170, xmax=153, ymax=193)), area=230.00
Traceback (most recent call last):
  File "/usr/bin/edgetpu_detect_server", line 11, in <module>
    load_entry_point('edgetpuvision==7.0', 'console_scripts', 'edgetpu_detect_server')()
  File "/usr/lib/python3/dist-packages/edgetpuvision/detect_server.py", line 33, in main
    run_server(add_render_gen_args, render_gen)
  File "/usr/lib/python3/dist-packages/edgetpuvision/apps.py", line 52, in run_server
    signal.pause()
KeyboardInterrupt
  1. After this I kill the commandline and restart and everything is fine again.
  2. I think this happens if the stream is opened and closed from different Browsers. Opening the stream via 192.168.0.7:4664 starts the recording and if you close the browser windows it stops the recording. So then the process seems to crash if that happens by several different open browser windows.
  3. Is there an option to run this as a background process?
@zdavatz
Copy link
Author

zdavatz commented Apr 16, 2021

Sometimes the whole process hangs with

Inference (rate=27.19 fps):INFO:edgetpuvision.streaming.server:[192.168.0.72:59578] Stopping...
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/edgetpuvision/gstreamer.py", line 230, in on_new_sample
INFO:edgetpuvision.streaming.server:[192.168.0.72:59578] Stopped.
INFO:edgetpuvision.streaming.server:Number of active clients: 0
INFO:edgetpuvision.streaming.server:Camera stop recording
    command=custom_command)
  File "/usr/lib/python3/dist-packages/edgetpuvision/camera.py", line 43, in render_overlay
    self.render_overlay(tensor, layout, command)
  File "/usr/lib/python3/dist-packages/edgetpuvision/apps.py", line 48, in render_overlay
    overlay = gen.send((tensor, layout, command))
  File "/usr/lib/python3/dist-packages/edgetpuvision/detect.py", line 160, in render_gen
    print_results(inference_rate, objs)
  File "/usr/lib/python3/dist-packages/edgetpuvision/detect.py", line 121, in print_results
    print('\nInference (rate=%.2f fps):' % inference_rate)
BlockingIOError: [Errno 11] write could not complete without blocking

@hjonnala hjonnala added comp:demo Demo related isssues Hardware:Dev Board Coral Dev Board issues subtype:Mendel Linux Mendel Linux Build/installation issues type:support Support question or issue labels Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:demo Demo related isssues Hardware:Dev Board Coral Dev Board issues subtype:Mendel Linux Mendel Linux Build/installation issues type:support Support question or issue
Projects
None yet
Development

No branches or pull requests

3 participants