Python键错误:u'image.u图像'将图形另存为SVG时

2024-09-27 21:33:13 发布

您现在位置:Python中文网/ 问答频道 /正文

线路:

destination1 = "test.svg"
destination2 = "test.png"
plt.savefig(destination1, format='svg')

在我的python脚本中运行良好,直到I.T.更新了我的机器以运行office2013(这应该是不相关的)。我用Python穿过热情的树冠。你知道吗

我通过pip更新了matplotlib、pillow以及大量其他不相关的包,但是我得到了一个异常

KeyError: u'image.composite_image' 

所以回到一个新的世界

plt.savefig(destination2, format='png', dpi=700)

工作很好,但我真的希望能够保存为svg再次。错误的打印输出显示在im下面,完全不知道如何解决这个问题

enter image description here


Tags: svgtestimage脚本机器formatpngplt

热门问题