中文的deploy问题
Created by: yyhlvdl
终于,我在docker中启动了服务器和客户端,然后说了一段中文,出现这样的错误: Exception happened during processing of request from ('127.0.0.1', 59312) Traceback (most recent call last): File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock self.process_request(request, client_address) File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request self.finish_request(request, client_address) File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.7/SocketServer.py", line 652, in init self.handle() File "deploy/demo_server.py", line 108, in handle (finish_time - start_time, transcript)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 39-48: ordinal not in range(128) 我个人觉得,可以把识别结果存储到一个文件中,没必要打印出来,当然,如果作者可以解决打印的问题,就更好了。