I am trying to attach this fileX to an email using a python-based cloud-function. The code runs fine on localhost while it gives this error when I deploy the cloud-function: [Errno 30] Read-only file system: 'fileX.xlsx'
Have tried writing to the /tmp directory in google cloud storage, but to no resolve.
df_en.to_excel(writer, sheet_name='en')
df_hi.to_excel(writer, sheet_name='hi')
writer.save()
filename = "fileX.xlsx"
attachment = open("/tmp/fileX.xlsx", "r+b")