当前位置:网站首页>open file in 'w' mode: IOError: [Errno 2] No such file or directory
open file in 'w' mode: IOError: [Errno 2] No such file or directory
2022-07-03 02:51:00 【Zafo】
problem :
When I try to open a file in write mode with the following code: When I try to use the following code to write in When opening a file in mode :
packetFile = open("%s/%s/%s/%s.mol2" % ("dir", "dir2", "dir3", "some_file"), "w")Gives me the following error: Gave me the following error :
IOError: [Errno 2] No such file or directory: 'dir/dir2/dir3/some_file.mol2'The w mode should create the file if it doesn't exist, right? If the file doesn't exist , w The schema should create a file , Am I right? ?So how can this error ever occur? So how did this error happen ?
Solution :
Reference resources : https://stackoom.com/en/question/A4lw边栏推荐
- Summary of interview project technology stack
- C language beginner level - pointer explanation - paoding jieniu chapter
- Super easy to use logzero
- Unity3d human skin real time rendering real simulated human skin real time rendering "suggestions collection"
- From C to capable -- use the pointer as a function parameter to find out whether the string is a palindrome character
- Gbase 8C system table PG_ amproc
- I2C 子系统(二):I3C spec
- Interview stereotyped version
- Le processus de connexion mysql avec docker
- 2022-2028 global splicing display industry research and trend analysis report
猜你喜欢
![[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)](/img/e5/c01f760b07b495f5b048ea367e0c21.gif)
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)

Linear rectification function relu and its variants in deep learning activation function

Can netstat still play like this?

【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)

Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 2)

一文带你了解 ZigBee

A2L file parsing based on CAN bus (2)
![[fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)](/img/6a/ae44ddb090ce6373f04a550a15f973.jpg)
[fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)

xiaodi-笔记
![Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid](/img/32/25771baad1ed06c5a592087df748f1.jpg)
Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid
随机推荐
Deep reinforcement learning for intelligent transportation systems: a survey paper reading notes
Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 2)
Add automatic model generation function to hade
Gbase 8C function / stored procedure parameters (II)
Getting started | jetpack hilt dependency injection framework
JMeter performance test JDBC request (query database to obtain database data) use "suggestions collection"
2022-2028 global splicing display industry research and trend analysis report
[flutter] example of asynchronous programming code between future and futurebuilder (futurebuilder constructor setting | handling flutter Chinese garbled | complete code example)
【翻译】Flux安全。通过模糊处理获得更多信心
I2C 子系统(四):I2C debug
random shuffle注意
yii2 中andWhere多个or查询 orm条件
tensorflow转pytorch笔记;tf.gather_nd(x,y)转pytorch
疫情当头,作为Leader如何进行代码版本和需求开发管控?| 社区征文
Why choose a frame? What frame to choose
当lambda没有输入时,是何含义?
A2L file parsing based on CAN bus (2)
Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
[translation] flux is safe. Gain more confidence through fuzzy processing
[translation] the background project has joined the CNCF incubator