flask-pymongo-example
flask-pymongo-example copied to clipboard
TypeError: cannot create weak reference to 'LocalProxy' object
Once I setup the venv and installed the requirements and start the program, I get this error when going trough the api page :
TypeError: cannot create weak reference to 'LocalProxy' object
I tried to change the line 34 in db.py as this :
with current_app.app_context():
db = LocalProxy(get_db)
But it doesn't solve the problem and still get this error :
RuntimeError: Working outside of application context.
Which means the app_context() function isn't even working.