You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "D:\Program Files\anaconda3\lib\site-packages\json_database\__init__.py", line 189, in add_item
if allow_duplicates or value not in self:
File "D:\Program Files\anaconda3\lib\site-packages\json_database\__init__.py", line 163, in __contains__
return item in self.db[self.name]
KeyError: 'aww_reddit'
The text was updated successfully, but these errors were encountered:
I'm just driving by, but do you exit that context between those snippets? If not, do you commit the database someplace?
As I understand it, when invoked with a context manager, the database should save itself on exit. It behaves much like sqlite3 in that regard. But if you stay in context, that automatic commit doesn't happen (also like sqlite3, come to think of it)
update after creation
@kevinelgan
The text was updated successfully, but these errors were encountered: