コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
6802 ビュー

when I am going to run odoo using ./odoo-bin -c /etc/odoo-server.conf

I encounter with following error:

  1. Traceback (most recent call last):
  2. File "/home/morteza/nak_project/odoo/odoo-server/./odoo-bin", line 5, in
  3. import odoo
  4. File "/home/morteza/nak_project/odoo/odoo-server/odoo/__init__.py", line 73, in
  5. import babel
  6. File "/home/morteza/nak_project/odoo/env/lib/python3.10/site-packages/babel/__init__.py", line 20, in
  7. from babel.core import UnknownLocaleError, Locale, default_locale, \
  8. File "/home/morteza/nak_project/odoo/env/lib/python3.10/site-packages/babel/core.py", line 14, in
  9. from babel import localedata
  10. File "/home/morteza/nak_project/odoo/env/lib/python3.10/site-packages/babel/localedata.py", line 17, in
  11. from collections import MutableMapping
  12. ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

I have already installed babel-2.3.4 version

アバター
破棄
最善の回答

Odoo 12 python requirement use babel=2.3.4 and this library uses  MutableMapping from collections.abc module in python which already deprecated in 3.8.

Babel library already changed it in V2.9.1 and using ABCs from collections instead of collections.abc is deprecated

https://github.com/python-babel/babel/commit/65d6bf39f2a2b4bbbbc02cd1e00c44ce9d7c1c5b#diff-efc3eeaaafe0e86beabfcbded9caeaab1a41af159501fc4d973a2cf9c577e89a

You can try to uninstall babel=2.3.4 and install any version of babel after 2.9.1

Or you can install python3.7 and it will work.


アバター
破棄
最善の回答

change python version to 3.7

アバター
破棄
関連投稿 返信 ビュー 活動
7
12月 23
44625
3
10月 15
7319
1
8月 21
11220
1
11月 20
21187
4
3月 15
10494