You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug:
After installing the module on Odoo.sh, we are encountering an error in the website = request.env["website"].sudo().get_current_website() line inside
the _dispatch function in ir_http.py file.
This below error appears in the logs. Is this normal?
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 306, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 294, in execute
application_iter = app(environ, start_response)
File "/home/odoo/src/odoo/odoo/service/server.py", line 441, in app
return self.app(e, s)
File "/home/odoo/.local/lib/python3.8/site-packages/raven/middleware.py", line 100, in call
iterable = self.application(environ, start_response)
File "/home/odoo/src/odoo/odoo/service/wsgi_server.py", line 111, in application
return ProxyFix(application_unproxied)(environ, start_response)
File "/usr/lib/python3/dist-packages/werkzeug/middleware/proxy_fix.py", line 232, in call
return self.app(environ, start_response)
File "/home/odoo/src/odoo/odoo/service/wsgi_server.py", line 88, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/home/odoo/src/odoo/odoo/http.py", line 1341, in call
return self.dispatch(environ, start_response)
File "/home/odoo/src/odoo/odoo/http.py", line 1307, in call
return self.app(environ, start_wrapped)
File "/usr/lib/python3/dist-packages/werkzeug/middleware/shared_data.py", line 220, in call
return self.app(environ, start_response)
File "/home/odoo/src/odoo/odoo/http.py", line 1530, in dispatch
result = ir_http._dispatch()
File "/home/odoo/src/user/website/website_require_login/models/ir_http.py", line 18, in _dispatch
website = request.env["website"].sudo().get_current_website()
File "/home/odoo/src/odoo/addons/website/models/website.py", line 593, in get_current_website
country_id = self.env['res.country'].search([('code', '=', country)], limit=1).id
File "/home/odoo/src/odoo/odoo/models.py", line 1720, in search
return res if count else self.browse(res)
File "/home/odoo/src/odoo/odoo/models.py", line 5013, in browse
if not ids:
File "/home/odoo/src/odoo/odoo/osv/query.py", line 172, in bool
return bool(self._result)
File "/home/odoo/src/odoo/odoo/tools/func.py", line 26, in get
value = self.fget(obj)
File "/home/odoo/src/odoo/odoo/osv/query.py", line 165, in _result
self._cr.execute(query_str, params)
File "", line 2, in execute
File "/home/odoo/src/odoo/odoo/sql_db.py", line 100, in check
raise psycopg2.OperationalError('Unable to use a closed cursor.')
psycopg2.OperationalError: Unable to use a closed cursor. - - -
To Reproduce
Affected versions:
14
The text was updated successfully, but these errors were encountered:
Module:
website_require_login
Describe the bug:
After installing the module on Odoo.sh, we are encountering an error in the
website = request.env["website"].sudo().get_current_website() line inside
the _dispatch function in ir_http.py file.
This below error appears in the logs. Is this normal?
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 306, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 294, in execute
application_iter = app(environ, start_response)
File "/home/odoo/src/odoo/odoo/service/server.py", line 441, in app
return self.app(e, s)
File "/home/odoo/.local/lib/python3.8/site-packages/raven/middleware.py", line 100, in call
iterable = self.application(environ, start_response)
File "/home/odoo/src/odoo/odoo/service/wsgi_server.py", line 111, in application
return ProxyFix(application_unproxied)(environ, start_response)
File "/usr/lib/python3/dist-packages/werkzeug/middleware/proxy_fix.py", line 232, in call
return self.app(environ, start_response)
File "/home/odoo/src/odoo/odoo/service/wsgi_server.py", line 88, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/home/odoo/src/odoo/odoo/http.py", line 1341, in call
return self.dispatch(environ, start_response)
File "/home/odoo/src/odoo/odoo/http.py", line 1307, in call
return self.app(environ, start_wrapped)
File "/usr/lib/python3/dist-packages/werkzeug/middleware/shared_data.py", line 220, in call
return self.app(environ, start_response)
File "/home/odoo/src/odoo/odoo/http.py", line 1530, in dispatch
result = ir_http._dispatch()
File "/home/odoo/src/user/website/website_require_login/models/ir_http.py", line 18, in _dispatch
website = request.env["website"].sudo().get_current_website()
File "/home/odoo/src/odoo/addons/website/models/website.py", line 593, in get_current_website
country_id = self.env['res.country'].search([('code', '=', country)], limit=1).id
File "/home/odoo/src/odoo/odoo/models.py", line 1720, in search
return res if count else self.browse(res)
File "/home/odoo/src/odoo/odoo/models.py", line 5013, in browse
if not ids:
File "/home/odoo/src/odoo/odoo/osv/query.py", line 172, in bool
return bool(self._result)
File "/home/odoo/src/odoo/odoo/tools/func.py", line 26, in get
value = self.fget(obj)
File "/home/odoo/src/odoo/odoo/osv/query.py", line 165, in _result
self._cr.execute(query_str, params)
File "", line 2, in execute
File "/home/odoo/src/odoo/odoo/sql_db.py", line 100, in check
raise psycopg2.OperationalError('Unable to use a closed cursor.')
psycopg2.OperationalError: Unable to use a closed cursor. - - -
To Reproduce
Affected versions:
14
The text was updated successfully, but these errors were encountered: