Comment 1 for bug 2001209

Revision history for this message
Hugo Bauer (hugoobauer) wrote :

I have the same issue from a Python:3.10 Docker image, but not from my laptop (macOS).

>>> import lxml.html
>>> lxml.html.HTMLParser(encoding='latin_1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/site-packages/lxml/html/__init__.py", line 1910, in __init__
    super(HTMLParser, self).__init__(**kwargs)
  File "src/lxml/parser.pxi", line 1728, in lxml.etree.HTMLParser.__init__
  File "src/lxml/parser.pxi", line 840, in lxml.etree._BaseParser.__init__
LookupError: unknown encoding: 'b'latin_1''