hassanakbar4 / tractive-test

0 stars 0 forks source link

xml2rfc UnboundLocalError? #373

Closed hassanakbar4 closed 2 years ago

hassanakbar4 commented 5 years ago

component_Version 2 cli resolution_fixed type_defect | by shollenbeck@verisign.com


I'm getting this error (see the last line) when I just ran an XML source file through the online xml2rfc utility:

Using XML_LIBRARY=/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml2:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml4:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml5:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml6:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml7:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml8

Parsing file INPUT
Resolving entity... ...
Resolving entity... ...
Resolving entity... ...
Loaded from cache reference.RFC.2119.xml
Resolving entity... ...
Loaded from cache reference.RFC.5234.xml
Resolving entity... ...
Loaded from cache reference.RFC.6350.xml
Resolving entity... ...
Loaded from cache reference.RFC.8174.xml
Traceback (most recent call last):
  File "/usr/local/bin/xml2rfc", line 9, in <module>
    load_entry_point('xml2rfc==2.10.1', 'console_scripts', 'xml2rfc')()
  File "/usr/local/lib/python2.7/dist-packages/xml2rfc/run.py", line 342, in main
    pagedwriter.write(filename)
  File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/base.py", line 1351, in write
    self._build_document()
  File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/base.py", line 1290, in _build_document
    self.write_reference_list(reference_list)
  File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/raw_txt.py", line 789, in write_reference_list
    self.ref_start += i + 1
UnboundLocalError: local variable 'i' referenced before assignment

I don't know if there are errors in my XML source file. The UnboundLocalError causes xml2rfc to not produce any other output.

Issue migrated from trac:373 at 2021-10-20 18:29:43 +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 [2582]:

Fixed an issue where an empty section could cause an exception.