hassanakbar4 / tractive-test

0 stars 0 forks source link

double exception #376

Closed hassanakbar4 closed 3 years ago

hassanakbar4 commented 6 years ago

component_Version_3_cli_txt resolution_fixed type_defect | by miek@miek.nl


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

Issue migrated from trac:376 at 2021-10-20 18:30:04 +0500

hassanakbar4 commented 6 years ago

@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} commented


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.

hassanakbar4 commented 6 years ago

@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} changed status from new to closed

hassanakbar4 commented 6 years ago

@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} changed resolution from ` tofixed`

hassanakbar4 commented 6 years ago

@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} commented


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).