Forums

ImportError: No module named 'mysite'

Hi, I am following this tutorial Djangogirls HTML And when I go to my website from pythonanywhere ,I get the following error-"Something went wrong :worried: " .Error code: Unhandled Exception. Here is my error log. Pastebin error log My wsgi.py -

`import os
import sys

path = '/home/taufiqrx8>/my-first-blog'  # use your own PythonAnywhere username here
if path not in sys.path:
    sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

from django.core.wsgi import get_wsgi_application
from django.contrib.staticfiles.handlers import StaticFilesHandler
application = StaticFilesHandler(get_wsgi_application())`>

I think the most likely problem is the ">" just after your username in the path variable. Try removing that and reloading the web app.

Can you show me where exactly? Which file?

Oh yes found it and yeah that was the problem! Now it works.Thank you so much!

:)