当前位置:网站首页>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 .
边栏推荐
- PHP gets the number of days, hours, minutes and seconds between the two timestamps
- POJ - 1458 common subsequence (longest common subsequence)
- 智能水电表能耗监测云平台
- MySQL --- 数据库的基本概念
- 应广单片机开发流程需要注意哪些?
- Bluetooth technology | new working mode of wearable devices of the Internet of things, and Bluetooth ble helps the new working mode
- Development and application case of pms134 scheme of Yingguang single chip microcomputer with original packaging
- wait_for_gap -- 从主库归档备库恢复归档
- 台湾飞凌FM8PB513B单片机提供单片机方案开发 产品设计
- Larvel document reading notes custom authentication login and registration using larvel 8
猜你喜欢

Mysql - opérations de base de la base de données

ASEMI整流桥UMB10F参数,UMB10F规格,UMB10F封装

Outsourcing for five years, abandoned
![[nonlinear control theory]7_ High gain and High Frequency](/img/e5/6c5ca4a89c97d9613cddccb281b35b.png)
[nonlinear control theory]7_ High gain and High Frequency

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

USB interface powered Bluetooth color light strip controller

Deep understanding of ThreadLocal

WPS inserts a picture and displays it completely

Ora-19838 -- restore control files to the standby database
![[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
随机推荐
【Golang | gRPC】使用gRPC实现简单远程调用
Alibaba cloud sub account - Permission Policy - full control permission granted to an account and an OSS bucket
567. Arrangement in string
Songhan sn8p2511 sop8 single chip microcomputer can be used for burning, providing single chip microcomputer scheme development and single chip microcomputer decryption
Yingguang pmc131 SOP16 16pin eight bit MCU
科班出身,面试小公司都进不去
应广单片机开发案例
【Zuul】com. netflix. zuul. exception. ZuulException: Hystrix Readed time out
辉芒微IO单片机FT60F011A-RB
MySQL进阶-事务及索引
Outsourcing for five years, abandoned
MB10M-ASEMI整流桥MB10M
Wasserstein Slim GAIN with Clipping Penalty(WSGAIN-CP)介绍及代码实现——基于生成对抗网络的缺失数据填补
Pms132b single chip microcomputer TWS digital tube Bluetooth charging chamber program development
Editor编辑器扩展在Scene View添加按钮和logo
把xshell连接服务器关掉,运行的jar包就自动停止的解决方案
义隆EM78P153K DIP14单片机 MCU
977.有序数组的平方
松翰SN8P2511 SOP8单片机 可代烧录 提供单片机方案开发 单片机解密
easyAI笔记——机器学习