Hi,
I use the next code:
with NamedTemporaryFile(delete=False) as tmp:
wb.save(tmp.name)
tmp.seek(0)
return tmp.read()
Without the flag ‘delete=False’ it has worked before, but now I get the error message ‘permission denied’ with wb.save.
I had to add the flag ‘delete=False’ to make it work again.
I saw there is a difference between running in Windows versus Unix.
I develop now with VENV, and I think de app then runs on my laptop in Windows.
Is adding the flag a nice solution? The temp file isn’t deleted.
And does this work after publishing the app (runs in Unix?)?