Validation unable to find DTD since 4.9.3 version

Bug #2028777 reported by François Ferry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
New
Undecided
Unassigned

Bug Description

Hello,

I encounter an error when trying to parse a string using etree.fromstring since I'm using lxml==4.9.3 (I don't have the issue with lxml==4.9.2). You can find in attachment a small script allowing to reproduce it.

Here is the error:

Traceback (most recent call last):
  File "/home/fferry/src/interne/cubes/crm/dtd_error.py", line 14, in <module>
    etree.fromstring(XHTML, parser=etree.XMLParser(dtd_validation=True))
  File "src/lxml/etree.pyx", line 3257, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1916, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1803, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1144, in lxml.etree._BaseParser._parseDoc
  File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError
  File "<string>", line 3
lxml.etree.XMLSyntaxError: Validation failed: no DTD found !, line 3, column 43

Here are my library versions:

Python : sys.version_info(major=3, minor=9, micro=2, releaselevel='final', serial=0)
lxml.etree : (4, 9, 3, 0)
libxml used : (2, 10, 3)
libxml compiled : (2, 10, 3)
libxslt used : (1, 1, 38)
libxslt compiled : (1, 1, 38)

Kind regards,
François.

Revision history for this message
François Ferry (fferry) wrote :
Revision history for this message
scoder (scoder) wrote :

Probably a duplicate of ticket 2029411.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.