First time creating both a web application and hosting it via python anywhere. I'm lost how this error is popping up as my web app had no trouble previously accessing, reading, and writing new records into my SQLIte3 database on either DB Browser, Jupyter Notebook and via the web app using the development server on Visual Studio. The only change I've made to my code (after setting up WSGI Config as instructed in tutorial) was adding:
from os import path
ROOT = path.dirname(path.realpath(__file__))
db = sqlite3.connect(path.join(ROOT, "database.db"))
Below is what was recorded in error log:
2025-02-27 22:27:03,086: Exception on / [GET]
Traceback (most recent call last):
File "/home/ARI650/.virtualenvs/myvirtualenv/lib/python3.9/site-packages/flask/app.py", line 1511, in wsgi_app
response = self.full_dispatch_request()
File "/home/ARI650/.virtualenvs/myvirtualenv/lib/python3.9/site-packages/flask/app.py", line 919, in
full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/ARI650/.virtualenvs/myvirtualenv/lib/python3.9/site-packages/flask/app.py", line 917, in
full_dispatch_request
rv = self.dispatch_request()
File "/home/ARI650/.virtualenvs/myvirtualenv/lib/python3.9/site-packages/flask/app.py", line 902, in
dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/home/ARI650/mysite/ARI-PTO-App/ARI PTO App/ARI_PTO_App/views.py", line 14, in home
db.LoginDateCheck()
File "/home/ARI650/mysite/ARI-PTO-App/ARI PTO App/ARI_PTO_App/db.py", line 223, in LoginDateCheck
res = cur.execute(""" SELECT LoginDate FROM LoginDates ORDER BY ID DESC LIMIT 1 """)
sqlite3.DatabaseError: malformed database schema (AccountTypes) - near "STRICT": syntax error