No directory found

Hey! First off, I hope I’m in the right discussion forum. If i’m not, please let me know! For the final assignment, when it has you creating directories in the cat-v-dog folder, I feel like I created them correctly, but the algorithm I created says they do not exist. Can someone please help me figure out what’s going on? Thanks in advance!

Hi, @Alexander_Dardick, and welcome to the community! :wave:

You are missing os.mkdir(base_dir) after the line containing base_dir = '/tmp/cats-v-dogs'. And this makes all of the consecutive os.mkdir calls to fail because the base_dir doesn’t exist.

The best way to diagnose that error would be to remove the try...except block and check if the dirs creation code produces any errors, or to try to output the contents of the /tmp dir.

I hope this helped you :slight_smile: Let me know if you have any more questions.

P.S.: I moved your questions to the right discussion forum.

1 Like

I very greatly appreciate it! That’s exactly what it was :slight_smile: thanks tons!

I get is a directory error please help me

You have to indicate the destination file, and not just the folder:

TRAINING + i

or

TESTING + i