Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

I have installed Odoo 17 Community Edition in Ubuntu 24.04 and Python 3.12.  It works perfectly and without issues.  However, once a month, it fails and a restart solves it.  Every time it fails it gives the error below.

Has anyone seen this before?  Any recommendations on how to avoid this problem?


Sep 19 20:28:10 hris odoo[406005]:     from .mail import *
Sep 19 20:28:10 hris odoo[406005]:   File "/opt/odoo/server-code/odoo/tools/clean.py", line 18, in 
Sep 19 20:28:10 hris odoo[406005]:     raise ImportError(
Sep 19 20:28:10 hris odoo[406005]: ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
Sep 19 20:28:10 hris odoo[406005]: Install lxml[html_clean] or lxml_html_clean directly.
Sep 19 20:28:10 hris systemd[1]: odoo17.service: Main process exited, code=exited, status=1/FAILURE
Sep 19 20:28:10 hris systemd[1]: odoo17.service: Failed with result 'exit-code'.
Sep 19 20:28:10 hris systemd[1]: odoo17.service: Consumed 50.664s CPU time, 99.2M memory peak, 0B memory swap peak.
Awatar
Odrzuć
Najlepsza odpowiedź

Hi, 

Try: pip install lxml_html_clean


Awatar
Odrzuć
Autor Najlepsza odpowiedź

Hello,

I have version 5.2.1 installed.  Looking at the requirements.txt, this is indicated there:

# cat requirements.txt | grep lxml
lxml==4.8.0 ; python_version <= '3.10'
lxml==4.9.3 ; python_version > '3.10' and python_version < '3.12' # min 4.9.2, pinning 4.9.3 because of missing wheels for darwin in 4.9.3
lxml==5.2.1; python_version >= '3.12' # (Noble - removed html clean)
lxml-html-clean; python_version >= '3.12' # (Noble - removed from lxml, unpinned for futur security patches)



Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

Verify that the package version is correct or not:

lxml==4.8.0 ; python_version <= '3.10'

lxml==4.9.2 ; python_version > '3.10'

OR

Switch to python 3.10 version.


Hope it helps

Awatar
Odrzuć
Autor

Hello,

I have version 5.2.1 installed.  Looking at the requirements.txt, this is indicated there:

# cat requirements.txt | grep lxml
lxml==4.8.0 ; python_version <= '3.10'
lxml==4.9.3 ; python_version > '3.10' and python_version < '3.12' # min 4.9.2, pinning 4.9.3 because of missing wheels for darwin in 4.9.3
lxml==5.2.1; python_version >= '3.12' # (Noble - removed html clean)
lxml-html-clean; python_version >= '3.12' # (Noble - removed from lxml, unpinned for futur security patches)

Powiązane posty Odpowiedzi Widoki Czynność
3
lip 25
487
3
lip 25
463
3
cze 25
3674
5
maj 25
4396
2
maj 25
1431