Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix (C1W2): Adding Check for Existing Directory Before Creation #101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iamyufan
Copy link

@iamyufan iamyufan commented Sep 1, 2023

This pull request addresses an issue found in the C1W2_Ungraded_Lab_Birds_Cats_Dogs.ipynb file located at course1/week2-ungraded-lab. The problem was related to the creation of a directory without checking whether it already exists. I have made the following change:

Original Code:

os.mkdir(base_birds_dir)

Modified Code:

if not os.path.exists(base_birds_dir):
    os.mkdir(base_birds_dir)

This change adds a condition to check if the directory exists before attempting to create it.

Thank you for considering this pull request. I look forward to your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant