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 desbma
Recipients desbma, giampaolo.rodola
Date 2018-08-03.20:56:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533329798.72.0.56676864532.issue32073@psf.upfronthosting.co.za>
In-reply-to
Content
Traceback is not very useful in that case:

mkdir /tmp/a
touch /tmp/a/b 

python
Python 3.6.6 (default, Jun 27 2018, 13:11:40) 
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, shutil
>>> os.getcwd()
'/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1'
>>> shutil.copytree("/tmp/a", os.path.join(os.getcwd(), "test"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/desbma/py-venvs/main/lib/python3.6/shutil.py", line 359, in copytree
    raise Error(errors)
shutil.Error: [('/tmp/a/b', '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test/b', '[Errno 95] Operation not supported'), ('/tmp/a', '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test', '[Errno 95] Operation not supported')]
>>> shutil.copytree("/tmp/a", os.path.join(os.getcwd(), "test2"), copy_function=shutil.copy)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/desbma/py-venvs/main/lib/python3.6/shutil.py", line 359, in copytree
    raise Error(errors)
shutil.Error: [('/tmp/a/b', '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test2/b', "[Errno 95] Operation not supported: '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test2/b'"), ('/tmp/a', '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test2', '[Errno 95] Operation not supported')]

The exception is thrown from here https://github.com/python/cpython/blob/9bb6fe52742340f6c92f0dda18599a4577a94e18/Lib/shutil.py#L359
History
Date User Action Args
2018-08-03 20:56:38desbmasetrecipients: + desbma, giampaolo.rodola
2018-08-03 20:56:38desbmasetmessageid: <1533329798.72.0.56676864532.issue32073@psf.upfronthosting.co.za>
2018-08-03 20:56:38desbmalinkissue32073 messages
2018-08-03 20:56:38desbmacreate