library · inferred from evidence
etree
A submodule of the lxml library used for XML and HTML parsing.
- ImportError: cannot import name 'PyQuery' from 'pyquery'
Fixes the pyquery shadowing failure where your own pyquery.py hides the library. Use when `from pyquery import PyQuery` raises ImportError naming PyQuery even though pyquery is installed. Not for missing pyquery.
- ImportError: cannot import name 'etree' from 'lxml'
Fixes pyquery failing on Python 3.12 because the installed lxml is too old. Use when `from pyquery import PyQuery` raises `ImportError: cannot import name 'etree' from 'lxml'`. Not for missing pyquery or missing lxml.
- ModuleNotFoundError: No module named 'pyquery'
Fixes the plain missing-module error for pyquery. Use when `from pyquery import PyQuery` fails with ModuleNotFoundError naming pyquery. Not for the lxml etree import failure underneath it.
- ImportError: DLL load failed: %1 is not a valid Win32 application
Fixes lxml failing to load on Windows with a Win32 application error at import time. Use when `from lxml import etree` raises `ImportError: DLL load failed: %1 is not a valid Win32 application`. Not for ModuleNotFoundError (lxml absent) or