This is the error message I get:
Error running WSGI application
sqlite3.OperationalError: unable to open database file
File "/var/www/missile720_pythonanywhere_com_wsgi.py", line 16, in <module>
from genshin import app as application # noqa
File "/home/missile720/mysite/genshin.py", line 20, in <module>
conn = sqlite3.connect(SQLALCHEMY_DATABASE_URI,check_same_thread=False)
My code:
genshin.py
SQLALCHEMY_DATABASE_URI = "mysql+mysqlconnector://missile720:genshinimpact@missile720.mysql.pythonanywhere-services.com/missile720$genshindata".format(
username="the username from the 'Databases' tab",
password="the password you set on the 'Databases' tab",
hostname="the database host address from the 'Databases' tab",
databasename="the database name you chose, probably yourusername$comments",
)
conn = sqlite3.connect(SQLALCHEMY_DATABASE_URI,check_same_thread=False)
app.config["SQLALCHEMY_DATABASE_URI"] = SQLALCHEMY_DATABASE_URI
app.config["SQLALCHEMY_POOL_RECYCLE"] = 299
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
app.config['SECRET_KEY'] = "thisissecret"
wsgi.py
import sys
path = '/home/missile720/mysite'
if path not in sys.path:
sys.path.insert(0, path)
from genshin import app as application # noqa