1、今天在装了电脑以后,又发现了,运行odoo无法在pycharm上进行debug调试的问题。
先看看报错情况:
错误:Process finished with exit code -1073740940 (0xC0000374)
使用之前的老版本的python是没有问题的。3.6以上会出现,无法运行调试的情况。
但是在非debug情况下,运行又是正常的。
这里,我们之前也给过解决办法,就是去修改windos时区,勾选base。可以在我的另外一篇博客中看到。
odoo Windows10启动debug模式报错(Process finished with exit code 1073740940 (0xC0000374))_王帅的博客-CSDN博客
这里说一下,通过修改时区,这个方式。可能会出现,文件夹,等中文乱码。不推荐使用这种方式。
2、我们现在说下,官方给出的新的解决办法。通过修改代码的方式,顺利进行debug调试模式。
我们找到该文件:odoo/tools/translate.py
然后找到下面的方法:
def resetlocale():
# locale.resetlocale is bugged with some locales.
for ln in get_locales():
try:
### 添加下面这一行。##解决无法debug问题
ln = ln[0:ln.index('.')]
###
return locale.setlocale(locale.LC_ALL, ln)
except locale.Error:
continue
添加一行内容。
ln = ln[0:ln.index('.')]
然后重新运行一下。完美解决问题。
搞定收工、