Subject: [xml2rfc] #372 (Version 2 cli): crash with v2 xml

From: "xml2rfc issue tracker" <[email-masked]>
Date: Fri, 07 Sep 2018 19:33:27 -0000

#372: crash with v2 xml

 Just adding as a data point; but this document crashes xml2rfc with v2
 stuff. Doesn't say on what line though :(
 {{{
 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 337, in main
     pagedwriter.write(filename)
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/base.py", line
 1343, in write
     self._build_index()
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/base.py", line
 1141, in _build_index
     self.write_section_rec(middle, None)
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/base.py", line 989,
 in write_section_rec
     level=level + 1, appendix=appendix, numbered=numbered)
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/base.py", line 956,
 in write_section_rec
     self.write_figure(element)
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/paginated_txt.py",
 line 119, in write_figure
     self.write_with_break_hint(BaseRfcWriter.write_figure, 'raw', *args,
 **kwargs)
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/paginated_txt.py",
 line 94, in write_with_break_hint
     writer(self, *args, **kwargs)
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/base.py", line 820,
 in write_figure
     artwork_align = artwork.attrib.get('align', figure_align)
 AttributeError: 'NoneType' object has no attribute 'attrib'
 Makefile:23: recipe for target 'learninggo-2.txt' failed
 make: *** [learninggo-2.txt] Error 1
 }}}

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

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sun, 09 Sep 2018 20:06:34 -0000

#372: crash with v2 xml

Comment (by [email-masked]):

 most likely caused by `<figure></figure>`.
 ah and I saw I'm running `xml2rfc -n` which is not the default.

-- 
----------------------------+----------------------------------
Resolution:                 |   Keywords:
----------------------------+----------------------------------

Ticket URL: <https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/372#comment:1>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sat, 15 Sep 2018 14:31:31 -0000

#372: crash with v2 xml

Changes (by [email-masked]):

 * status:  new => closed
 * resolution:   => wontfix

Comment:

 Right.  It detects a schema violation if you don't use '-n':

 {{{
 <string>: Line 3730: Element figure content does not follow the DTD,
 expecting (iref* , preamble? , artwork , postamble?), got nothing.
 }}}

 Since this concerns the v2 formatter and uses --no-dtd when there is v2
 schema violations, I'm going to close this with a won't fix.

 The v3 text formatter deals with this and produces output (although there
 are other issues with that output, not related to the crash above).

-- 
----------------------------+----------------------------------
  Reporter:  [email-masked]   |      Owner:  [email-masked]
      Type:  defect         |     Status:  closed
  Priority:  medium         |  Milestone:
 Component:  Version 2 cli  |    Version:  2.4.x
Resolution:  wontfix        |   Keywords:
----------------------------+----------------------------------

Ticket URL: <https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/372#comment:2>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>