0

I have the problem that I get a Name Error like NameError: name 'db' is not defined while using flask shell and accessing Modules and Classes
basically the same problem as in this question Flask Shell Commands not working
I have tried all the recommended solution but there did not solve the problem. After some testing, I found out that the flask shell command worked correctly on my first flask project I got no NameErrors there.
Only on my other flask projects which contains basically the same code, I get the Name Error. What could be the cause of that problem?

Devansh Soni
  • 771
  • 5
  • 16
Sator
  • 636
  • 4
  • 13
  • 34

1 Answers1

0

Problem is caused by the IDLE, when I have created a virtual env via Pycharm the problem occured, setting the virtualenv via commands solved the problem.

Sator
  • 636
  • 4
  • 13
  • 34