flask-pymongo-example icon indicating copy to clipboard operation
flask-pymongo-example copied to clipboard

TypeError: cannot create weak reference to 'LocalProxy' object

Open DarkRedman opened this issue 7 months ago • 0 comments

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.

DarkRedman avatar Mar 15 '25 13:03 DarkRedman