当前位置:网站首页>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 .
边栏推荐
猜你喜欢

Develop a controller that prohibits deleting namespaces

自定义一个loading指令

Asemi rectifier bridge umb10f parameters, umb10f specifications, umb10f package

Ssm+ wechat applet to realize property management system

finally详解

Modbus protocol communication exception

外包干了五年,废了...

Deep understanding of ThreadLocal

Alibaba cloud sub account - Permission Policy - full control permission granted to an account and an OSS bucket

PFC232-SOP8/14/16应广一级可带烧录程序编带
随机推荐
MySQL -- basic concept of database
USB interface powered Bluetooth color light strip controller
【Golang | gRPC】使用openssl生成证书
应广单片机003烧录器自定义封装使用技巧
Pfc232-sop8/14/16 should be wide-ranging and can be tape programmed with burning program
好评率计算
MySQL进阶-事务及索引
aloam 代码阅读与总结
开发一个禁止删除namespace的控制器
Mb10m-asemi rectifier bridge mb10m
原装应广单片机 MCU芯片PMS152 SOP8封装 单片机开发
Ora-19838 -- restore control files to the standby database
基数排序的简单理解
Development and application case of pms134 scheme of Yingguang single chip microcomputer with original packaging
[nonlinear control theory]8_ Comparison of three robust controllers
Larvel document reading notes custom authentication login and registration using larvel 8
Songhan sn8p2511 sop8 single chip microcomputer can be used for burning, providing single chip microcomputer scheme development and single chip microcomputer decryption
Viewing technological changes through Huawei Corps (VI): smart highway
What should we pay attention to in the development process of Yingguang single chip microcomputer?
MySQL -- basic operation of database