Discuss / Python / 错误

错误

Topic source

在桌面上保存了张图片test.jpg。报这个错误是怎么回事呢 FileNotFoundError: [Errno 2] No such file or directory: 'test.jpg'

麦二小姐

#2 Created at ... [Delete] [Delete and Lock User]

test.jpg保存在python当前工作目录下,可直接打开,否则要加路径 比如: im=Image.open('C:\Documents and Settings\All Users\Documents\My Pictures\示例图片\Sunset.jpg')


  • 1

Reply