当前位置:网站首页>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 .
边栏推荐
- 阿里云子账户 - 权限策略 - 授权给某个账户某个 OSS Bucket 的完全控制权限
- 台风来袭,多景区暂时关闭,省文旅厅提醒注意安全!
- Ssm+ wechat applet to realize property management system
- MySQL --- 数据库的基本概念
- Experience Alibaba cloud character recognition OCR
- 应广单片机开发调试应注意的问题
- MySQL安装与配置
- Asemi rectifier bridge umb10f parameters, umb10f specifications, umb10f package
- 【历史上的今天】7 月 2 日:BitTorrent 问世;商业系统 Linspire 被收购;索尼部署 PlayStation Now
- PMS132B单片机TWS数码管蓝牙充电仓方案开发
猜你喜欢

EdgeNeXt打出了一套混合拳:集CNN与Transformer于一体的轻量级架构
![[today in history] July 2: BitTorrent came out; The commercial system linspire was acquired; Sony deploys Playstation now](/img/16/574eee53720fd609027950b9bf8154.png)
[today in history] July 2: BitTorrent came out; The commercial system linspire was acquired; Sony deploys Playstation now

Chapter 15 string localization and message Dictionary (1)

Pfc232-sop8/14/16 should be wide-ranging and can be tape programmed with burning program

MySQL -- basic operation of database

MySQL进阶-事务及索引

Finally detailed explanation

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

科班出身,面试小公司都进不去

智能水电表能耗监测云平台
随机推荐
应广单片机(MCU单片机科普)
王者荣耀商城异地多活架构设计
wait_for_gap -- 从主库归档备库恢复归档
松翰SN8P2511 SOP8单片机 可代烧录 提供单片机方案开发 单片机解密
使用Zadig从0到1搭建持续交付平台
Outsourcing for five years, abandoned
Huimang micro IO MCU ft60f011a-rb
原厂原装 应广单片机PMS134方案开发应用案例
切换变换的时候记得使用三元表达式
自定义一个loading指令
finally详解
【网络是怎么连接的】第四章 探索接入网和网络运营商
透过华为军团看科技之变(六):智慧公路
Development of original Yingguang MCU chip pms152 sop8 encapsulated MCU
Modbus协议通信异常
Mb10m-asemi rectifier bridge mb10m
读写 XML/JSON/INI 和 UBJSON 等格式的数据文件的统一接口
Are you holding back on the publicity of the salary system for it posts such as testing, development, operation and maintenance?
把xshell连接服务器关掉,运行的jar包就自动停止的解决方案
Modbus protocol communication exception