python - django-socketio如何发送中文内容?
巴扎黑
巴扎黑 2017-04-17 11:50:56
[Python讨论组]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent-0.13.8-py2.7-linux- x86_64.egg/gevent/greenlet.py", line 390, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/gevent_socketio-0.2.1-py2.7.egg/socketio/server.py", line 49, in handle
handler.handle()
File "/usr/local/lib/python2.7/dist-packages/gevent-0.13.8-py2.7-linux-x86_64.egg/gevent/pywsgi.py", line 180, in handle
result = self.handle_one_request()
File "/usr/local/lib/python2.7/dist-packages/gevent-0.13.8-py2.7-linux-x86_64.egg/gevent/pywsgi.py", line 314, in handle_one_request
self.handle_one_response()
File "/usr/local/lib/python2.7/dist-packages/gevent_socketio-0.2.1-py2.7.egg/socketio/handler.py", line 68, in handle_one_response
jobs = self.transport.connect(session, request_method)
File "/usr/local/lib/python2.7/dist-packages/gevent_socketio-0.2.1-py2.7.egg/socketio/transports.py", line 101, in connect
return self.handle_post_response(session)
File "/usr/local/lib/python2.7/dist-packages/gevent_socketio-0.2.1-py2.7.egg/socketio/transports.py", line 67, in handle_post_response
messages = self.decode(data)
File "/usr/local/lib/python2.7/dist-packages/gevent_socketio-0.2.1-py2.7.egg/socketio/transports.py", line 16, in decode
return self.handler.environ['socketio'].decode(data)
File "/usr/local/lib/python2.7/dist-packages/gevent_socketio-0.2.1-py2.7.egg/socketio/protocol.py", line 113, in decode
messages.append(json.loads(data[3:size]))
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 381, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Unterminated string starting at: line 1 column 40 (char 39)
<Greenlet at 0x2afa4b0: <bound method SocketIOServer.handle of <SocketIOServer at 0x2914d90 fileno=3 address=127.0.0.1:9000>>(<socket at 0x2af5f50 fileno=[Errno 9] Bad file des, ('127.0.0.1', 42889))> failed with ValueError
巴扎黑
巴扎黑

全部回复(0)
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号