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

IsADirectoryError: [Errno 21] Is a directory: while copying a file #26

Open
compmonk opened this issue Mar 30, 2019 · 0 comments
Open

Comments

@compmonk
Copy link

When we need to copy a file to a directory and I use src.copy(dst) I get a IsADirectoryError: [Errno 21] Is a directory error from shutil.copyfile. This means I cannot do a simple operation of coping a file to another directory using the Path object, which can be done by using shutil.copy.

Why don't we use shutil.copy instead of shutil.copyfile so the basic copy operation too can be executed ?

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

No branches or pull requests

1 participant