.find() function does not work after a single use
See original GitHub issueDescribe the bug
When writing data to the JSON db, after the first write to the file, the .find()
method will return the record based on the ID. After adding a 2nd record and trying again, the IdNotFoundError
error is thrown despite the record being in the DB!
How to reproduce python 3.9.6
from pysondb import db
if __name__ == "__main__":
db = db.getDb("test.json")
while True:
id = db.add({"dev": "test"})
print(db.find(id))
Expected behavior The record should be returning as expected.
This is a neat library, great work!
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Python find function not working. What am I doing wrong?
First of, your code to read in the sequence and the motif could be improved by using splitlines() , which takes care of...
Read more >How to correct a #N/A error in the VLOOKUP function
Problem: The lookup value is not in the first column in the table_array argument · Consider using INDEX/MATCH instead · Problem: The exact...
Read more >Array.prototype.find() - JavaScript - MDN Web Docs - Mozilla
The find() method returns the first element in the provided array that satisfies the provided testing function.
Read more >6 Reasons Why Your VLOOKUP is Not Working - Ablebits
This article will look at the 6 most common reasons why your VLOOKUP is not working.
Read more >Top 10 Most Common C++ Mistakes That Developers Make
However, this was just the simplest example of this C++ problem. ... Never use auto_ptr as a function argument since this will lead...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That would be great, thanks!
Hi, is the issue still open? I can try to work on it!