Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4c3bf8e

Browse files
committed
Fix ImportError: No module named 'StringIO' on Python 3
1 parent e951bd6 commit 4c3bf8e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/misc/svg_filter_pie.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242

4343

4444
# save
45-
from StringIO import StringIO
46-
f = StringIO()
45+
from io import BytesIO
46+
f = BytesIO()
4747
plt.savefig(f, format="svg")
4848

4949
import xml.etree.cElementTree as ET

0 commit comments

Comments
 (0)