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
{{ message }}
Repository navigation
svgwriter not assigned in FigureCanvasSVG.print_svg for StringIO filename #1373
#!/usr/bin/python2
from io import StringIO
from matplotlib.backends.backend_svg import FigureCanvasSVG
from matplotlib.figure import Figure
output = StringIO()
fig = Figure()
canvas = FigureCanvasSVG(fig)
canvas.print_svg(output)
Traceback (most recent call last):
File "./print_svg.py", line 11, in <module>
canvas.print_svg(output)
File "/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_svg.py", line 1101, in print_svg
return self._print_svg(filename, svgwriter, fh_to_close, **kwargs)
UnboundLocalError: local variable 'svgwriter' referenced before assignment
Activity
dmcdougall commentedon Oct 15, 2012
Resolved by #1380. Closing.