当前位置:网站首页>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边栏推荐
- Check log4j problems using stain analysis
- I2C subsystem (II): I3C spec
- Use optimization | points that can be optimized in recyclerview
- 定了,就选它
- 【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
- Le processus de connexion mysql avec docker
- [shutter] banner carousel component (shutter_wiper plug-in | swiper component)
- 左连接,内连接
- 搭建私有云盘 cloudreve
- [shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
猜你喜欢
![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
![[translation] modern application load balancing with centralized control plane](/img/b0/22e9bf098d580b2af67255ddcdc0d5.jpg)
[translation] modern application load balancing with centralized control plane

迅雷chrome扩展插件造成服务器返回的数据js解析页面数据异常
![[principles of multithreading and high concurrency: 1_cpu multi-level cache model]](/img/c7/6b5ab4ff7379bfccff7cdbb358ff8f.jpg)
[principles of multithreading and high concurrency: 1_cpu multi-level cache model]

How to change the panet layer in yolov5 to bifpn
![[principles of multithreading and high concurrency: 1_cpu multi-level cache model]](/img/7e/ad9ea78868126b149bd9f15f587e6c.jpg)
[principles of multithreading and high concurrency: 1_cpu multi-level cache model]

定了,就选它
![[hcia]no.15 communication between VLANs](/img/59/a467c5920cbccb72040f39f719d701.jpg)
[hcia]no.15 communication between VLANs

Thunderbolt Chrome extension caused the data returned by the server JS parsing page data exception

你真的懂继电器吗?
随机推荐
一文带你了解 ZigBee
The difference between left value and right value in C language
What is the way out for children from poor families?
左连接,内连接
Deep reinforcement learning for intelligent transportation systems: a survey paper reading notes
Gbase 8C system table PG_ am
JMeter performance test JDBC request (query database to obtain database data) use "suggestions collection"
Getting started | jetpack hilt dependency injection framework
[translation] the background project has joined the CNCF incubator
Three.js本地环境搭建
Apple releases MacOS 11.6.4 update: mainly security fixes
Pytest (6) -fixture (Firmware)
MATLAB小技巧(24)RBF,GRNN,PNN-神经网络
Random shuffle note
Check log4j problems using stain analysis
Xiaodi notes
Informatics Olympiad one general question bank 1006 a+b questions
二维格式数组格式索引下标连续问题导致 返回json 格式问题
Use optimization | points that can be optimized in recyclerview
《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