Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4841 Lượt xem

I am running odoo17 CE on windows 11 with PyCharm. I have installed all the requirements.

The below packages i downgraded from the latest version just to check the result:

"Werkzeug==2.0.2
"Jinja2==3.1.2

The below is last trace: 

 

"File "-----odoo17\odoo\addons\base\models\ir_qweb.py", line 765, in _generate_code
    raise QWebException("Error occurred while compiling the xml template",
odoo.addons.base.models.ir_qweb.QWebException: Error occurred while compiling the xml template
ValueError: forbidden opcode(s) found in 'True': RETURN_CONST
Template: database_manager
Path: /html/body/div/div[4]/div/div/form/div[1]/t[1]
Node:

Ảnh đại diện
Huỷ bỏ

Please try with Jinja2==2.11.3.

Tác giả

Hi Kaushik,
Thank you for your quick response.
I uninstalled Jinja2, and installed Jina2==2.11.3

The below import error is shown:
File "C:\Program Files\Python312\Lib\site-packages\jinja2\filters.py", line 13, in <module>
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (C:\Program Files\Python312\Lib\site-packages\markupsafe\__init__.py)

Tác giả Câu trả lời hay nhất

When Odoo encounters a False expression during evaluation, it may throw a forbidden opcode error (from safe_eval.py) due to the newly introduced opcode in Python 3.12: RETURN_CONST. To resolve this issue, you can consider downgrading the Python version to 3.11. 

Thank you to everyone for your valuable support and guidance.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 5 25
1763
2
thg 5 25
5033
1
thg 3 25
1079
4
thg 3 25
3792
3
thg 2 25
4541