hassanakbar4 / tractive-test

0 stars 0 forks source link

exception from missing author for reference #331

Closed hassanakbar4 closed 3 years ago

hassanakbar4 commented 7 years ago

component_Version 2 cli resolution_overtaken by events type_defect | by tale@dd.org


Traceback (most recent call last):
  File "/usr/local/bin/xml2rfc", line 9, in <module>
    load_entry_point('xml2rfc==2.5.2', 'console_scripts', 'xml2rfc')()
  File "/Library/Python/2.7/site-packages/xml2rfc/run.py", line 213, in main
    htmlwriter.write(filename)
  File "/Library/Python/2.7/site-packages/xml2rfc/writers/base.py", line 1265, in write
    self._build_document()
  File "/Library/Python/2.7/site-packages/xml2rfc/writers/base.py", line 1211, in _build_document
    self.write_reference_list(reference_list)
  File "/Library/Python/2.7/site-packages/xml2rfc/writers/html.py", line 569, in write_reference_list
    a.tail = ', '
UnboundLocalError: local variable 'a' referenced before assignment

That was caused when trying to make an html file from an xml file that was generated by kramdown where I had normative and informative references that didn't have an associated author. The .xml file had empty " ". The conversion to .txt succeeded without complaint.

Independent of whether author is required for every reference, this could be handled more gracefully. I've also filed a ticket against kramdown to look at whether having an author in the reference needs to be enforced.


Issue migrated from trac:331 at 2021-10-20 18:24:30 +0500

hassanakbar4 commented 7 years ago

@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} edited the issue description

hassanakbar4 commented 7 years ago

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


I've merged in a number of changes over the last couple of days, and now cannot reproduce this issue from the description. Would it be possible for you to attach a test file which triggers the exception with your copy of xml2rfc?