deep-learning-with-pytorch / dlwpt-code

Code for the book Deep Learning with PyTorch by Eli Stevens, Luca Antiga, and Thomas Viehmann.
https://www.manning.com/books/deep-learning-with-pytorch
4.68k stars 1.98k forks source link

p11: Error when loading .mhd file #20

Open emilearthur opened 4 years ago

emilearthur commented 4 years ago

Getting error below when running python -m p2ch11.training

RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:491: itk::ERROR: MetaImageIO(0x80234000): File cannot be read: /content/drive/My Drive/Data/Test/subset0/1.3.6.1.4.1.14519.5.2.1.6279.6001.317087518531899043292346860596.mhd for reading. Reason: No such file or directory

NB: Running on GoogleColab

elistevens commented 3 years ago

Besides the obvious "does that file exist" sanity check, perhaps the issue is that there's a space in the "My Drive" part of the path? I don't recall testing the library with spaces in the path.