I have an azure function that take some files from storage account and write them inside the function , whene I run locally it works but whene I deply it shows this error
Result: Failure Exception: OSError: [Errno 30] Read-only file system
this coming from a code like this inside the function
with open("./path/Data.csv", "wb") as my_blob:
blob_data = data.download_blob()
blob_data.readinto(my_blob)
This is might be because of the path as it is read-only. Try using /tmp
folder instead. In your case you can use open("/tmp/Data.csv", "wb")
.
You can also refer to this similar thread.
REFERENCES: Temporary files