You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xml2rfc crashes when a unprepped draft is published with prepTime attribute in rfc element.
Example:
<?xml version="1.0" encoding="utf-8"?>
<rfc ipr="trust200902" docName="dradraft-doe-preptime-test-00" prepTime="2024-10-17T08:53:24" category="exp" version="3">
<front>
<title abbrev="preptime-test">Preptime Test</title>
<author fullname="Jane Doe">
<address>
<postal>
<country>NZ</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<abstract>
<t>Omnis omnis iusto impedit ipsam. Ex eligendi earum expedita molestiae tenetur. Et nobis nihil perspiciatis temporibus quaerat facilis sit et.</t>
</abstract>
</front>
<middle>
<section anchor="introduction" title="Introduction">
<t>Ratione assumenda magni nostrum accusamus nemo eum. Assumenda sit eum culpa odio doloribus mollitia ipsum. Repellendus dolore qui aliquid cupiditate totam. Blanditiis dolorum animi quo optio nemo.</t>
</section>
</middle>
<back>
</back>
</rfc>
Error:
Traceback (most recent call last):
File "/usr/local/bin/xml2rfc", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/run.py", line 723, in main
writer.write(filename)
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 340, in write
text = self.process()
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 304, in process
lines = self.render(self.root, width=MAX_WIDTH, joiners=joiners)
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 364, in render
res = func(e, width, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 3082, in render_rfc
lines = self.ljoin(lines, c, width, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 553, in ljoin
res = mklines(self.render(e, width, **kwargs), e)
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 364, in render
res = func(e, width, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 1788, in render_front
text = '\n\n\n\n' + self.render_first_page_top(e, width, **kwargs) + '\n'
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 2010, in render_first_page_top
right = get_right(e)
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 2006, in get_right
right.append(self.render_date(front.find('./date'), width, **kwargs))
File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 1368, in render_date
have_date = e.get('day') or e.get('month') or e.get('year')
AttributeError: 'NoneType' object has no attribute 'get'
This error is due to the lack of date element.
But there can be more errors down the line.
Describe the issue
xml2rfc
crashes when a unprepped draft is published withprepTime
attribute inrfc
element.Example:
Error:
This error is due to the lack of
date
element.But there can be more errors down the line.
Code of Conduct
The text was updated successfully, but these errors were encountered: