Skip to Content
Menu
This question has been flagged
1 Reply
891 Views

I installed a fresh Ubuntu 16/ODOO 10 server and restored a DB from another server. 

Backoffice is not working. I have noticed the addons folder is wrong.

It says "addons paths: ['/opt/odoo/.local/share/Odoo/addons/10.0', u'/opt/odoo/addons', '/opt/odoo/odoo/addons']" while my

relevant line of /etc/odoo-server.conf is:

addons_path = /opt/odoo/addons


When I try to go to backoffice, all http get requests return 404



  CGroup: /system.slice/odoo.service

           └─946 python /opt/odoo/odoo-bin -c /etc/odoo-server.conf



kdl@odoo:~$ sudo tail -f /var/log/odoo/odoo.log

2023-01-27 14:47:19,005 946 INFO epatec-11mar werkzeug: 127.0.0.1 - - [27/Jan/2023 14:47:19] "GET /web_planner/static/src/xml/web_planner.xml HTTP/1.0" 404 -

2023-01-27 14:47:19,144 946 INFO epatec-11mar werkzeug: 127.0.0.1 - - [27/Jan/2023 14:47:19] "GET /website/static/src/xml/website.gallery.xml HTTP/1.0" 404 -

2023-01-27 14:47:19,193 946 INFO epatec-11mar werkzeug: 127.0.0.1 - - [27/Jan/2023 14:47:19] "POST /web/webclient/translations HTTP/1.0" 200 -

2023-01-27 14:48:07,100 946 INFO ? odoo.service.server: Initiating shutdown

2023-01-27 14:48:07,101 946 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.

2023-01-27 14:48:08,130 1562 INFO ? odoo: Odoo version 10.0

2023-01-27 14:48:08,131 1562 INFO ? odoo: Using configuration file at /etc/odoo-server.conf

2023-01-27 14:48:08,131 1562 INFO ? odoo: addons paths: ['/opt/odoo/.local/share/Odoo/addons/10.0', u'/opt/odoo/addons', '/opt/odoo/odoo/addons']

2023-01-27 14:48:08,131 1562 INFO ? odoo: database: odoo@default:default

2023-01-27 14:48:08,139 1562 INFO ? odoo.service.server: HTTP service (werkzeug) running on odoo:8069



2023-01-27 15:02:04,815 1661 ERROR epatec-11mar werkzeug: Error on request:

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 180, in run_wsgi

    execute(self.server.app)

  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 168, in execute

    application_iter = app(environ, start_response)

  File "/opt/odoo/odoo/service/server.py", line 307, in app

    return self.app(e, s)

  File "/opt/odoo/odoo/service/wsgi_server.py", line 186, in application

    return application_unproxied(environ, start_response)

  File "/opt/odoo/odoo/service/wsgi_server.py", line 172, in application_unproxied

    result = handler(environ, start_response)

  File "/opt/odoo/odoo/http.py", line 1326, in __call__

    return self.dispatch(environ, start_response)

  File "/opt/odoo/odoo/http.py", line 1499, in dispatch

    result = ir_http._dispatch()

  File "/opt/odoo/addons/website_sale/models/ir_http.py", line 15, in _dispatch

    return super(IrHttp, cls)._dispatch()

  File "/opt/odoo/addons/website/models/ir_http.py", line 209, in _dispatch

    resp = super(Http, cls)._dispatch()

  File "/opt/odoo/addons/web_editor/models/ir_http.py", line 21, in _dispatch

    return super(IrHttp, cls)._dispatch()

  File "/opt/odoo/addons/utm/models/ir_http.py", line 20, in _dispatch

    response = super(IrHttp, cls)._dispatch()

  File "/opt/odoo/odoo/addons/base/ir/ir_http.py", line 199, in _dispatch

    return cls._handle_exception(e)

  File "/opt/odoo/addons/website/models/ir_http.py", line 261, in _handle_exception

    return super(Http, cls)._handle_exception(exception)

  File "/opt/odoo/odoo/addons/base/ir/ir_http.py", line 169, in _handle_exception

    return request._handle_exception(exception)

  File "/opt/odoo/odoo/http.py", line 775, in _handle_exception

    return super(HttpRequest, self)._handle_exception(exception)

  File "/opt/odoo/odoo/addons/base/ir/ir_http.py", line 195, in _dispatch

    result = request.dispatch()

  File "/opt/odoo/odoo/http.py", line 834, in dispatch

    r = self._call_function(**self.params)

  File "/opt/odoo/odoo/http.py", line 334, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/opt/odoo/odoo/service/model.py", line 101, in wrapper

    return f(dbname, *args, **kwargs)

  File "/opt/odoo/odoo/http.py", line 327, in checked_call

    result = self.endpoint(*a, **kw)

  File "/opt/odoo/odoo/http.py", line 942, in __call__

    return self.method(*args, **kw)

  File "/opt/odoo/odoo/http.py", line 507, in response_wrap

    response = f(*args, **kw)

  File "/opt/odoo/addons/web/controllers/main.py", line 497, in load_locale

    addons_path = http.addons_manifest['web']['addons_path']

