hassanakbar4 / tractive-test

0 stars 0 forks source link

xml2rfc --v3 *really* wants files #352

Closed hassanakbar4 closed 2 years ago

hassanakbar4 commented 6 years ago

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


Not sure how hard it is to fix (seems XML lib is responsible for this), but xml2rfc --v3 can work with shell redirection so it always needs temporary files:

% xml2rfc --v3 --text x                                                                                             ~/g/src/github.com/mmarkdown/mmark master +
Parsing file x
x(0): Warning: Invalid document before running preptool: Did not expect element t there, line 61
x(3): Warning: The document date (2018-04-01) is more than 3 days away from today's date
x(0): Warning: Invalid document after running preptool: Did not expect element t there, line 61
x(2): Warning: Expected a category, one of historic,info,exp,std,bcp, but found none
x(43): Warning: No renderer for <bcp14> found
Created file x.txt
% xml2rfc --v3 --text <(./mmark rfc/rfc3514.md)                                                                     ~/g/src/github.com/mmarkdown/mmark master +
Parsing file /proc/self/fd/11
WARNING: Parsing Error: no element found (line 0)
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 374, in main
    xmlrfc = parser.parse(remove_comments=False, quiet=True)
  File "/usr/lib/python3/dist-packages/xml2rfc/parser.py", line 528, in parse
    tree = lxml.etree.parse(file, parser)
  File "src/lxml/lxml.etree.pyx", line 3427, in lxml.etree.parse (src/lxml/lxml.etree.c:81110)
  File "src/lxml/parser.pxi", line 1828, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:118065)
  File "src/lxml/parser.pxi", line 1848, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:118334)
  File "src/lxml/parser.pxi", line 1736, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:117014)
  File "src/lxml/parser.pxi", line 1102, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:111258)
  File "src/lxml/parser.pxi", line 595, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:105102)
  File "src/lxml/parser.pxi", line 706, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:106810)
  File "src/lxml/parser.pxi", line 646, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:105956)
  File "<string>", line 0
lxml.etree.XMLSyntaxError

Issue migrated from trac:352 at 2021-10-20 18:27:00 +0500

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 ` tofixed`

hassanakbar4 commented 5 years ago

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


Fixed in [2565]:

Moved the reading of input files to avoid multiple reads. Fixes issue #352.