Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
6780 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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.


Awatar
Odrzuć
Najlepsza odpowiedź

change python version to 3.7

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
7
gru 23
44614
3
paź 15
7295
1
sie 21
11204
1
lis 20
21179
4
mar 15
10465