Reference: https://www.sunpop.cn/odoo13_bug_fixed_can_not_debug_on_python_3-7/
Environment Introduction :
OS: Win 10;
Development Tools: pycharm
python Version: 3.6
Problem Description :
When you start debugging, reported the following error
Not when debugging (direct operation) there is no problem
Solution :
Change odoo / tools / translate.py in resetlocale in odoo source code
Join a code:
ln = ln[0:ln.index('.')]
The complete code is as follows:
def resetlocale(): # locale.resetlocale is bugged with some locales. for ln in get_locales(): try: ln = ln[0:ln.index('.')] return locale.setlocale(locale.LC_ALL, ln) except locale.Error: continue
Start again, the problem is solved: