Closed logachev closed 5 years ago
Blob (possibly others if they have create_x_from_path() API)
create_x_from_path()
pip freeze
latest Windows OS
BlockBlobService.create_blob_from_path() fails with Permissions denied on Windows when publishing file, created by tempfile library.
Permissions denied
tempfile
Please see this thread: https://stackoverflow.com/questions/15169101/how-to-create-a-temporary-file-that-can-be-read-by-a-subprocess
def temp_opener(name, flag, mode=0o777): return os.open(name, flag | os.O_TEMPORARY, mode) with open(f.name, "rb", opener=temp_opener) as f:
instead of
with open(f.name, "rb") as f:
Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.
Hi @logachev, thanks for reaching out!
Feel free to implement your own version of create_x_from_path and invoke create_x_from_stream subsequently.
Which service(blob, file, queue) does this issue concern?
Blob (possibly others if they have
create_x_from_path()
API)Which version of the SDK was used? Please provide the output of
pip freeze
.latest Windows OS
What problem was encountered?
BlockBlobService.create_blob_from_path() fails with
Permissions denied
on Windows when publishing file, created bytempfile
library.Have you found a mitigation/solution?
Please see this thread: https://stackoverflow.com/questions/15169101/how-to-create-a-temporary-file-that-can-be-read-by-a-subprocess
instead of
Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.