当前位置:网站首页>File name setting causes an error to be written to writelines: oserror: [errno 22] invalid argument
File name setting causes an error to be written to writelines: oserror: [errno 22] invalid argument
2022-06-27 10:16:00 【Is it far? My Shangri La】
Catalog
remarks
[20220522] A familiar function , Use up , I made a strange mistake for the first time OSError: [Errno 22] Invalid argument, Make a note of .
Code and error reporting
file_path=".\new.txt"
file_lines=["111\r\n","222\n","333\n"]
with open(file_path,'w',encoding="utf-8") as f:
f.writelines(file_lines)
python Version notes

Report a mistake
1. error ( The file path is ".\new.txt"):
2. error ( The file path is ".\aaa.txt"):
Normal condition
for example : The file path is ".\111.txt"
Error reason ( Unknown )
Reference link
边栏推荐
- 软件系统架构的演变
- Bluetooth health management device based on stm32
- Cross cluster deployment of helm applications using karmada [cloud native open source]
- Unity - - newtonsoft. Analyse json
- 2-4 installation of Nessus under Kali
- 上周热点回顾(6.20-6.26)
- R语言使用caret包的preProcess函数进行数据预处理:对所有的数据列进行center中心化(每个数据列减去平均值)、设置method参数为center
- 详细记录YOLACT实例分割ncnn实现
- Google browser chropath plug-in
- Use aspese slides to convert PPT to PDF
猜你喜欢

学习笔记之——数据集的生成

Use aspese slides to convert PPT to PDF

手机影像内卷几时休?

Product strength benchmarking seal /model 3, with 179800 pre-sales of Chang'an dark blue sl03

三层架构中,数据库的设计在哪一层实现,不是在数据存储层吗?

.NET 中的引用程序集

Decompile the jar package and recompile it into a jar package after modification

多线程实现 重写run(),怎么注入使用mapper文件操作数据库

【OpenCV 例程200篇】212. 绘制倾斜的矩形

. Net
随机推荐
【STM32】HAL库 STM32CubeMX教程十二—IIC(读取AT24C02 )
R语言plotly可视化:可视化多个数据集归一化直方图(historgram)并在直方图中添加密度曲线kde、设置不同的直方图使用不同的分箱大小(bin size)、在直方图的底部边缘添加边缘轴须图
一次线上移动端报表网络连接失败问题定位与解决
软件系统架构的演变
Comparison between new and old interfaces
[STM32] Hal library stm32cubemx tutorial 12 - IIC (read AT24C02)
torch.utils.data.RandomSampler和torch.utils.data.SequentialSampler的区别
多线程实现 重写run(),怎么注入使用mapper文件操作数据库
Freemarker
邮件系统(基于SMTP协议和POP3协议-C语言实现)
10 common website security attack means and defense methods
Technology is as important as business. It is wrong to favor either side
Use aspese slides to convert PPT to PDF
导师邀请你继续跟他读博,你会不会立马答应?
Reorganize common shell scripts for operation and maintenance frontline work
R language plot visualization: visualize the normalized histograms of multiple data sets, add density curve KDE to the histograms, set different histograms to use different bin sizes, and add edge whi
Flutter wechat sharing
Use aspese Cells convert Excel to PDF
3D mobile translate3d
On June 23, the video address of station B in the third episode of rust chat room