Odoo Help

1

Internal servor Error only for certain database

By
Pascal Tremblay
on 14-10-20 下午2:30 2,366 views

I can alway get http://localhost:8069/web/database/selector

I can login into many of them.

But for one one database, if I choose it in the dropdown, i get automaticaly an internal Server error. Without a refresh of the browser.

I get :

« The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. »

log :

2014-10-20 18:27:08,007 12935 INFO la_page_pt openerp.service.server: Initiating shutdown

2014-10-20 18:27:08,007 12935 INFO la_page_pt openerp.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
2014-10-20 18:27:10,008 14157 INFO ? openerp: OpenERP version 8.0-8813815
2014-10-20 18:27:10,008 14157 INFO ? openerp: addons paths: ['/var/lib/odoo/addons/8.0', u'/usr/lib/python2.7/dist-packages/openerp/addons']
2014-10-20 18:27:10,008 14157 INFO ? openerp: database hostname: localhost
2014-10-20 18:27:10,008 14157 INFO ? openerp: database port: 5432
2014-10-20 18:27:10,008 14157 INFO ? openerp: database user: odoo
2014-10-20 18:27:10,191 14157 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
2014-10-20 18:27:10,200 14157 INFO la_page_pt openerp.modules.loading: loading 1 modules...
2014-10-20 18:27:10,338 14157 INFO la_page_pt openerp.modules.loading: 1 modules loaded in 0.14s, 0 queries
2014-10-20 18:27:10,364 14157 INFO la_page_pt openerp.modules.loading: loading 83 modules...
2014-10-20 18:27:10,367 14157 INFO la_page_pt passlib.registry: registered crypt handler 'pbkdf2_sha512': <class 'passlib.handlers.pbkdf2.pbkdf2_sha512'>
2014-10-20 18:27:10,368 14157 INFO la_page_pt passlib.registry: registered crypt handler 'md5_crypt': <class 'passlib.handlers.md5_crypt.md5_crypt'>
2014-10-20 18:27:10,436 14157 INFO ? openerp.addons.bus.bus: Bus.loop listen imbus on db postgres
2014-10-20 18:27:10,449 14157 INFO la_page_pt openerp.addons.report.models.report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
2014-10-20 18:27:12,740 14157 INFO la_page_pt openerp.modules.loading: 83 modules loaded in 2.38s, 0 queries
2014-10-20 18:27:12,815 14157 INFO la_page_pt openerp.modules.loading: Modules loaded.
2014-10-20 18:28:09,061 14157 INFO ? openerp.http: HTTP Configuring static files
2014-10-20 18:28:09,063 14157 INFO la_page_pt openerp.addons.base.ir.ir_http: Generating routing map
2014-10-20 18:28:09,121 14157 ERROR la_page_pt openerp.sql_db: Programming error: operator does not exist: integer = boolean
LINE 1: ...roup_id)  WHERE m.model = 'website'    AND gu.uid = false   ...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
, in query SELECT MAX(CASE WHEN perm_read THEN 1 ELSE 0 END)   FROM ir_model_access a   JOIN ir_model m ON (m.id = a.model_id)   JOIN res_groups_users_rel gu ON (gu.gid = a.group_id)  WHERE m.model = %s    AND gu.uid = %s    AND a.active IS True
2014-10-20 18:28:09,175 14157 INFO la_page_pt werkzeug: 192.168.1.10 - - [20/Oct/2014 18:28:09] "GET /web/login?redirect=http%3A%2F%2F192.168.1.25%3A8069%2Fweb HTTP/1.1" 500 -
2014-10-20 18:28:09,186 14157 ERROR la_page_pt werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/openerp/service/server.py", line 280, in app
    return self.app(e, s)
  File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 216, in application
    return application_unproxied(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 202, in application_unproxied
    result = handler(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1215, in __call__
    return self.dispatch(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1189, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1356, in dispatch
    result = ir_http._dispatch()
  File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/ir_http.py", line 91, in _dispatch
    langs = [lg[0] for lg in request.website.get_languages()]
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 552, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/website.py", line 235, in get_languages
    return self._get_languages(cr, uid, ids[0], context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "<string>", line 2, in _get_languages
    
  File "/usr/lib/python2.7/dist-packages/openerp/tools/cache.py", line 75, in lookup
    return self.method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/website.py", line 232, in _get_languages
    return [(lg.code, lg.name) for lg in website.language_ids]
  File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 751, in __get__
    self.determine_value(record)
  File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 846, in determine_value
    record._prefetch_field(self)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3159, in _prefetch_field
    result = records.read(list(fnames), load='_classic_write')
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3090, in read
    self.check_access_rights('read')
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 442, in new_api
    result = method(self._model, cr, uid, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3406, in check_access_rights
    return self.pool.get('ir.model.access').check(cr, uid, self._name, operation, raise_exception)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "<string>", line 2, in check
    
  File "/usr/lib/python2.7/dist-packages/openerp/tools/cache.py", line 71, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 750, in check
    , (model_name, uid,)
  File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 158, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 234, in execute
    res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = boolean
LINE 1: ...roup_id)  WHERE m.model = 'website'    AND gu.uid = false   ...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
 

0
Paul Catinean
On 18-1-4 上午8:28

After quite a bit of investigation I've traced the issue to this line: https://github.com/odoo/odoo/blob/10.0/addons/website/models/ir_http.py#L65


Apparently the website object has a non-required field user_id which should point to the default Public User. For some undiscovered reason that field can set to an empty value and then the aforementioned line sets the uid on the request to False.

One would have to update the user_id value in the database with the daabase id of the portal user to restore normal function, in the meantime I will also make a PR to check the value of user_id on the website or make user_id required to avoid this in the future.

Hope this helps.


[LATER EDIT]

Here is the PR in question: https://github.com/odoo/odoo/pull/21997

0
David Nguyen
On 17-6-11 下午1:31

I got the same error...

Is there a solution for this?

0
Timo Goosen
On 14-10-21 上午3:22

Have you tried logging in on that database with incognito mode in your browser? (Clean cache mode)

Also is this on a stable version of odoo or is this an old version from github?

 

 

I use v8 with apt-get. A clean-cache-mode? Never heard about it... How can use it? Thanks

Pascal Tremblay
on 14-10-21 上午7:42

I just meant use your browser in Incognito mode. Which means that there is nothing stored in the browser's cache and no cookies either.

Timo Goosen
on 14-10-21 上午8:00

Ok, just catch it. It doesn't work. :( Thanks

Pascal Tremblay
on 14-10-21 上午10:12

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 14-10-20 下午2:30
Seen: 2366 times
Last updated: 18-1-4 上午8:28