KeyError: 'web'

2023-01-27 15:02:05,109 1661 INFO epatec-11mar werkzeug: 127.0.0.1 - - [27/Jan/2023 15:02:05] "GET /backend_theme_v10/static/src/img/material-background.jpg HTTP/1.0" 404 -

2023-01-27 15:02:05,182 1661 INFO epatec-11mar werkzeug: 127.0.0.1 - - [27/Jan/2023 15:02:05] "GET /web/static/lib/fontawesome/fonts/fontawesome-webfont.woff?v=4.5.0 HTTP/1.0" 404 -

2023-01-27 15:02:05,222 1661 INFO epatec-11mar werkzeug: 127.0.0.1 - - [27/Jan/2023 15:02:05] "GET /web_editor/static/src/xml/editor.xml HTTP/1.0" 404 -

2023-01-27 15:02:05,648 1661 INFO epatec-11mar werkzeug: 127.0.0.1 - - [27/Jan/2023 15:02:05] "GET /web_editor/static/src/xml/snippets.xml HTTP/1.0" 404 -

2023-01-27 15:02:05,670 1661 INFO epatec-11mar werkzeug: 127.0.0.1 - - [27/Jan/2023 15:02:05] "GET /web/static/lib/fontawesome/fonts/fontawesome-webfont.ttf?v=4.5.0 HTTP/1.0" 404 -

2023-01-27 15:02:05,712 1661 INFO epatec-11mar werkzeug: 127.0.0.1 - - [27/Jan/2023 15:02:05] "POST /web/webclient/translations HTTP/1.0" 200 -




Avatar
Discard

did you try and change addons_path in your config file to match what odoo gives you ?

Author Best Answer

thanks for reply.

Have changed config file but does not solve the issue. But I am unable to install pysftp which is required by auto_backup module. Have tried different installation method, none works:

sudo -H pip install pysftp

Collecting pysftp

  Using cached https://files.pythonhosted.org/packages/36/60/45f30390a38b1f92e0a8cf4de178cd7c2bc3f874c85430e40ccf99df8fe7/pysftp-0.2.9.tar.gz

Collecting paramiko>=1.17 (from pysftp)

  Using cached https://files.pythonhosted.org/packages/3b/6b/554c00e5e68cd573bda345322a4e895e22686e94c7fa51848cd0e0442a71/paramiko-3.0.0.tar.gz

Collecting bcrypt>=3.2 (from paramiko>=1.17->pysftp)

  Using cached https://files.pythonhosted.org/packages/8c/ae/3af7d006aacf513975fd1948a6b4d6f8b4a307f8a244e1a3d3774b297aad/bcrypt-4.0.1.tar.gz

    Complete output from command python setup.py egg_info:

    Traceback (most recent call last):

      File "", line 1, in

      File "/tmp/pip-build-K1DKUc/bcrypt/setup.py", line 73

        print(f"    Python: {'.'.join(str(v) for v in sys.version_info[:3])}")

                                                                            ^

    SyntaxError: invalid syntax

    

    ----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-K1DKUc/bcrypt/

You are using pip version 8.1.1, however version 22.3.1 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.





sudo tail -f /var/log/odoo/odoo.log

2023-01-29 19:26:31,001 12782 INFO epatec-11mar werkzeug: 79.156.17.226 - - [29/Jan/2023 19:26:31] "POST /web/webclient/translations HTTP/1.1" 200 -

2023-01-29 19:26:40,845 12782 INFO epatec-11mar werkzeug: 79.156.17.226 - - [29/Jan/2023 19:26:40] "POST /longpolling/poll HTTP/1.1" 200 -

2023-01-29 19:27:18,445 12782 INFO epatec-11mar werkzeug: 79.156.17.226 - - [29/Jan/2023 19:27:18] "POST /longpolling/poll HTTP/1.1" 200 -

2023-01-29 19:27:57,588 12782 INFO ? odoo.service.server: Initiating shutdown

2023-01-29 19:27:57,588 12782 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.

