验证:win下python3.5绿色版odoo加载中文语言报错: UnicodeDecodeError: 'gbk' codec can't decode byte的解决方案
-
出处:https://www.wffeitas.com/blog/zi-xun-4/post/win10-tong-guoexe-an-zhuangodoo11-78
改源码肯定不是很好的方法:
可以考虑写个模块继承, 或者有心人可以提交给官方这个问题,
奇怪的是python2.7下没这个问题。错误信息:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 553: illegal multibyte sequence
报错之后系统的界面就空了,
解决办法:
将source\addons\web\controllers\main.py的load_locale方法改一下
'r' 改为 'rb'
with open(os.path.join(addons_path, 'web', 'static', 'lib', 'moment', 'locale', code + '.js'), 'rb') as f:python3.5的odoo11绿色版链接: [检测到链接无效,已移除] 密码: yper
谢谢大家。
-
D:\GOdoo11PY3>"D:\GOdoo11PY3"\runtime\pgsql\bin\pg_ctl -D "D:\GOdoo11PY3"\runtime\pgsql\data -l "D:\GOdoo11PY3"\runtime\pgsql\logfile start
pg_ctl: 其他服务器进程可能正在运行; 尝试启动服务器进程
正在启动服务器进程D:\GOdoo11PY3>"D:\GOdoo11PY3"\runtime\python\python "D:\GOdoo11PY3"\source\odoo-bin -c "D:\GOdoo11PY3"\openerp-server.conf
2018-01-07 09:24:44,118 5312 INFO ? odoo: Odoo version 11.0
2018-01-07 09:24:44,118 5312 INFO ? odoo: Using configuration file at D:\GOdoo11PY3\openerp-server.conf
2018-01-07 09:24:44,118 5312 INFO ? odoo: addons paths: ['data\addons\11.0', 'D:\GOdoo11PY3\source\addons', 'D:\GOdoo11PY3\myaddons', 'D:\GOdoo11PY3\source\odoo\addons']
2018-01-07 09:24:44,133 5312 INFO ? odoo: database: [email protected]:65432
2018-01-07 09:24:44,133 5312 INFO ? odoo.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
Traceback (most recent call last):
File "D:\GOdoo11PY3\source\odoo-bin", line 8, in
odoo.cli.main()
File "D:\GOdoo11PY3\source\odoo\cli\command.py", line 60, in main
o.run(args)
File "D:\GOdoo11PY3\source\odoo\cli\server.py", line 175, in run
main(args)
File "D:\GOdoo11PY3\source\odoo\cli\server.py", line 169, in main
rc = odoo.service.server.start(preload=preload, stop=stop)
File "D:\GOdoo11PY3\source\odoo\service\server.py", line 988, in start
rc = server.run(preload, stop)
File "D:\GOdoo11PY3\source\odoo\service\server.py", line 325, in run
self.cron_spawn()
File "D:\GOdoo11PY3\source\odoo\service\server.py", line 243, in cron_spawn
datetime.datetime.strptime('2012-01-01', '%Y-%m-%d')
File "D:\GOdoo11PY3\runtime\python\lib_strptime.py", line 273, in
_TimeRE_cache = TimeRE()
File "D:\GOdoo11PY3\runtime\python\lib_strptime.py", line 190, in init
self.locale_time = LocaleTime()
File "D:\GOdoo11PY3\runtime\python\lib_strptime.py", line 73, in init
self.__calc_weekday()
File "D:\GOdoo11PY3\runtime\python\lib_strptime.py", line 93, in __calc_weekday
a_weekday = [calendar.day_abbr[i].lower() for i in range(7)]
File "D:\GOdoo11PY3\runtime\python\lib_strptime.py", line 93, in
a_weekday = [calendar.day_abbr[i].lower() for i in range(7)]
File "D:\GOdoo11PY3\runtime\python\lib\calendar.py", line 82, in getitem
return funcs(self.format)
ValueError: embedded null byte