Skip to Content
Menu
This question has been flagged

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.
Avatar
Discard
Author Best Answer

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)



Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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)

Related Posts Replies Views Activity
3
Feb 25
954
5
Oct 24
2497
1
Aug 24
1007
1
May 24
2918
0
Aug 23
1364