Skip to content

Error while processing websocket request #8

Open
@zdavatz

Description

@zdavatz

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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions