sqlgoogle-app-enginegunicornreadonlyoperationalerror

OperationalError: Attempt to Write A ReadOnly Database on Google Cloud Application


Recently, I have been trying to deploy an interactive Google App Engine that writes to a SQLite database, which works fine when running the app locally, but when running it through the server, I receive the error:

OperationalError: attempt to write a readonly database

I tried changing the permissions on my .db, .sql but no luck.

Any advice would be greatly appreciated.


Solution

  • You can try changing permission of the directory and checking that .sqllite file exists and is writable

    But generally speaking is not a good idea to rely on disk data when working on app engine as disk storage is ephemeral (unless you are using persistent disks on flex) but even then its better to use a cloud database solution