当前位置:网站首页>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 .
边栏推荐
- Viewing technological changes through Huawei Corps (VI): smart highway
- 义隆EM78P153K DIP14单片机 MCU
- 嵌入式开发板 ~ 说明
- [comment le réseau se connecte] chapitre 6: demande d'accès au serveur et réponse au client (terminé)
- HDU - 1114 Piggy Bank (full backpack)
- USB interface powered Bluetooth color light strip controller
- freemarker+poi实现动态生成excel文件及解析excel文件
- Yingguang single chip microcomputer development specification pmc131 with AD chip to detect battery voltage single chip microcomputer sop8/14
- Yingguang single chip microcomputer (MCU popular science)
- Taiwan Feiling fm8pb513b MCU provides MCU program development product design
猜你喜欢
Easyswoole3.2 restart failed
WPS inserts a picture and displays it completely
Easyai notes - machine learning
MySQL --- 数据库的基本概念
Viewing technological changes through Huawei Corps (VI): smart highway
The price is only 40 yuan. Pico development board of raspberry pie is added with WiFi module, and it is out of stock as soon as it comes into the market
2 juillet: BitTorrent est sorti; L'acquisition du système commercial linspire; Sony Deployment PlayStation now
Virtual lab basic experiment tutorial -7 Polarization (1)
Virtual lab basic experiment tutorial -7 Polarization (2)
Redisson high performance redis distributed lock source code analysis
随机推荐
[target tracking] | data set summary
Wasserstein Slim GAIN with Clipping Penalty(WSGAIN-CP)介绍及代码实现——基于生成对抗网络的缺失数据填补
HDU - 1114 Piggy Bank (full backpack)
我的创作纪念日
My creation anniversary
毕业总结
2 juillet: BitTorrent est sorti; L'acquisition du système commercial linspire; Sony Deployment PlayStation now
【Golang | gRPC】使用gRPC实现简单远程调用
应广PMC131 SOP16 16pin八位单片机
[nonlinear control theory]7_ High gain and High Frequency
Edgenext hit a mixed punch: a lightweight architecture integrating CNN and transformer
【Zuul】com. netflix. zuul. exception. ZuulException: Hystrix Readed time out
透过华为军团看科技之变(六):智慧公路
aloam 代码阅读与总结
Solution pour arrêter automatiquement les paquets Jar en cours d'exécution en éteignant le serveur de connexion xshell
Yilong em78p153k dip14 MCU
智能水电表能耗监测云平台
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
应广单片机PMS150/PMC150/PMS150C消费类单片机
科班出身,面试小公司都进不去