100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 如何解决:OSError: Unable to create file (unable to open file: name = ‘. et_classification.h5‘ errno = 2

如何解决:OSError: Unable to create file (unable to open file: name = ‘. et_classification.h5‘ errno = 2

时间:2022-11-22 20:48:33

相关推荐

如何解决:OSError: Unable to create file (unable to open file: name = ‘. et_classification.h5‘  errno = 2

报错:OSError: Unable to create file (unable to open file: name = ‘.

et_classification.h5’, errno = 22, error message = ‘Invalid argument’, flags = 13, o_flags = 302)。

一般有5中种解决方式:

1、相对路径改成绝对路径

2、修改路径

h5FileName ='.\model\net_classification.h5'

改为:

h5FileName ='net_classification.h5'

3.文件找不到,

4.文件被占用,比如说文件被打开,或则某个程序在使用该文件

5.文件无权限访问,点击文件属性,点击高级。把下图对应的勾上,点确定。

6.打开的不是文件,而是一个目录

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。