Open HossainEshan opened 2 weeks ago
I wasn't able to fix the issue. For now when using flask shell
please manually import modules
import sqlalchemy as sa import sqlalchemy.orm as so from app import app, db from app.models import User, Post, Comment
Just pushed a commit which just installed the modules with pip inside of virtual environment instead of using flask shell. Tell me if it's fixed and if so we can close the issue.
I cloned the latest commit and tested. The issue is still there. I have attached a screenshot to show what exactly is going on. For reasons unknown, the shell seems to import everything but sa
and so
even though the flask shell context (in app.py) dictionary defines these libraries.
In my branch, the flask shell is not properly importing modules. I will move back a few commits and try to fix this issue.