تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4902 أدوات العرض

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:

الصورة الرمزية
إهمال

Please try with Jinja2==2.11.3.

الكاتب

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)

الكاتب أفضل إجابة

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
4
مايو 25
1852
2
مايو 25
5093
1
مارس 25
1135
4
مارس 25
3869
3
فبراير 25
4646