Skip to content

Commit

Permalink
Merge pull request #65 from BenCellini/master
Browse files Browse the repository at this point in the history
Fix write_svg method, open the file in binary mode
  • Loading branch information
florisvb authored Feb 1, 2024
2 parents 86f4911 + 9af4f9f commit 09a6467
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion figurefirst/svg_to_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ def write_svg(self, output_filename):
self.output_xml.writexml(outfile, encoding="utf-8")
except UnicodeEncodeError:
outfile.close()
outfile = open(output_filename, "w")
outfile = open(output_filename, "wb")
outfile.write(self.output_xml.toxml().encode("ascii", "xmlcharrefreplace"))
outfile.close()

Expand Down

0 comments on commit 09a6467

Please sign in to comment.