Subject: [xml2rfc] #370 (Version_3_cli_txt): xml2rfc crash with empty artwork

From: "xml2rfc issue tracker" <[email-masked]>
Date: Fri, 31 Aug 2018 21:14:14 -0000

#370: xml2rfc crash with empty artwork

 xml2rfc crashes if you create an empty file for the artwork to include.
 {{{
 % xml2rfc --v3 2100.xml
 Parsing file 2100.xml
 2100.xml(25): Error: Expected an <artwork> src= file at
 '/home/miek/g/src/github.com/mmarkdown/mmark/img.svg', but no such file
 exists
 2100.xml(27): Error: Expected an <artwork> src= file at
 '/home/miek/g/src/github.com/mmarkdown/mmark/img.svg', but no such file
 exists
 2100.xml(28): Error: Expected an <artwork> src= file at
 '/home/miek/g/src/github.com/mmarkdown/mmark/img.svg', but no such file
 exists
 Created file 2100.txt
 }}}
 And then
 {{{
 touch img.svg
 }}}
 leads to
 {{{
 % xml2rfc --v3 2100.xml
 Parsing file 2100.xml
 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
 1457, in element_artwork
     debug.type('data')
 NameError: name 'debug' is not defined
 }}}

-- 
-------------------------------+-------------------
 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/370>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Fri, 31 Aug 2018 21:18:12 -0000

Comment (by [email-masked]):

 The text rendering is also not that great
 {{{
 1.  Introduction

    (Artwork only available as None: )

    (Artwork only available as None: )(Artwork only available as
 None: )

                             Figure 1: Mama Mia.
 }}}

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

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