m0_67985836 2024-10-05 19:52 采纳率: 75%
浏览 116
已结题

FileNotFoundError 解决方案

python遇到这个问题,尝试过网上的各种方法均不可行:求能解决问题的答案
FileNotFoundError: [Errno 2] Unable to synchronously open file (unable to open file: name = 'datasets/train_catvnoncat.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

img

img

img

  • 写回答

18条回答 默认 最新

  • CSDN专家-sinJack 2024-10-05 22:18
    关注

    代码,文件路径前后存在空格,把空格都去掉就可以了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(17条)

报告相同问题?

问题事件

  • 系统已结题 10月14日
  • 已采纳回答 10月6日
  • 创建了问题 10月5日