0

i facing this error when i try to run odoo15 on Debian 11 server and try to run it on nginx here is the odoo log file

2023-01-18 16:35:48,178 48668 INFO ? odoo: database: odoo15@default:default
2023-01-18 16:35:48,181 48668 CRITICAL ? odoo.modules.module: Couldn't load module web
2023-01-18 16:35:48,181 48668 CRITICAL ? odoo.modules.module: cannot import name 'replace_exceptions' from 'odoo.tools' (/opt/odoo15/odoo/odoo/tools/__init__.py)
2023-01-18 16:35:48,181 48668 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/odoo15/odoo/odoo/service/server.py", line 1210, in  load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/opt/odoo15/odoo/odoo/modules/module.py", line 396, in  load_openerp_module
__import__('odoo.addons.' + module_name)
File "/usr/lib/python3/dist-packages/odoo/addons/web/__init__.py", line 4, in <module>
from . import controllers
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/__init__.py", line 4, in <module>
from . import binary
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/binary.py", line 22, in <module>
from odoo.tools import file_open, file_path, replace_exceptions
ImportError: cannot import name 'replace_exceptions' from 'odoo.tools'    (/opt/odoo15/odoo/odoo/tools/__init__.py)
  2023-01-18 16:35:48,291 48668 INFO ? odoo.addons.base.models.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
2023-01-18 16:35:48,435 48668 INFO ? odoo.service.server: HTTP service      (werkzeug) running on localhost:8069

and here is my odoo15.service file which located in /etc/systemd/system/

[Unit]
Description=Odoo
Documentation=http://www.odoo.com
[ Service]
Type=simple
User=odoo15
ExecStart= /usr/bin/python3 /opt/odoo15/odoo/odoo-bin -c /etc/odoo.conf

[Install]
WantedBy=default.target

and here is my odoo.conf which is created in /etc/

[options]
; This is the password that allows database operations:
admin_passwd = adminpassword
db_host = False
db_port = False
db_user = odoo15
db_password = False
xmlrpc_interface = 127.0.0.1
proxy_mode = True
addons_path = /opt/odoo15/odoo/addons
logfile = /var/log/odoo/odoo.log
Sideeg MoHammed
  • 375
  • 2
  • 10
  • The import `from odoo.tools import file_open, file_path, replace_exceptions` is from Odoo 16. Are you sure you're using Odoo 15? – CZoellner Jan 18 '23 at 15:36
  • @CZoellner your right it was odoo16 log file i edit the question and add the odoo15 log file – Sideeg MoHammed Jan 18 '23 at 15:56
  • looks like problems with python dependencies, here something with `werkzeug`. Did you install all python [requirements](https://github.com/odoo/odoo/blob/15.0/requirements.txt)? – CZoellner Jan 18 '23 at 16:10
  • yah i did pip3 install -r /opt/odoo15/odoo/requirements.txt and complete successfully and now werkzeug version is 0.16.0 – Sideeg MoHammed Jan 18 '23 at 16:17

1 Answers1

0

My problem:- not showing proper format odoo 12 in browser at localhost. Answer:- first check your addons path. this thing works for me. mainly my_addons directory path.

Hardik
  • 1
  • 1