当前位置:网站首页>No such file or directory: ‘/tmp/tmpxxx/tmpxxx. py‘
No such file or directory: ‘/tmp/tmpxxx/tmpxxx. py‘
2022-07-02 17:58:00 【Coding leaves】
Running python During the procedure ,“No such file or directory” It's a common mistake . The common reason for this error is the lack of corresponding files in the path , Or lack of corresponding python library . The solution is mainly in :
(1) Add the missing file or directory under the path .
(2) Pass in the program sys.path.append Add the path where the file or directory is located .
(3) adopt pip Install the missing Library .
however , None of the above can solve the error mentioned in this article . We can see , The exact file prompted is tmp Under the folder , Note that this file is a temporary file . Temporary documents are generally python Operation is automatically generated and cleared . therefore , We can't find the corresponding file path , Because the file path is changeable at any time . Every time I run , Again tmp A folder with a random name is generated under the folder .
The detailed error prompt is as follows :
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/tmp/tmpn673osmy/tmph_33a_ku.py", line 26, in <module>
lib/python3.7/tempfile.py", line 444, in close
unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpn673osmy/tmph_33a_ku.py'
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/tmp/tmpn673osmy/tmph_33a_ku.py", line 26, in <module>
lib/python3.7/tempfile.py", line 444, in close
unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpn673osmy/tmph_33a_ku.py'Generally, a possible cause of this error is related python There is a syntax error in the file . In the mmclassification Take the file in as an example , In addition to prompting the error , It was also mentioned before the error message config.py file , And mistakes NameError: name 'dataset_type' is not defined. therefore , The problem is config.py Related documents , It doesn't have to be config.py Oneself .
stay mmclassification in ,config.py It is the file of the framework itself , There are no syntax errors . It was found that , The data configuration file defined by yourself is missing datase_type The definition of . After fixing the problem , The original tmp File missing errors have also been fixed .
More 3D 、 Please pay attention to two-dimensional perception algorithm and financial quantitative analysis algorithm “ Lele perception school ” WeChat official account , And will continue to update .
边栏推荐
- Design of the multi live architecture in different places of the king glory mall
- 1288_FreeRTOS中vTaskResume()接口以及中断安全版本接口实现分析
- Two pieces of nature a day! Duan Fengfeng, an alumnus of the University of science and technology of China, was the third Chinese winner of the belby medal
- Problems needing attention in the development and debugging of Yingguang single chip microcomputer
- [today in history] July 2: BitTorrent came out; The commercial system linspire was acquired; Sony deploys Playstation now
- MySQL进阶-事务及索引
- Yingguang pmc131 SOP16 16pin eight bit MCU
- 辉芒微IO单片机FT60F011A-RB
- USB interface powered Bluetooth color light strip controller
- PMS132B单片机TWS数码管蓝牙充电仓方案开发
猜你喜欢

wait_for_gap -- 从主库归档备库恢复归档

透过华为军团看科技之变(六):智慧公路

Modbus protocol communication exception

Linux中,mysql设置job任务自动启动

Daily question - inverted string

【Zuul】com. netflix. zuul. exception. ZuulException: Hystrix Readed time out

【Zuul】com.netflix.zuul.exception.ZuulException: Hystrix Readed time out

From a professional background, I can't get into a small company for interview

515. Find the maximum value in each tree row

Troubleshooting ideas that can solve 80% of faults
随机推荐
Huimang micro IO MCU ft60f010a-urt
MySQL --- 數據庫的基本操作
【曆史上的今天】7 月 2 日:BitTorrent 問世;商業系統 Linspire 被收購;索尼部署 PlayStation Now
Design of the multi live architecture in different places of the king glory mall
Solution pour arrêter automatiquement les paquets Jar en cours d'exécution en éteignant le serveur de connexion xshell
一日2篇Nature!中科大校友段镶锋团队纳米材料新成果,曾是贝尔比奖章第三位华人得主...
ASEMI整流桥UMB10F参数,UMB10F规格,UMB10F封装
Yingguang MCU development case
[nonlinear control theory]8_ Comparison of three robust controllers
PMS150C应广单片机开发案例
开发一个禁止删除namespace的控制器
Taiwan Feiling fm8pb513b MCU provides MCU program development product design
读写 XML/JSON/INI 和 UBJSON 等格式的数据文件的统一接口
Easyswoole3.2 restart failed
Development and application case of pms134 scheme of Yingguang single chip microcomputer with original packaging
MB10M-ASEMI整流桥MB10M
Pms132b single chip microcomputer TWS digital tube Bluetooth charging chamber program development
Daily question - "number of daffodils"
辉芒微IO单片机FT60F11F-MRB
嵌入式 ~ 介绍