Skip to content

MedNIST tutorial NotADirectoryError #302

Description

@lyshc

Describe the bug

NotADirectoryError: [Errno 20] Not a directory: './MedNIST/README.md'
The error is in this tutorial: https://github.com/Project-MONAI/MONAI/blob/master/examples/notebooks/mednist_tutorial.ipynb

To Reproduce

Steps to reproduce the behavior:

  1. Go to the mednist_tutorial.ipynb and run code blocks 1-4. Error is for this line in block 4:
imageFiles = [[os.path.join(dataDir, classNames[i], x) for x in os.listdir(os.path.join(dataDir, classNames[i]))]
              for i in range(numClass)]

Environment (please complete the following information):

  • OS: Linux version 4.19.104+ (using Google Colab)
  • Python version: 3.6.9
  • MONAI version [e.g. git commit hash]: 0.1.0

Additional context

Managed to fix error with replacing classNames variable also in block 4 with the following:
classNames = sorted([x for x in os.listdir(data_dir) if os.path.isdir(os.path.join(data_dir, x))])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions