This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients cedricvanrompay, xtreak
Date 2018-11-12.13:25:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542029116.52.0.788709270274.issue35216@psf.upfronthosting.co.za>
In-reply-to
Content
Agreed this is confusing. Is this a Linux specific error? Trying this on Mac gives me a different error code and exception.

# Mac

$ ./python.exe
Python 3.8.0a0 (heads/master:cd449806fa, Nov 12 2018, 09:51:24)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.copy('/tmp/a.py', 'Lib12/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/shutil.py", line 385, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/shutil.py", line 240, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'Lib12/'

# Ubuntu 

./python
Python 3.8.0a0 (heads/master:dce345c51a, Nov 12 2018, 13:01:05)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.copy('/tmp/a.py', 'Lib12/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/karthi/cpython/Lib/shutil.py", line 386, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/home/karthi/cpython/Lib/shutil.py", line 241, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
IsADirectoryError: [Errno 21] Is a directory: 'Lib12/'
History
Date User Action Args
2018-11-12 13:25:16xtreaksetrecipients: + xtreak, cedricvanrompay
2018-11-12 13:25:16xtreaksetmessageid: <1542029116.52.0.788709270274.issue35216@psf.upfronthosting.co.za>
2018-11-12 13:25:16xtreaklinkissue35216 messages
2018-11-12 13:25:16xtreakcreate