sqlite3.DatabaseError: database disk image is malformed #200
-
My question is not about the error but about the package design. Should a user verify a database file before any usage of Maybe add a flag Here is a full traceback if you want to look at it:
Package version: 0.9.1 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
That's a good question. This isn't a case I've run into myself. Do you happen to know what can cause a malformed database? System crash during a write? Underlying filesystem/storage hardware issue? Cosmic rays? If this is something you expect might happen again, then I think it would be reasonable to add handling for this. A couple threads on StackOverflow indicate that a malformed db can sometimes be recovered using the sqlite3 CLI, so it might be worthwhile to keep it around and let the user deal with it (either delete or try to recover) instead of automatically deleting it. What would you think of something like this?
|
Beta Was this translation helpful? Give feedback.
Thanks. After 2 weeks since I created this discussion, I think that it is a user problem to handle a database state.
aiohttp-client-cache
maintainer(s) must not care about that.In my case most likely something happened with Kubernetes GitLab runner cache. This happens too rarely so I did not spend my time on downloading and analyzing a database file.