Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] Prevent lxml import error #2896

Closed
wants to merge 2 commits into from
Closed

[16.0][FIX] Prevent lxml import error #2896

wants to merge 2 commits into from

Conversation

Pexers
Copy link

@Pexers Pexers commented Apr 3, 2024

Description

  • As of today, using the latest version of the lxml Python dependency (currently 5.2.1) will throw the below error when starting up Odoo:

    Traceback (most recent call last):
    File "/usr/bin/odoo", line 3, in
    import odoo
    File "/usr/lib/python3/dist-packages/odoo/init.py", line 125, in
    from . import modules
    File "/usr/lib/python3/dist-packages/odoo/modules/init.py", line 8, in
    from . import db, graph, loading, migration, module, registry, neutralize
    File "/usr/lib/python3/dist-packages/odoo/modules/graph.py", line 11, in
    import odoo.tools as tools
    File "/usr/lib/python3/dist-packages/odoo/tools/init.py", line 16, in
    from .mail import *
    File "/usr/lib/python3/dist-packages/odoo/tools/mail.py", line 19, in
    from lxml.html import clean
    File "/home/odoo/.local/lib/python3.10/site-packages/lxml/html/clean.py", line 18, in
    raise ImportError(
    ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
    Install lxml[html_clean] or lxml_html_clean directly.

Fix

Impacted versions

  • All Odoo versions that use the latest for this dependency.

References

anmarmo1 added a commit to aurestic/odoo that referenced this pull request Apr 4, 2024
anmarmo1 added a commit to aurestic/OpenUpgrade that referenced this pull request Apr 4, 2024
anmarmo1 added a commit to aurestic/OpenUpgrade that referenced this pull request Apr 5, 2024
@Pexers
Copy link
Author

Pexers commented Apr 6, 2024

@CRogos since you were the author for the PR linked below, could you please review this one? Thank you!

@CRogos
Copy link
Contributor

CRogos commented Apr 8, 2024

Sorry haven't seen your PR. I also created a PR removing the lib. #2897

I think your change won't work, because the requirements.txt is automatically generated and should not be changed manually.

But due to the broken repo, none of the PR currently can be merged. :(

@Pexers
Copy link
Author

Pexers commented Apr 8, 2024

Thanks for the feedback @CRogos , I'll close this one then. Hopefully it gets fixed soon. 🤞

@Pexers Pexers closed this Apr 8, 2024
anmarmo1 added a commit to aurestic/OpenUpgrade that referenced this pull request Apr 9, 2024
anmarmo1 added a commit to aurestic/OpenUpgrade that referenced this pull request Jun 3, 2024
anmarmo1 added a commit to aurestic/OpenUpgrade that referenced this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants