3

I am getting this error during starting the server after installation of odoo 11.

I am using ubuntu 18.04

my config file is like this

*
[options]
; This is the password that allows database operations:
;admin_passwd = admin
db_host = 127.0.0.1
db_port = 8069
db_user = odoo
db_password = 123
addons_path = /opt/odoo/addons,/opt/odoo/odoo/addons
logfile = /var/log/odoo/odoo-server.log
*

Full error is something like this

2020-02-07 05:12:33,809 12706 CRITICAL ? odoo.modules.module: Couldn't load module web
2020-02-07 05:12:33,809 12706 CRITICAL ? odoo.modules.module: The 'odoo.addons.web' package was not installed in a way that PackageLoader understands.
2020-02-07 05:12:33,809 12706 ERROR ? odoo.service.server: Failed to load server-wide module `web`.
The `web` module is provided by the addons found in the `openerp-web` project.
Maybe you forgot to add those addons in your addons_path configuration.
Traceback (most recent call last):
  File "/opt/odoo/odoo/service/server.py", line 984, in load_server_wide_modules
    odoo.modules.module.load_openerp_module(m)
  File "/opt/odoo/odoo/modules/module.py", line 368, in load_openerp_module
    __import__('odoo.addons.' + module_name)
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/opt/odoo/odoo/modules/module.py", line 82, in load_module
    exec(open(modfile, 'rb').read(), new_mod.__dict__)
  File "<string>", line 4, in <module>
  File "/opt/odoo/addons/web/controllers/__init__.py", line 4, in <module>
    from . import main, pivot
  File "/opt/odoo/addons/web/controllers/main.py", line 56, in <module>
    loader = jinja2.PackageLoader('odoo.addons.web', "views")
  File "/home/sandip/.local/lib/python3.6/site-packages/jinja2/loaders.py", line 290, in __init__
    " PackageLoader understands." % package_name
ValueError: The 'odoo.addons.web' package was not installed in a way that PackageLoader understands.
Sandip Patel
  • 31
  • 1
  • 2

3 Answers3

4

It's actually a bug inside Jinja2. Update it to version 2.11.2

KangOl
  • 313
  • 1
  • 6
1

You might be blocked by a missing parameter in your config file.

Try to add the following parameter in the file:

server_wide_modules = web

It is a requirement for the installation to go through peacefully.

Hope it helps

Jordi Riera
  • 101
  • 1
  • 5
0

Please check your jinja version maybe wrong with your version jinja uninstall them sudo pip3 uninstall Jinja2

then install with right version sudo pip3 install Jinja2==2.10.1