2023-01-29 19:27:58,837 12908 INFO ? odoo: Odoo version 10.0

2023-01-29 19:27:58,838 12908 INFO ? odoo: Using configuration file at /etc/odoo-server.conf

2023-01-29 19:27:58,838 12908 INFO ? odoo: addons paths: ['/opt/odoo/.local/share/Odoo/addons/10.0', u'/opt/odoo/odoo/addons']

2023-01-29 19:27:58,838 12908 INFO ? odoo: database: odoo@default:default

2023-01-29 19:27:58,846 12908 INFO ? odoo.service.server: HTTP service (werkzeug) running on odoo:8069

2023-01-29 19:28:19,510 12908 INFO ? werkzeug: 79.156.17.226 - - [29/Jan/2023 19:28:19] "POST /longpolling/poll HTTP/1.1" 500 -

2023-01-29 19:28:19,514 12908 ERROR ? werkzeug: Error on request:

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 180, in run_wsgi

    execute(self.server.app)

  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 168, in execute

    application_iter = app(environ, start_response)

  File "/opt/odoo/odoo/service/server.py", line 307, in app

    return self.app(e, s)

  File "/opt/odoo/odoo/service/wsgi_server.py", line 186, in application

    return application_unproxied(environ, start_response)

  File "/opt/odoo/odoo/service/wsgi_server.py", line 172, in application_unproxied

    result = handler(environ, start_response)

  File "/opt/odoo/odoo/http.py", line 1325, in __call__

    self.load_addons()

  File "/opt/odoo/odoo/http.py", line 1346, in load_addons

    m = __import__('odoo.addons.' + module)

  File "/opt/odoo/odoo/modules/module.py", line 81, in load_module

    execfile(modfile, new_mod.__dict__)

  File "/opt/odoo/odoo/addons/auto_backup/__init__.py", line 3, in

    import models

  File "/opt/odoo/odoo/addons/auto_backup/models/__init__.py", line 1, in

    import db_backup

  File "/opt/odoo/odoo/addons/auto_backup/models/db_backup.py", line 38, in

    raise ImportError('This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)')

ImportError: This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)

2023-01-29 19:28:38,572 12908 INFO epatec-11mar odoo.modules.loading: loading 1 modules...

2023-01-29 19:28:38,593 12908 INFO epatec-11mar odoo.modules.loading: 1 modules loaded in 0.02s, 0 queries

2023-01-29 19:28:38,608 12908 WARNING epatec-11mar odoo.modules.graph: module website_odoo_tawk_to: not installable, skipped

2023-01-29 19:28:38,621 12908 WARNING epatec-11mar odoo.modules.graph: module unique_serial_warning: not installable, skipped

2023-01-29 19:28:38,673 12908 INFO epatec-11mar odoo.modules.loading: loading 176 modules...

2023-01-29 19:28:38,711 12908 INFO ? odoo.addons.bus.models.bus: Bus.loop listen imbus on db postgres

2023-01-29 19:28:38,834 12908 INFO epatec-11mar odoo.addons.report.models.report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf

2023-01-29 19:28:39,389 12908 WARNING epatec-11mar odoo.api: Deprecated method ecommerce_product_carousel_data.get_product_for_carousel_slider in module odoo.addons.clarico_product_carousel.models.ecommerce_product_carousel_data

2023-01-29 19:28:39,390 12908 WARNING epatec-11mar odoo.api: Deprecated method ecommerce_product_carousel_data.get_product_carousel_slider_filter_data in module odoo.addons.clarico_product_carousel.models.ecommerce_product_carousel_data

2023-01-29 19:28:39,399 12908 INFO epatec-11mar odoo.modules.loading: 176 modules loaded in 0.73s, 0 queries

2023-01-29 19:28:39,426 12908 WARNING epatec-11mar odoo.fields: Field product.product.attr_price_extra: parameter 'digits_compute' is no longer supported; use 'digits' instead.

2023-01-29 19:28:40,014 12908 INFO epatec-11mar odoo.models: Missing many2one field definition for _inherits reference "config_session" in "product.configurator", using default one.

2023-01-29 19:28:40,426 12908 INFO epatec-11mar odoo.modules.loading: Modules loaded.

2023-01-29 19:28:40,448 12908 INFO epatec-11mar odoo.addons.base.ir.ir_http: Generating routing map



Avatar
Discard
Author

I suppose now the problem is here:
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 497, in load_locale
addons_path = http.addons_manifest['web']['addons_path']
KeyError: 'web'

I have checked this but did not find a solution:
https://github.com/odoo/odoo/issues/25275