500: Internal Server Error
QWeb
错误信息:
Error to render compiling AST MemoryError: Template: website_slides.slide_fullscreen_sidebar_category Path: /t/li/ul/t/li Node: <li t-att-class="'o_wslides_fs_sidebar_list_item d-flex align-items-top py-1 %s' % ('active' if slide.id == current_slide.id else '')" t-att-data-id="slide.id" t-att-data-can-access="can_access" t-att-data-name="slide.name" t-att-data-is_local_url="slide.is_local_url" t-att-data-type="slide.slide_type" t-att-data-slug="slug(slide)" t-att-data-has-question="1 if slide.question_ids else 0" t-att-data-is-quiz="0" t-att-data-completed="1 if slide_completed else 0" t-att-data-embed-code="slide.embed_code if slide.slide_type in ['video', 'document', 'presentation', 'infographic'] else False" t-att-data-readonly="not is_member"> <span class="ml-3"> <i t-if="slide_completed and is_member" class="o_wslides_slide_completed fa fa-check fa-fw text-success" t-att-data-slide-id="slide.id"/> <i t-if="not slide_completed and is_member" class="fa fa-circle-thin fa-fw" t-att-data-slide-id="slide.id"/> </span> <div class="ml-2"> <a t-if="can_access" class="d-block pt-1" href="#"> <div class="d-flex "> <t t-call="website_slides.slide_icon"/> <div class="o_wslides_fs_slide_name" t-esc="slide.name"/> </div> </a> <span t-else="" class="d-block pt-1" href="#"> <div class="d-flex "> <t t-call="website_slides.slide_icon"/> <div class="o_wslides_fs_slide_name text-muted" t-esc="slide.name"/> </div> </span> <ul class="list-unstyled w-100 pt-2 small" t-if="slide.link_ids or (slide.question_ids and not slide.slide_type =='quiz')"> <li t-if="slide.link_ids" t-foreach="slide.link_ids" t-as="link" class="pl-0 mb-1"> <a t-if="can_access" class="o_wslides_fs_slide_link" t-att-href="link.link" target="_blank"> <i class="fa fa-link mr-2"/><span t-esc="link.name"/> </a> <span t-else="" class="o_wslides_fs_slide_link text-muted"> <i class="fa fa-link mr-2"/><span t-esc="link.name"/> </span> </li> <li class="o_wslides_fs_sidebar_list_item pl-0 mb-1" t-if="slide.question_ids and not slide.slide_type == 'quiz'" t-att-data-id="slide.id" t-att-data-can-access="can_access" t-att-data-name="slide.name" t-att-data-type="slide.slide_type" t-att-data-slug="slug(slide)" t-att-data-has-question="1 if slide.question_ids else 0" t-att-data-is-quiz="1" t-att-data-completed="1 if slide_completed else 0" t-att-data-readonly="not is_member"> <a t-if="can_access" class="o_wslides_fs_slide_quiz" href="#" t-att-index="i"> <i class="fa fa-flag-checkered text-warning mr-2"/>测验 </a> <span t-else="" class="text-muted"> <i class="fa fa-flag-checkered text-warning mr-2"/>测验 </span> </li> </ul> </div> </li>
错误在完成模板时发生 website_slides.slide_fullscreen_sidebar_category
以及评估表达式: <li t-att-class="'o_wslides_fs_sidebar_list_item d-flex align-items-top py-1 %s' % ('active' if slide.id == current_slide.id else '')" t-att-data-id="slide.id" t-att-data-can-access="can_access" t-att-data-name="slide.name" t-att-data-is_local_url="slide.is_local_url" t-att-data-type="slide.slide_type" t-att-data-slug="slug(slide)" t-att-data-has-question="1 if slide.question_ids else 0" t-att-data-is-quiz="0" t-att-data-completed="1 if slide_completed else 0" t-att-data-embed-code="slide.embed_code if slide.slide_type in ['video', 'document', 'presentation', 'infographic'] else False" t-att-data-readonly="not is_member">
<span class="ml-3">
<i t-if="slide_completed and is_member" class="o_wslides_slide_completed fa fa-check fa-fw text-success" t-att-data-slide-id="slide.id"/>
<i t-if="not slide_completed and is_member" class="fa fa-circle-thin fa-fw" t-att-data-slide-id="slide.id"/>
</span>
<div class="ml-2">
<a t-if="can_access" class="d-block pt-1" href="#">
<div class="d-flex ">
<t t-call="website_slides.slide_icon"/>
<div class="o_wslides_fs_slide_name" t-esc="slide.name"/>
</div>
</a>
<span t-else="" class="d-block pt-1" href="#">
<div class="d-flex ">
<t t-call="website_slides.slide_icon"/>
<div class="o_wslides_fs_slide_name text-muted" t-esc="slide.name"/>
</div>
</span>
<ul class="list-unstyled w-100 pt-2 small" t-if="slide.link_ids or (slide.question_ids and not slide.slide_type =='quiz')">
<li t-if="slide.link_ids" t-foreach="slide.link_ids" t-as="link" class="pl-0 mb-1">
<a t-if="can_access" class="o_wslides_fs_slide_link" t-att-href="link.link" target="_blank">
<i class="fa fa-link mr-2"/><span t-esc="link.name"/>
</a>
<span t-else="" class="o_wslides_fs_slide_link text-muted">
<i class="fa fa-link mr-2"/><span t-esc="link.name"/>
</span>
</li>
<li class="o_wslides_fs_sidebar_list_item pl-0 mb-1" t-if="slide.question_ids and not slide.slide_type == 'quiz'" t-att-data-id="slide.id" t-att-data-can-access="can_access" t-att-data-name="slide.name" t-att-data-type="slide.slide_type" t-att-data-slug="slug(slide)" t-att-data-has-question="1 if slide.question_ids else 0" t-att-data-is-quiz="1" t-att-data-completed="1 if slide_completed else 0" t-att-data-readonly="not is_member">
<a t-if="can_access" class="o_wslides_fs_slide_quiz" href="#" t-att-index="i">
<i class="fa fa-flag-checkered text-warning mr-2"/>测验
</a>
<span t-else="" class="text-muted">
<i class="fa fa-flag-checkered text-warning mr-2"/>测验
</span>
</li>
</ul>
</div>
</li>
跟踪
Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/api.py", line 753, in get value = self._data[field][record._ids[0]] KeyError: 429 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/fields.py", line 991, in __get__ value = env.cache.get(record, self) File "/opt/odoo13/odoo/odoo/api.py", line 759, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('slide.slide(429,).embed_code', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/api.py", line 753, in get value = self._data[field][record._ids[0]] KeyError: 429 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/fields.py", line 991, in __get__ value = env.cache.get(record, self) File "/opt/odoo13/odoo/odoo/api.py", line 759, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('slide.slide(429,).datas', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/api.py", line 753, in get value = self._data[field][record._ids[0]] KeyError: 94467 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/fields.py", line 991, in __get__ value = env.cache.get(record, self) File "/opt/odoo13/odoo/odoo/api.py", line 759, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('ir.attachment(94467,).datas', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 332, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_website_slides_slide_fullscreen_sidebar_category_7412 File "<template>", line 8, in foreach_7411 File "/opt/odoo13/odoo/odoo/fields.py", line 1015, in __get__ self.compute_value(recs) File "/opt/odoo13/odoo/odoo/fields.py", line 1100, in compute_value records._compute_field_value(self) File "/opt/odoo13/odoo/odoo/models.py", line 3905, in _compute_field_value getattr(self, field.compute)() File "/opt/odoo13/odoo/addons/website_slides_local_video/models/slide_slide.py", line 136, in _compute_embed_code if record.datas and (not record.document_id or record.slide_type in ['document', 'presentation']): File "/opt/odoo13/odoo/odoo/fields.py", line 998, in __get__ recs._fetch_field(self) File "/opt/odoo13/odoo/odoo/models.py", line 2938, in _fetch_field self._read(fnames) File "/opt/odoo13/odoo/odoo/models.py", line 3034, in _read field.read(fetched) File "/opt/odoo13/odoo/odoo/fields.py", line 1920, in read for att in records.env['ir.attachment'].sudo().search(domain)} File "/opt/odoo13/odoo/odoo/fields.py", line 1920, in <dictcomp> for att in records.env['ir.attachment'].sudo().search(domain)} File "/opt/odoo13/odoo/odoo/fields.py", line 1015, in __get__ self.compute_value(recs) File "/opt/odoo13/odoo/odoo/fields.py", line 1908, in compute_value super().compute_value(records) File "/opt/odoo13/odoo/odoo/fields.py", line 1100, in compute_value records._compute_field_value(self) File "/opt/odoo13/odoo/odoo/models.py", line 3905, in _compute_field_value getattr(self, field.compute)() File "/opt/odoo13/odoo/odoo/addons/base/models/ir_attachment.py", line 196, in _compute_datas attach.datas = self._file_read(attach.store_fname, bin_size) File "/opt/odoo13/odoo/odoo/addons/base/models/ir_attachment.py", line 104, in _file_read r = base64.b64encode(fd.read()) File "/usr/lib/python3.6/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) MemoryError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/addons/base/models/ir_http.py", line 229, in _dispatch result = request.dispatch() File "/opt/odoo13/odoo/odoo/http.py", line 804, in dispatch r = self._call_function(**self.params) File "/opt/odoo13/odoo/odoo/http.py", line 345, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo13/odoo/odoo/service/model.py", line 93, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo13/odoo/odoo/http.py", line 341, in checked_call result.flatten() File "/opt/odoo13/odoo/odoo/http.py", line 1231, in flatten self.response.append(self.render()) File "/opt/odoo13/odoo/odoo/http.py", line 1224, in render return env["ir.ui.view"].render_template(self.template, self.qcontext) File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 1154, in render_template return self.browse(self.get_view_id(template)).render(values, engine) File "/opt/odoo13/odoo/addons/website/models/ir_ui_view.py", line 335, in render return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext) File "/opt/odoo13/odoo/addons/web_editor/models/ir_ui_view.py", line 25, in render return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext) File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 1162, in render return self.env[engine].render(self.id, qcontext) File "/opt/odoo13/odoo/addons13e/web_studio/models/ir_qweb.py", line 43, in render return super(IrQWeb, self).render(template, values=values, **options) File "/opt/odoo13/odoo/odoo/addons/base/models/ir_qweb.py", line 58, in render result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context) File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 260, in render self.compile(template, options)(self, body.append, values or {}) File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn raise e File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 332, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_website_slides_slide_fullscreen_7396 File "<template>", line 5, in body_call_content_7394 File "<template>", line 53, in foreach_7393 File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 339, in _compiled_fn raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name) odoo.addons.base.models.qweb.QWebException: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/api.py", line 753, in get value = self._data[field][record._ids[0]] KeyError: 429 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/fields.py", line 991, in __get__ value = env.cache.get(record, self) File "/opt/odoo13/odoo/odoo/api.py", line 759, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('slide.slide(429,).embed_code', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/api.py", line 753, in get value = self._data[field][record._ids[0]] KeyError: 429 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/fields.py", line 991, in __get__ value = env.cache.get(record, self) File "/opt/odoo13/odoo/odoo/api.py", line 759, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('slide.slide(429,).datas', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/api.py", line 753, in get value = self._data[field][record._ids[0]] KeyError: 94467 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/fields.py", line 991, in __get__ value = env.cache.get(record, self) File "/opt/odoo13/odoo/odoo/api.py", line 759, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('ir.attachment(94467,).datas', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 332, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_website_slides_slide_fullscreen_sidebar_category_7412 File "<template>", line 8, in foreach_7411 File "/opt/odoo13/odoo/odoo/fields.py", line 1015, in __get__ self.compute_value(recs) File "/opt/odoo13/odoo/odoo/fields.py", line 1100, in compute_value records._compute_field_value(self) File "/opt/odoo13/odoo/odoo/models.py", line 3905, in _compute_field_value getattr(self, field.compute)() File "/opt/odoo13/odoo/addons/website_slides_local_video/models/slide_slide.py", line 136, in _compute_embed_code if record.datas and (not record.document_id or record.slide_type in ['document', 'presentation']): File "/opt/odoo13/odoo/odoo/fields.py", line 998, in __get__ recs._fetch_field(self) File "/opt/odoo13/odoo/odoo/models.py", line 2938, in _fetch_field self._read(fnames) File "/opt/odoo13/odoo/odoo/models.py", line 3034, in _read field.read(fetched) File "/opt/odoo13/odoo/odoo/fields.py", line 1920, in read for att in records.env['ir.attachment'].sudo().search(domain)} File "/opt/odoo13/odoo/odoo/fields.py", line 1920, in <dictcomp> for att in records.env['ir.attachment'].sudo().search(domain)} File "/opt/odoo13/odoo/odoo/fields.py", line 1015, in __get__ self.compute_value(recs) File "/opt/odoo13/odoo/odoo/fields.py", line 1908, in compute_value super().compute_value(records) File "/opt/odoo13/odoo/odoo/fields.py", line 1100, in compute_value records._compute_field_value(self) File "/opt/odoo13/odoo/odoo/models.py", line 3905, in _compute_field_value getattr(self, field.compute)() File "/opt/odoo13/odoo/odoo/addons/base/models/ir_attachment.py", line 196, in _compute_datas attach.datas = self._file_read(attach.store_fname, bin_size) File "/opt/odoo13/odoo/odoo/addons/base/models/ir_attachment.py", line 104, in _file_read r = base64.b64encode(fd.read()) File "/usr/lib/python3.6/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) MemoryError Error to render compiling AST MemoryError: Template: website_slides.slide_fullscreen_sidebar_category Path: /t/li/ul/t/li Node: <li t-att-class="'o_wslides_fs_sidebar_list_item d-flex align-items-top py-1 %s' % ('active' if slide.id == current_slide.id else '')" t-att-data-id="slide.id" t-att-data-can-access="can_access" t-att-data-name="slide.name" t-att-data-is_local_url="slide.is_local_url" t-att-data-type="slide.slide_type" t-att-data-slug="slug(slide)" t-att-data-has-question="1 if slide.question_ids else 0" t-att-data-is-quiz="0" t-att-data-completed="1 if slide_completed else 0" t-att-data-embed-code="slide.embed_code if slide.slide_type in ['video', 'document', 'presentation', 'infographic'] else False" t-att-data-readonly="not is_member"> <span class="ml-3"> <i t-if="slide_completed and is_member" class="o_wslides_slide_completed fa fa-check fa-fw text-success" t-att-data-slide-id="slide.id"/> <i t-if="not slide_completed and is_member" class="fa fa-circle-thin fa-fw" t-att-data-slide-id="slide.id"/> </span> <div class="ml-2"> <a t-if="can_access" class="d-block pt-1" href="#"> <div class="d-flex "> <t t-call="website_slides.slide_icon"/> <div class="o_wslides_fs_slide_name" t-esc="slide.name"/> </div> </a> <span t-else="" class="d-block pt-1" href="#"> <div class="d-flex "> <t t-call="website_slides.slide_icon"/> <div class="o_wslides_fs_slide_name text-muted" t-esc="slide.name"/> </div> </span> <ul class="list-unstyled w-100 pt-2 small" t-if="slide.link_ids or (slide.question_ids and not slide.slide_type =='quiz')"> <li t-if="slide.link_ids" t-foreach="slide.link_ids" t-as="link" class="pl-0 mb-1"> <a t-if="can_access" class="o_wslides_fs_slide_link" t-att-href="link.link" target="_blank"> <i class="fa fa-link mr-2"/><span t-esc="link.name"/> </a> <span t-else="" class="o_wslides_fs_slide_link text-muted"> <i class="fa fa-link mr-2"/><span t-esc="link.name"/> </span> </li> <li class="o_wslides_fs_sidebar_list_item pl-0 mb-1" t-if="slide.question_ids and not slide.slide_type == 'quiz'" t-att-data-id="slide.id" t-att-data-can-access="can_access" t-att-data-name="slide.name" t-att-data-type="slide.slide_type" t-att-data-slug="slug(slide)" t-att-data-has-question="1 if slide.question_ids else 0" t-att-data-is-quiz="1" t-att-data-completed="1 if slide_completed else 0" t-att-data-readonly="not is_member"> <a t-if="can_access" class="o_wslides_fs_slide_quiz" href="#" t-att-index="i"> <i class="fa fa-flag-checkered text-warning mr-2"/>测验 </a> <span t-else="" class="text-muted"> <i class="fa fa-flag-checkered text-warning mr-2"/>测验 </span> </li> </ul> </div> </li>