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
ODF2XHTML throws an error if the document has a footnote or endnote in it.
File "\odf\odf2xhtml.py", line 1486, in xhtml
return ''.join(self.lines)
^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 132: expected str instance, int found
self.lines has integers inside it from the numbers used to mark the footnotes.
I was able to get it to work by subclassing ODF2XHTML and overwriting the xhtml method:
def xhtml(self):
""" Returns the xhtml
This method was broken in base class so I had to modify it.
If there were footnotes in the document, self.lines would have integers in it
and then join would crash the program because it only takes strings
"""
self.lines = [str(i) for i in self.lines]
return ''.join(self.lines)
The text was updated successfully, but these errors were encountered:
ODF2XHTML throws an error if the document has a footnote or endnote in it.
File "\odf\odf2xhtml.py", line 1486, in xhtml
return ''.join(self.lines)
^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 132: expected str instance, int found
self.lines has integers inside it from the numbers used to mark the footnotes.
I was able to get it to work by subclassing ODF2XHTML and overwriting the xhtml method:
The text was updated successfully, but these errors were encountered: