As I said in the title, I think I may have borked by db and I want to factory reset it.
I’ve tried db.clear() and
for key in db:
del db[key]
But neither seem to fix the issue. I just want to make sure those would actually reset in the case of a broken db. I’m just getting an error in the console of my Flask app that is the name of the key in question, and nothing else. error:<key name>
I’m pretty sure it’s a borked-db issue because I rolled back the repo and I am getting the exact same error.
I found a thread from 2 years ago where people were saying that if you accidentally enter a special character into your db, that you can break it and it requires forking your repo to reset the db. I would hope that isn’t still an issue 2 years on. It’s possible something like this happened when I was trying to manually edit keys and values.
That did indeed reset the db, but it didn’t fix the problem I was encountering.
For the record, and I don’t know if this will help anyone, but my issue was that when I queried a key that didn’t exist, instead of the database returning None, it was raising an exception (unhandled). I just got an error that was the name of the key, but it wasn’t obvious to me what the problem was, because I thought that the key was being created if it didn’t already exist. Obviously that process was being short circuited.