İçereği Atla
Menü
This question has been flagged
2 Cevaplar
6756 Görünümler

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

Avatar
Vazgeç
Best Answer

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.


Avatar
Vazgeç
Best Answer

change python version to 3.7

Avatar
Vazgeç
Related Posts Cevaplar Görünümler Aktivite
7
Ara 23
44589
3
Eki 15
7277
1
Ağu 21
11184
1
Kas 20
21170
4
Mar 15
10423