Forums

There was an error loading your PythonAnywhere-hosted site. There may be a bug in your code. Error code: Unhandled Exception

.

2022-09-12 19:11:43,087: Error running WSGI application
2022-09-12 19:11:43,089: ModuleNotFoundError: No module named 'server'
2022-09-12 19:11:43,089:   File "/var/www/taterjohnson_pythonanywhere_com_wsgi.py", line 21, in <module>
2022-09-12 19:11:43,089:     from server import app as application  # noqa

This is what is in my wsgi.py file on Python Anywhere

# This file contains the WSGI configuration required to serve up your
# web application at http://<your-username>.pythonanywhere.com/
# It works by setting the variable 'application' to a WSGI handler of some
# description.
#
# The below has been auto-generated for your Flask project

import sys

# add your project directory to the sys.path
project_home = '/home/taterjohnson/mysite'
if project_home not in sys.path:
    sys.path = [project_home] + sys.path

# import flask app but need to call it "application" for WSGI to work
from app import app as application  # noqa

Did you reload your web app after changing the wsgi file?