Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3109 Переглядів

When I installed the website module in odoo17, except for the currently logged-in browser, other browsers cannot access the odoo front-end website. The back-end website can be accessed. After I log in to the back-end, the front-end resumes access. The following is the odoo traceback log , does anyone know how to solve it?


odoo.addons.base.models.ir_qweb.QWebException: Error while render the template

KeyError: 'REQUEST_URI'

Template: website.layout

Path: /t/html/head/t[9]/t[2]

Node:


Аватар
Відмінити
Автор

这是完整的回溯错误:Traceback (most recent call last):
File "/cloudclusters/odoo/odoo/tools/cache.py", line 99, in lookup
r = d[key]
File "<decorator-gen-5>", line 2, in __getitem__
File "/cloudclusters/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/cloudclusters/odoo/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: ('ir.qweb', <function IrQWeb._get_cached_values at 0x7f4cacea0d30>, ('(\'852\', "\'en_US\'", \'None\', \'False\', \'None\', \'None\', \'None\', \'1\')', 'template_852_t_cache_0_cache', ('website.page', (4,), 1701747024.902408)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<852>", line 1609, in template_852
File "<852>", line 1197, in template_852_content
File "/cloudclusters/odoo/odoo/addons/base/models/ir_qweb.py", line 2507, in _load_values
value = self._get_cached_values(cache_key, get_value)
File "<decorator-gen-69>", line 2, in _get_cached_values
File "/cloudclusters/odoo/odoo/tools/cache.py", line 104, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/cloudclusters/odoo/odoo/addons/base/models/ir_qweb.py", line 2520, in _get_cached_values
return get_value()
File "<852>", line 1187, in template_852_t_cache_0_cache
File "<852>", line 483, in template_852_t_cache_0
File "/cloudclusters/odoo/addons/website/models/website.py", line 1031, in _get_alternate_languages
if not self._is_canonical_url(canonical_params=canonical_params):
File "/cloudclusters/odoo/addons/website/models/website.py", line 1500, in _is_canonical_url
current_url = request.httprequest.url_root[:-1] + request.httprequest.environ['REQUEST_URI']
KeyError: 'REQUEST_URI'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/cloudclusters/odoo/odoo/http.py", line 2157, in __call__
response = request._serve_db()
File "/cloudclusters/odoo/odoo/http.py", line 1732, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/cloudclusters/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/cloudclusters/odoo/odoo/http.py", line 1759, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/cloudclusters/odoo/odoo/http.py", line 1873, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "/cloudclusters/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/cloudclusters/odoo/odoo/addons/base/models/ir_http.py", line 209, in _dispatch
result.flatten()
File "/cloudclusters/odoo/odoo/http.py", line 1248, in flatten
self.response.append(self.render())
File "/cloudclusters/odoo/odoo/http.py", line 1240, in render
return request.env["ir.ui.view"]._render_template(self.template, self.qcontext)
File "/cloudclusters/odoo/addons/website/models/ir_ui_view.py", line 442, in _render_template
return super()._render_template(template, values=values)
File "/cloudclusters/odoo/odoo/addons/base/models/ir_ui_view.py", line 2044, in _render_template
return self.env['ir.qweb']._render(template, values)
File "/cloudclusters/odoo/odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "/cloudclusters/odoo/odoo/addons/base/models/ir_qweb.py", line 593, in _render
result = ''.join(rendering)
File "<850>", line 39, in template_850
File "<850>", line 28, in template_850_content
File "<852>", line 1615, in template_852
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
KeyError: 'REQUEST_URI'
Template: website.layout
Path: /t/html/head/t[9]/t[2]
Node: <t t-foreach="alternate_languages" t-as="lg"/>
2023-12-05 05:53:47,114 887 INFO admin longpolling: 10.244.21.1 - - [2023-12-05 05:53:47] "GET / HTTP/1.1" 500 6253 0.451642

Автор

When I do not log in to the back-end website, an internal server error appears on the front-end of the website. When I log in to the back-end website, the front-end website returns to normal.