Hi @Sampat, Varun ,
Thanks for the well written question. Firstly the error message your getting is because the file is still being used by the other process. Amend your script to remove the file after the other process is done with it. This can be done by putting it outside the the with
keyword.
container_client = blob_service_client.get_container_client(containerName)
with open(output_file_name, "rb") as data:
blob_client = container_client.upload_blob(name = output_file_name,
data=data)
if os.path.exists(output_file_name):
os.remove(output_file_name)
else:
pass
Now, it would be easier to simply remove the file from the Blob using Azure Storage Explorer since you had to have set that up as part of this exercise.