hassanakbar4 / tractive-test

0 stars 0 forks source link

crash with v2 xml #372

Closed hassanakbar4 closed 2 years ago

hassanakbar4 commented 6 years ago

component_Version 2 cli resolution_wontfix type_defect | by miek@miek.nl


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

Issue migrated from trac:372 at 2021-10-20 18:29:36 +0500

hassanakbar4 commented 6 years ago

@{"email"=>"miek@miek.nl", "name"=>nil, "username"=>nil} uploaded file learninggo-2.xml (205.9 KiB)

hassanakbar4 commented 5 years ago

@{"email"=>"miek@miek.nl", "name"=>nil, "username"=>nil} commented


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

hassanakbar4 commented 5 years ago

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

hassanakbar4 commented 5 years ago

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

hassanakbar4 commented 5 years ago

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


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