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

LXML 5.2.0 breaks import #569

Open
Leewaldoe opened this issue Apr 1, 2024 · 2 comments
Open

LXML 5.2.0 breaks import #569

Leewaldoe opened this issue Apr 1, 2024 · 2 comments

Comments

@Leewaldoe
Copy link

ImportError: lxml.html.clean module is now a separate project lxml_html_clean.

@egenchen
Copy link

egenchen commented Apr 1, 2024

pip install lxml==4.9.4 fixed my issue

@hugovk
Copy link
Contributor

hugovk commented Apr 2, 2024

There's a workaround at #558 (comment):

Just an update on this. The latest version of lxml (5.2.0) no longer contains the HTML cleaner. Its code is now available as a dedicated project on GitHub and PyPI.

If you want to continue using it, you can either depend on lxml[html_clean] or on lxml_html_clean directly. lxml contains backward-compatible import so there is nothing else you need to change than the dependency.

kylebgorman added a commit to kylebgorman/wikipron that referenced this issue Apr 8, 2024
kylebgorman added a commit to CUNY-CL/wikipron that referenced this issue Apr 9, 2024
* Fixes excessive line wrapping.

* Adds changelog update.

* Reruns with current `black`.

* Adds lxml_html_clean dependency.

For context, see:

psf/requests-html#558 (comment)
psf/requests-html#569 (comment)

* [nan] Removes specialized selector.

It seems that Min Nan has been totally removed from English Wiktionary.

* updates changelog

* Adds new dependency to pyproject.toml too.
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

No branches or pull requests

3 participants