I made a small change to one file in my flask application, and now the site will not load. The error log reads like this:
2021-07-12 00:29:04,638: Error running WSGI application
2021-07-12 00:29:04,644: File "<fstring>", line 1
2021-07-12 00:29:04,644:
2021-07-12 00:29:04,645: (self.from)
2021-07-12 00:29:04,645:
2021-07-12 00:29:04,645: ^
2021-07-12 00:29:04,645:
2021-07-12 00:29:04,645: SyntaxError: invalid syntax
2021-07-12 00:29:04,645: File "/var/www/www_jonathanbech_tel_wsgi.py", line 21, in <module>
2021-07-12 00:29:04,646: from app import app as application # noqa
2021-07-12 00:29:04,646:
2021-07-12 00:29:04,646: File "/home/jonathanbechtel/personalwebsite/app.py", line 10, in <module>
2021-07-12 00:29:04,646: from utilities import webinar_prepper, message, adjust_time
I'm not sure what changed to cause this to happen.
My wsgi file reads like this:
import sys
project_home = '/home/jonathanbechtel/personalwebsite'
if project_home not in sys.path:
sys.path = [project_home] + sys.path
import os
from dotenv import load_dotenv
project_folder = os.path.expanduser('~/personalwebsite')
load_dotenv(os.path.join(project_folder, '.env'))
from app import app as application # noqa
The only thing I notice that is strange is that the one file I modified, utilities.py
, now has a syntax error on the very first line when I run import os
.
I am going to guess this has something to do with it, but am honestly not sure what's causing it. Any help is appreciated, thank you.