slices = [dicom.read_file(path + '/' + s) for s in os.listdir(path)] FileNotFoundError: [WinError 3] 系统找不到指定的路径。

最近跟着kaggle做一个医疗项目,加载路径总是出错。
将下面箭头处:

改为:
path = os.path.join(data_dir, patient)
问题迎刃而解
上面的路径拼接方法可能是ipython的,具体知道的朋友可以留言
slices = [dicom.read_file(path + '/' + s) for s in os.listdir(path)] FileNotFoundError: [WinError 3] 系统找不到指定的路径。的更多相关文章
- pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path && FileNotFoundError: [WinError 2] 系统找不到指定的文件。
C:\Users\k\Desktop\test>python test.py Traceback (most recent call last): File , in run_tesseract ...
- More than one file was found with OS independent path 'META-INF/LICENSE' | Error:Could not read \build\intermediates\typedefs.txt (系统找不到指定的文件。)
FAQ1: Error:Could not read E:\new\PlatformLibrary\CommonLibrary\build\intermediates\typedefs.txt: E: ...
- Python读写文件的路径,关于os.chdir(path)位置对程序的影响,
关于os.chdir(path)位置对程序的影响,import os import time#直接把path放到open()里面 def fu0(): star = time.time() for i ...
- 安装vmware-tools遇the path "" is not valid path to the gcc binary和the path "" is not a valid path to the 3.10.0-327.e17.x86_64 kernel headers问题解决
#./vmware-install.pl踩点: 1.the path "" is not valid path to the gcc binary 2.the path " ...
- More than one file was found with OS independent path 錯誤
More than one file was found with OS independent path 'lib/armeabi/libmrpoid.so',. 翻譯過來就是:在操作系統的獨立目錄 ...
- 第二十天 模块 sys os os下path settings random shuit
一.sys模块 1.sys.argv 命令行参数List,第一个元素是程序本身路径 2.sys.exit(n) 退出程序,正常退出时exit(0) 3.sys.version 获取Pythonn解释程 ...
- 安装vm tools时出现如下问题 The path "/usr/bin/gcc" is not valid path to the
sudo suapt-get updateapt-get dist-upgradeapt-get install open-vm-tools-desktop fusereboot https://bl ...
- Python os.path.dirname(__file__) 与 Python os.path.abspath(__file__) 与 os.system() 函数
Python os.path.dirname(__file__) 与 Python os.path.abspath(__file__) 的区别 os.path.abspath(__file__)返回 ...
- os.path.join合并 os.path.dirname返回上一级目录 os.path.exists(path) os.stat('path/filename')获取文件/目录信息
import os str1 = "grsdgfd" str2 = "wddf" str3 = "gddgs" # print(str1 + ...
随机推荐
- JS小时倒计时
let t1 = new Date("2019-11-26 15:51:00");// 从什么时间开始 let t2 = ));// 延迟几个小时 let interval = w ...
- 简单Kibana命令
1 查看健康状态 GET _cat/health?v epoch timestamp cluster status node.total node.data shards 1531290005 14: ...
- Phython-守护线程
import threading,time def run(n): print("task is ",n) time.sleep(2) print("task done& ...
- 并不对劲的复健训练-bzoj5249:loj2472:p4364[2018多省联考]IIIDX
题目大意 给出\(n,k,d_1,...,d_n\)(\(n\leq 5\times 10^5,1<k\leq 10^9,d\leq 10^9,k\in R\)).有一个满足 对于每个点\(i\ ...
- 【原创】大叔问题定位分享(33)oozie提交任务报错ArithmeticException: / by zero
oozie提交workflow后执行task报错: 2019-07-04 17:19:00,559 ERROR [RMCommunicator Allocator] org.apache.hadoop ...
- 【原创】Linux基础之重定向stdout/stderr
启动进程后查看日志(stdout和stderr) 1 nohup+tail # nohup $cmd > /path/to/file 2>&1 & # tail -f /p ...
- ubuntu14.04 x86编译upx 3.92 及so加固
的参考文章: http://www.cnblogs.com/fishou/p/4202061.html 1.download upx和所依赖的组件 upx3.:https://www.pysol.or ...
- shell、bash、terminal和kernel之间的关系
shell.bash.terminal和kernel之间的关系 本文是<鸟哥的Linux私房菜>的学习笔记 什么是kernel kernel的中文是"操作系统核心",主 ...
- VLC播放各种源
RTSP rtsp://admin:Shws1610@192.168.1.33:554/channel/01 UDP 播放推导本机上的udp流 : udp://@:1234 播放其他机器上的ud ...
- 帝国cms列表内容模板加上数字编号
/*这个[!--no.num--]指的是信息编号.每次增加1*/ <li data-eq="[!--no.num--]"> <div class="ti ...