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

最近跟着kaggle做一个医疗项目,加载路径总是出错。

将下面箭头处:

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

改为:

path = os.path.join(data_dir, patient)
问题迎刃而解
上面的路径拼接方法可能是ipython的,具体知道的朋友可以留言

 

相关文章:

  • 2021-08-27
  • 2022-12-23
  • 2021-04-12
  • 2021-07-19
  • 2021-05-15
  • 2021-06-24
  • 2022-02-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-06
  • 2021-05-19
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案