Subject: [xml2rfc] #376 (Version_3_cli_txt): double exception

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 19 Sep 2018 20:06:22 -0000

#376: double exception

 Thanks for the improved error reporting. Running xml2rfc 2.10.2 on
 learninggo.xml now gives line numbers.

 However I got a double exception with it:
 {{{
 ~/g/src/github.com/mmarkdown/mmark/mmark learninggo.md > learninggo.xml
 xml2rfc --v3 learninggo.xml
 Parsing file learninggo.xml
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/preptool.py", line
 207, in validate
     v3_rng.assertValid(self.tree)
   File "src/lxml/lxml.etree.pyx", line 3491, in
 lxml.etree._Validator.assertValid (src/lxml/lxml.etree.c:184578)
 lxml.etree.DocumentInvalid: Did not expect element blockquote there, line
 28

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/usr/bin/xml2rfc", line 11, in <module>
     load_entry_point('xml2rfc==2.10.2', 'console_scripts', 'xml2rfc')()
   File "/usr/lib/python3/dist-packages/xml2rfc/run.py", line 387, in main
     xmlrfc.tree = prep.prep()
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/preptool.py", line
 365, in prep
     func(e, e.getparent())
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/preptool.py", line
 412, in validate_before
     if not self.validate('before'):
   File "/usr/lib/python3/dist-packages/xml2rfc/writers/preptool.py", line
 214, in validate
     msg = "%s(%s): %s: %s, at %s" % (self.xmlrfc.source, error.line,
 error.level_name.title(), error.message, error.path)
 AttributeError: 'lxml.etree._LogEntry' object has no attribute 'path'
 Makefile:15: recipe for target 'learninggo.txt' failed
 make: *** [learninggo.txt] Error 1
 }}}

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

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Thu, 20 Sep 2018 11:13:38 -0000

#376: double exception

Comment (by [email-masked]):

 Hi Miek,

 Thanks for the continued testing.  I ran my current copy of learninggo.xml
 through the release without having the experience above, so I probably
 need a new copy of the source, and would also appreciate knowing the
 switches you used when you got the result above.

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

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sat, 22 Sep 2018 13:12:21 -0000

#376: double exception

Changes (by [email-masked]):

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

Comment:

 Fixed in [2596]:

 Tweaked the validation error reporting again.  Fixes issue #376
 (lxml<3.8.0 does not provide xpath to the offending element in
 error.path).

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

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