Pathname Issue for a File in Desktop of my MacBook for a ML project

33 Views Asked by At

Hope everyone is doing well in these weird times. I can't seem to find the pathname to my file.

import os

IMG_PATH = /Users/darthvader/Desktop/archive

This is the error when I use it in Google Colab/jupyter notebook :(

FileNotFoundError: [Errno 2] No such file or directory: '/Users/darthvader/Desktop/archive'

I am using a MacBook Pro. The file is on my desktop. The main file (named archive, downloaded from Kaggle) has 3 smaller files within it: 1) brain_tumor_dataset, 2) no, 3) yes.

I have attached a picture of the main file showing it in my main desktop view as well as the files within it.

Main File

Smaller Files within the Main File

Thank you so much to whoever takes the time to help me with this

1

There are 1 best solutions below

0
avio8 On

If your path is correct for sure, then try putting quotes around this line

IMG_PATH = /Users/darthvader/Desktop/archive

and change it to

IMG_PATH = '/Users/darthvader/Desktop/archive'

And this is what you have already done, then a bit more clarification is required to solve your issue.