Hi! I'm following the tutorial on how to back a flask app with a database. When including this line: from flask_sqlalchemy import SQLAlchemy in my python code, I reload and run the site which throws an Error code: Unhandled Exception. When I comment out this line, the site works! I checked the error logs last night and this morning. I've gotten two different errors (without having changed anything in the code since last night).
Last night the log read
Error running WSGI application
2018-07-27 18:24:29,653: ModuleNotFoundError: No module named 'flask_sqlalchemy'
2018-07-27 18:24:29,653: File "/var/www/tblunt_pythonanywhere_com_wsgi.py", line 111, in <module>
2018-07-27 18:24:29,653: from app import app as application # noqa
2018-07-27 18:24:29,654:
2018-07-27 18:24:29,654: File "./app/__init__.py", line 3, in <module>
2018-07-27 18:24:29,654: from flask_sqlalchemy import SQLAlchemy
Today the log reads:
Error running WSGI application
2018-06-16 02:46:26,303: ModuleNotFoundError: No module named 'btflaskwebapp'
2018-06-16 02:46:26,303: File "/var/www/tblunt_pythonanywhere_com_wsgi.py", line 111, in <module>
2018-06-16 02:46:26,303: from btflaskwebapp import app as application # noqa
flask_sqlalchemy is already installed in my virtual env, and btflaskwebapp exists and works fine without that line of code. I know I need to import this module to use the database, any help is greatly appreciated!
[edit by admin: formatting]