1

Using Python 2.7 and Django 1.10.4, I was trying to deploy my app to pythonanywhere, but I keep getting this error.

enter image description here

Error Log enter image description here

wsgi.py

import os
import sys

path = '/home/hellcracker/First-Blog'  
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 can't tell where the error is coming from.

Any help would be appreciated!

3
  • Is your code work in your local machine? Commented Jan 5, 2017 at 8:27
  • Please don't post screenshots of text. They are unreadable and ungoogleable. Please copy your error text and post it here. Commented Jan 5, 2017 at 9:25
  • @Windsooon yes sir .. working Commented Jan 5, 2017 at 10:59

2 Answers 2

2

First of all, check the link give in the error log - https://help.pythonanywhere.com/pages/DebuggingImportError/ You could also search for 'from django core wsgi no module named wsgi'. There are many answers already, and I think you should be able to find the answer to your problem there.

Sign up to request clarification or add additional context in comments.

Comments

1

Make sure that your project name is "mysite" if not update this line

os.environ['DJANGO_SETTINGS_MODULE'] = '<your-project-name>.settings'

Project name will be the directory name parent to your app name, see that in your local machine.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.