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

在jiance(request)中执行到websocket.send出错 #2

Open
sxbug opened this issue Jul 24, 2020 · 1 comment
Open

在jiance(request)中执行到websocket.send出错 #2

sxbug opened this issue Jul 24, 2020 · 1 comment

Comments

@sxbug
Copy link

sxbug commented Jul 24, 2020

python3.7.8 64bit,dwebsocket0.5.12(没有使用你的版本),opencv-python4.3.0.36, django 3.0.8
单步跟踪到request.websocket.send(imghtml)时,web界面上显示错误:
127.0.0.1:8000 显示
Error: [object Event]

摄像头采集的原始图像(有视频内容) 经检测后返回的图像(没有任何显示)

请问这要如何处理,谢谢。
是不是 dwebsocket 与 django不兼容了?

@sxbug
Copy link
Author

sxbug commented Jul 25, 2020

imghtml = imghtml.encode(encoding='UTF-8',errors='strict')
这样处理也报同样的错误,应该是编码的问题。(websocket.send 允许二进制流?)
结果 imghtml的编码是:
'encoding': 'windows-1253', 'confidence': 0.2609304317983753, 'language': 'Greek'

这样不知道要怎么处理成utf-8

还请指教。
谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant