Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
6755 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Meilleure réponse

change python version to 3.7

Avatar
Ignorer
Publications associées Réponses Vues Activité
7
déc. 23
44589
3
oct. 15
7277
1
août 21
11183
1
nov. 20
21170
4
mars 15
10423