Loss package when getting Live mode? Does anyone get this error?

Hi, I use PROTOCOL INTEGRATION to get data from another Milestone device.

But I have some issues in the Live mode:

1. Sometimes I can not get the correct data, I can not decode bytes of Header data.

[Traceback] UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xc4 in position 5: invalid continuation byte

2. Sometimes the whole data that I got can not decode to the image.

[Can’t decode with ​TurboJPEG] OSError: Premature end of JPEG file

I have not already found the reason.

Please help!

Thank you so much!

I am assuming you are using the Image Server protocol to get live video data.

It seems odd to me that you can get the UnicodeDecodeError when handling bytes of header data, the bytes should not be interpreted as being text.

You might compare with the TCPVideoViewer sample, how it treats the same data from the Image Server protocol.

Hi Bo,

Thank you so much for your help!!!