'utf8' codec can't decode bytes in position 0-1: invalid data
-
这个错误提示是指, 在将字节码按照utf-8来解码转换为unicode的过程中出错了。没有统一的解法,必须要找到错误的发生地。
-
以上是程序前端的错误提示,在client的日志里的记录如下:
Traceback (most recent call last):
File "openerp-client.py", line 135, in <module>
File "modulesguimain.pyo", line 1011, in sig_login
File "rpc.pyo", line 233, in login
File "rpc.pyo", line 297, in context_reload
File "rpc.pyo", line 169, in rpc_exec_auth
File "rpc.pyo", line 83, in exec_auth
File "rpc.pyo", line 101, in execute
File "xmlrpclib.pyo", line 1147, in call
File "xmlrpclib.pyo", line 1437, in __request
File "xmlrpclib.pyo", line 1201, in request
File "xmlrpclib.pyo", line 1335, in _parse_response
File "xmlrpclib.pyo", line 817, in end
File "xmlrpclib.pyo", line 864, in end_string
File "xmlrpclib.pyo", line 164, in _decode
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: invalid data -
停止openerp-server服务,在dos环境下用以下命令启动服务器
[code]openerp-server --log-level=debug_rpc
[/code]
用GTK客户端连接服务器,出错后,将[b]服务器[/b]的log文件的最后30行拷贝过来。另外,检查一下windows用户目录下(即:c:documents and settingsYour_Account下)的配置文件(openerp_server.conf, openerp_client.conf)设置是否正确。你是卸载了之前安装的openerp后重新安装的,设置文件可能是之前遗留的,有没有设置路径的问题。