Subject: [xml2rfc] #366 (Version_3_cli_txt): xml2rfc crash

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sat, 25 Aug 2018 18:01:39 -0000

#366: xml2rfc crash

 Not sure if this is the same thing as I saw earlier:
 stack trace:
 {{{
 Parsing file learninggo.xml
 learninggo.xml(0): Warning: Invalid document before running preptool:
 Element li has extra content: t
 Traceback (most recent call last):
   File "/usr/bin/xml2rfc", line 11, in <module>
     load_entry_point('xml2rfc==2.10.0', 'console_scripts', 'xml2rfc')()
   File "/usr/lib/python3/dist-packages/xml2rfc/run.py", line 382, in main
     xmlrfc.tree = prep.prep()
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/preptool.py", line
 353, in prep
     func(e, e.getparent())
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/preptool.py", line
 1124, in iref_add_number
     p.set('anchor', anchor)
   File "src/lxml/lxml.etree.pyx", line 824, in lxml.etree._Element.set
 (src/lxml/lxml.etree.c:51133)
   File "src/lxml/apihelpers.pxi", line 574, in
 lxml.etree._setAttributeValue (src/lxml/lxml.etree.c:22876)
   File "src/lxml/apihelpers.pxi", line 1441, in lxml.etree._utf8
 (src/lxml/lxml.etree.c:31470)
 TypeError: Argument must be bytes or unicode, got 'NoneType'
 }}}

 It doesn't barf out where in the doc this is.. and my XML file has 5000
 lines. I'm attaching it anyway, maybe you have more luck than I.

-- 
-------------------------------+-------------------
 Reporter:  [email-masked]       |      Owner:
     Type:  defect             |     Status:  new
 Priority:  medium             |  Milestone:
Component:  Version_3_cli_txt  |    Version:  2.4.x
 Keywords:                     |
-------------------------------+-------------------

Ticket URL: <https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/366>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>