Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

website module Error while render the template

Subscribe

Get notified when there's activity on this post

This question has been flagged
1 Reply
5868 Views
Avatar
Robert

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:


0
Avatar
Discard
Robert
Author

这是完整的回溯错误: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

Robert
Author

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.

Avatar
Media Cybernetics
Best Answer

I have the same error. Any idea?

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now