Error when loading database file
See original GitHub issueWhen using the example code in Python 3.8 i get this error :
Traceback (most recent call last):
File "C:/Users/loicn/backend_db.py", line 7, in <module>
db = connection.my_tiny_database
File "C:\Users\loicn\AppData\Local\Programs\Python\Python38\lib\site-packages\tinymongo\tinymongo.py", line 73, in __getattr__
return TinyMongoDatabase(name, self._foldername, self._storage)
File "C:\Users\loicn\AppData\Local\Programs\Python\Python38\lib\site-packages\tinymongo\tinymongo.py", line 73, in __getattr__
return TinyMongoDatabase(name, self._foldername, self._storage)
File "C:\Users\loicn\AppData\Local\Programs\Python\Python38\lib\site-packages\tinymongo\tinymongo.py", line 73, in __getattr__
return TinyMongoDatabase(name, self._foldername, self._storage)
[Previous line repeated 996 more times]
RecursionError: maximum recursion depth exceeded
Process finished with exit code 1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:11 (1 by maintainers)
Top Results From Across the Web
"An error occurred while opening the database file. ...
"An error occurred while opening the database file. The database may be corrupted or you may be out of hard disk space.
Read more >Access Database Error in Loading DLL – Easy Solutions
The error usually occurs due to missing, corrupted, or outdated Microsoft Data Access Components (MDAC) files. Some other reasons that may cause ...
Read more >Error in Access when opening a database on a network file ...
When opening a database on a network file share, or with links to another database on a network file share, you may receive...
Read more >5 Instant Fixes To Resolve Access 3045-“Couldn't Use Database
One of the most common reasons behind this MS Access “Could Not Use Database; File Already in Use” Error can also be the...
Read more >How To Fix The "Error Establishing a Database Connection ...
The first thing to do is check to ensure your database login credentials are correct. This is by far the most common reason...
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 Free
Top 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
I have used this extensively-- so I have a high level of confidence it works and will continue to work even if Schapman upgrades the code.
Make sure you are importing tinymongo and tinydb. In this case we are “overriding” the TinyMongoClient class property import to ensure we have the correct return. It might look a little awkward, but it achieves the same effect as Conner Boyle’s fork (Thank you David Lai for pointing this out)
######### code starts here import tinymongo as tm import tinydb class TinyMongoClient(tm.TinyMongoClient): @property def _storage(self): return tinydb.storages.JSONStorage ############ code ends here
ALTERNATELY… You could just work with the forked version from Conner Boyle’s github repository.
$ pip uninstall tinymongo $ pip install git+https://github.com/cjboyle/tinymongo
The only “gotcha” of doing it this way is that you cannot uninstall CJBoyle’s version with a “pip uninstall”, you have to remove it the old fashioned way of going into the environment packages and deleting the directory.
On Wed, Jun 17, 2020 at 2:59 PM Selwyn-Lloyd McPherson < notifications@github.com> wrote:
– Jeff Muday Instructional Technology Analyst Wake Forest University 1834 Wake Forest Rd. Winston Hall Rm. 27 Winston Salem, NC 27106 mudayja @ wfu . edu p 336.758.6171 f 336.758.6004
How would one support custom serialization such as the DateTimeSerializer provided with tinymongo using this work around? The suggested method of supporting datetime objects in tinymongo already overrides this property: