C1_W3_Assignment BrATs Data can't be accessed

Even though the BraTs Data is available, my jupyter notebook isn’t able to access it and error pops up everytime i write the correct code and run the program, its the same message every single time ‘file missing or cannot be accessed’.

Hi @shashank_shukla3,

This error seems a bit weird, but let’s try few things to make it work.

1- Copy and paste the below line as is, just in case you have accidentally changed it:
image, label = load_case(DATA_DIR + “imagesTr/BRATS_003.nii.gz”, DATA_DIR + “labelsTr/BRATS_003.nii.gz”)

2- Restart the kernel / runtime

Hope this works.


Good Evening Sir,
Thank You Soo much for your response.
The issue doesn’t seem to be resolved yet, i did try the following 2 steps provided by you and yet it doesn’t seem to work.

Hi @shashank_shukla3,

I think the problem is in copying and pasting the character " in this parts: “imagesTr/BRATS_003.nii.gz” “labelsTr/BRATS_003.nii.gz”. Try typing it directly, the directory should appear in red like this:


I hope this works for you.

1 Like

Look for DATA_DIR variable. The complete path to the image should be:
You can verify the image path by going to: ‘File/Open…’

I’m sorry for the mistake because I may have explained it wrong. I meant that you should check the path of the image, it can not be opened because the browser does not allow the format in which the image is stored.

As I can see in the error above, you are trying to access the path ‘./BraTS-Data/imagesTr/BRATS_003.nii.gz’, but the correct one would be: ‘data/BraTS-Data/imagesTr/BRATS_003.nii.gz’.
Verify in the previous cell that your HOME_DIR and DATA_DIR variables are correct.

Hi @shashank_shukla3,

I have updated your workspace, everything runs fine now.

And while I took at a look at your notebook to make sure everything was running, I noticed the notebook you are using is not your own, and seems to be a previous version of the notebook. This is why the execution was failing, because some of the code has been changed over time.

I’m letting you off with a warning this time, but please know, it is DeepLearning.AI’s, as well as Coursera’s code of conduct to submit the work which is your own and not someone else’s. You probably got this version of the notebook somewhere from the internet.

Please be mindful of this the next time.



Hi @carlsaez,

You weren’t explaining it the wrong, the learner was using an older version of the notebook.


Perfect, thanks for everything @Mubsi !!