D:\2021c\python\供应货能力(高斯过程拟合).py:64: UserWarning: Glyph 20379 (\N{CJK UNIFIED IDEOGRAPH-4F9B}) missing from current font. plt.savefig(f'./img/供应商ID_{supplier}') D:\2021c\python\供应货能力(高斯过程拟合).py:64: UserWarning: Glyph 24212 (\N{CJK UNIFIED IDEOGRAPH-5E94}) missing from current font. plt.savefig(f'./img/供应商ID_{supplier}') D:\2021c\python\供应货能力(高斯过程拟合).py:64: UserWarning: Glyph 21830 (\N{CJK UNIFIED IDEOGRAPH-5546}) missing from current font. plt.savefig(f'./img/供应商ID_{supplier}') Traceback (most recent call last): File "D:\2021c\python\供应货能力(高斯过程拟合).py", line 64, in <module> plt.savefig(f'./img/供应商ID_{supplier}') File "D:\Python\Lib\site-packages\matplotlib\pyplot.py", line 1023, in savefig res = fig.savefig(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Python\Lib\site-packages\matplotlib\figure.py", line 3378, in savefig self.canvas.print_figure(fname, **kwargs) File "D:\Python\Lib\site-packages\matplotlib\backend_bases.py", line 2366, in print_figure result = print_method( ^^^^^^^^^^^^^ File "D:\Python\Lib\site-packages\matplotlib\backend_bases.py", line 2232, in <lambda> print_method = functools.wraps(meth)(lambda *args, **kwargs: meth( ^^^^^ File "D:\Python\Lib\site-packages\matplotlib\backends\backend_agg.py", line 509, in print_png self._print_pil(filename_or_obj, "png", pil_kwargs, metadata) File "D:\Python\Lib\site-packages\matplotlib\backends\backend_agg.py", line 458, in _print_pil mpl.image.imsave( File "D:\Python\Lib\site-packages\matplotlib\image.py", line 1689, in imsave image.save(fname, **pil_kwargs) File "D:\Python\Lib\site-packages\PIL\Image.py", line 2429, in save fp = builtins.open(filename, "w+b") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: './img/供应商ID_S140.png'
时间: 2023-07-21 10:00:56 浏览: 196
2021C:人口出生率与经济发展.docx
您遇到的错误是由于找不到指定的文件或目录而导致的。根据错误信息,文件路径为'./img/供应商ID_S140.png'。请确保文件路径正确,并且目录存在。您可以检查一下文件路径是否正确,以及所需的目录是否存在。另外,还需要确认您是否具有足够的权限来创建和保存文件。如果问题仍然存在,请提供更多的代码和上下文信息,以便我可以更好地帮助您解决问题。
阅读全文