1
votes

I have installed Odoo8 and it is running with Nginx.

When I access to the URL where Odoo is supposed to run, I only see the black topbar with no menus, the rest of the page is empty.

The log spits out this error:

Traceback (most recent call last): File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 544, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 581, in dispatch result = self._call_function(**self.params) File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 318, in _call_function return self.endpoint(*args, **kwargs) File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 810, in call return self.method(*args, **kw) File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 410, in response_wrap response = f(*args, **kw) File "/opt/odoo/odoo_8/src/linked-addons/web/controllers/main.py", line 591, in bootstrap_translations if http.addons_manifest[addon_name].get('bootstrap'): KeyError: 'web'

I checked that I have module web at the mentioned path, with the right permissions and the right owner. I was not able to find a solution for this problem.

Anyone experienced the same situation? I think it can be a problem of Nginx (because recently I made several Odoo 8 installations in different servers and following exactly the same steps in each one, but the other ones did not use Nginx).

I paste here the configuration of the Nginx site of Odoo:

server_tokens off;

server {
    server_name my.server.name.com;

    large_client_header_buffers 16 8m;
    client_max_body_size        200m;

    location / {
      proxy_pass            http://127.0.0.1:8069;
      proxy_buffers         16 8m;
      proxy_buffer_size     8m;
      proxy_set_header      X-Forwarded-Host  $host;
      proxy_set_header      X-Real-IP $http_x_real_ip;
      proxy_set_header      X-Forwarded-Proto https;
      proxy_connect_timeout 600;
      proxy_send_timeout    600;
      proxy_read_timeout    600;
      send_timeout          600;

      location ~ ^/(.*)/static/(.*) {
        alias /opt/odoo/odoo_8/src/linked-addons/$1/static/$2;

        expires +30d;
        access_log    off;
        log_not_found off;
      }
    }
}

Any suggestion or idea will be appreciated.

2
That's the full traceback? Sometimes just a python lib is missing, but the traceback comes right before the "KeyError" 'web' error.CZoellner
well have you removed nginx to see if the issue still persists, so you'll know the origin of the problem exactly (i doubt it's from nginx)danidee
Yes, that is the full traceback of the error, it does not tell very much. I did not remove Nginx because it is installed on a remote server whose owner is other person, so I would rather not to remove it, but if there is not another way, I guess I will have to do it.forvas

2 Answers

1
votes

Well, I do not have idea why, but it is fixed. What I did:

  1. I removed all the Odoo modules I had downloaded from GitHub.
  2. I downloaded then again (exactly like I did the first time).
  3. I restarted Odoo service.
  4. This time I got two errors instead of one. One was the KeyError: 'web', like earlier, the other one was asking for Wand package.
  5. I installed Wand: pip install Wand
  6. After refreshing, same situation, two errors, but the other one this time was asking for MagickWand.
  7. I installed it: apt-get install libmagickwand-dev
  8. After refreshing, again, two errors, this time Odoo was asking for pycoda.
  9. I installed pycoda: pip install pycoda
  10. I restarted Nginx and Odoo services, just in case, and it worked. No more errors.

I cannot explain why the log did not tell me anything about the other errors in the first installation, and it only noticed me about the KeyError: 'web'.

0
votes

The error is the same on all versions of Odoo, and this error will usually follow some other errors. It's important to fix your errors from top to bottom.

The error has to to with a broken, missing or outdated python modules.

Take a look at your Odoo log to see if you see any import errors...

...
  File "/path/to/file.py", line 1, in <module>
    from x import y
ImportError: cannot import etc...

Now just make sure your install or update the import in question.

pip install y
pip install --upgrade y

Then restart your Odoo instance or docker container and try again.