成功解决Python报错: OSError: [Errno 22] Invalid argument
今天在读入文件时老是报错 OSError: [Errno 22] Invalid argument
方法一:
将路径中的\改为/或者\\。这是因为Python中\t为换行符,而无法识别。
方法二:
手打一遍路径,不要直接复制粘贴。像pycharm,Spyder等平台,复制黏贴路径都会报错“OSError: [Errno 22] Invalid argument:“.
reference:
https://blog.csdn.net/kehuizhidao/article/details/80393189
https://blog.csdn.net/CSDN_Xying/article/details/97927376
成功解决Python报错: OSError: [Errno 22] Invalid argument相关推荐
- python中遇到报错OSError: [Errno 22] Invalid argument的解决方法
将时间戳用python语言转换成指定日期: 代码如下: import timetimeStamp = 1589018284000 timeArray = time.localtime(timeStam ...
- pyLDAvis3.3.1 报错 OSError: [Errno 22] Invalid argument: ‘https://cdn.jsdelivr.net/gh/bmabey/pyLDAvis@
问题描述: pyLDAvis3.3.1 报错: File "E:\ProgramData\Anaconda3\lib\site-packages\pyLDAvis_display.py&qu ...
- 报错OSError: [Errno 22] Invalid argument 的一种解决方法
今天写作业的时候突然读不了txt文件了,查了很多地方,已开始写相对路径之后显示的是如下报错,仔细检查之后并没有发现代码问题. 查找资料仔细检查之后依旧无法解决,决定改用写绝对路径. 填写绝对路径时又报 ...
- pytorch数据加载时报错OSError: [Errno 22] Invalid argument
将数据加载器的num_workers删去,即由 train_loader = torch.utils.data.DataLoader(trainset, batch_size=batch_size, ...
- OSError: [Errno 22] Invalid argument:**
OSError: [Errno 22] Invalid argument: 在使用open打开文件时,出现报错 OSError: [Errno 22] Invalid argument: 'H:\\G ...
- Python OSError: [Errno 22] Invalid argument:的出现和解决
1.在学习从文件读取数据中,写了个示例代码,读取不在同一个目录的file.txt,运行后报这个Python OSError: [Errno 22] Invalid argument:错误: (1).首 ...
- 对于解决python中出现的OSError: [Errno 22] Invalid argument: ‘\u202aD‘ 的解决
对于解决python中出现的OSError: [Errno 22] Invalid argument: '\u202aD' 的解决 ** 今天这导入数据集文件时有时正常运行,有时出现了OSError: ...
- 【报错】“OSError: [Errno 22] Invalid argument: ‘cache\\resume_lattice_only_tra”
[报错]"OSError: [Errno 22] Invalid argument: 'cache\resume_lattice_only_train:" Windows上运行Fl ...
- flask 项目启动报错:OSError OSError: [Errno 22] Invalid argument
flask 项目启动报错:OSError OSError: [Errno 22] Invalid argument 问题描述-OSError OSError: [Errno 22] Invalid a ...
最新文章
- DHCP之一 DHCP的部署安装
- 【Android NDK 开发】NDK 交叉编译 ( Ubuntu 中交叉编译动态库 | Android Studio 中配置使用第三方动态库 )
- php imagefill,PHP 图像填充 imagefill、imagefilledarc 与 imagefilledrectangle() 函数
- 循环神经网络应用案例
- 比较两个title是否相等(差点把我送走)
- java开发人员_每个Java开发人员都应该阅读的10本书
- [渝粤教育] 广东-国家-开放大学 21秋期末考试财政学10573k1
- NB模组基本AT指令
- 《ArcGIS Runtime SDK for Android开发笔记》——(9)、空间数据的容器-地图MapView
- 为何要搞 10 年?方舟编译器专家首次回应
- Windows API ——GetLogicalDriveStrings——获取逻辑驱动器
- 【模板】左偏树(可并堆)
- Atitit 数据类型体系图 目录 1. 系统常用的数据类型	1 2. H5 form表单新数据类型	2 2.1. TML5 新的 Input 类型	2 2.2. HTML5 的新的表单元素:	2
- jquery下的this,$(this),$(this).get(0);
- Matlab求解点到直线距离
- 小象学院 零基础Python入门 案例四 52周存钱挑战v_4.0
- tp5 mysql悲观锁_thinkphp悲观锁机制处理高并发
- MySQL数据库实验练习题
- JUC并发编程学习笔记
- CM108AH和DP108/DP108T的区别