2017-03-04 1 views
0

Trotz meiner besten Bemühungen in den letzten Wochen habe ich bei der Bereitstellung der WSGI-Datei auf Pythonanywhere stecken, während versucht wurde, ein Django-Framework einzurichten. Es gibt ähnliche Themen hier, aber keine konnte in meinem Fall übernommen werden.PythonAnywhere WSGI-Fehler

Ich folge this tutorial und ich erhalte die folgende Fehlermeldung:

2017-03-04 22:28:05,284 :Error running WSGI application 
2017-03-04 22:28:05,285 :ImportError: No module named 'mysite' 
2017-03-04 22:28:05,285 : File "/var/www/iamcsongor_pythonanywhere_com_wsgi.py", line 11, in <module> 
2017-03-04 22:28:05,285 : application = get_wsgi_application() 
2017-03-04 22:28:05,285 : 
2017-03-04 22:28:05,285 : File "/home/iamcsongor/my-first-blog/myvenv/lib/python3.5/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application 
2017-03-04 22:28:05,285 : django.setup(set_prefix=False) 
2017-03-04 22:28:05,285 : 
2017-03-04 22:28:05,285 : File "/home/iamcsongor/my-first-blog/myvenv/lib/python3.5/site-packages/django/__init__.py", line 22, in setup 
2017-03-04 22:28:05,286 : configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 
2017-03-04 22:28:05,286 : 
2017-03-04 22:28:05,286 : File "/home/iamcsongor/my-first-blog/myvenv/lib/python3.5/site-packages/django/conf/__init__.py", line 53, in __getattr__ 
2017-03-04 22:28:05,286 : self._setup(name) 
2017-03-04 22:28:05,286 : 
2017-03-04 22:28:05,286 : File "/home/iamcsongor/my-first-blog/myvenv/lib/python3.5/site-packages/django/conf/__init__.py", line 41, in _setup 
2017-03-04 22:28:05,287 : self._wrapped = Settings(settings_module) 
2017-03-04 22:28:05,287 : 
2017-03-04 22:28:05,287 : File "/home/iamcsongor/my-first-blog/myvenv/lib/python3.5/site-packages/django/conf/__init__.py", line 97, in __init__ 
2017-03-04 22:28:05,287 : mod = importlib.import_module(self.SETTINGS_MODULE) 

meine WSGI Datei Ist hier:

import os 

import sys 

path = '/home/iamcsongor/my-first-blog/firstweb' # 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()) 

ich ein paar screenshots of the code und Git Repo genommen haben, wenn Sie helfen könnten Ich wäre dankbar. Danke

+0

Sie haben nicht gesagt, was passiert, was schief läuft oder welche Fehler Sie sehen. –

+0

ugh ... guter Punkt! – Csongor

Antwort

1

Wie der Fehler sagt, ist Ihre DJANGO_SETTINGS_MODULE Umgebungsvariable auf "mysite" gesetzt, aber dieses Verzeichnis existiert nicht. Ihre Einstellungsdatei scheint tatsächlich in "firstweb" zu sein.

+0

Danke Daniel, es hat funktioniert! Ich musste auch das Arbeitsverzeichnis ändern ... so viele Dinge, die schief gehen können :) – Csongor

Verwandte Themen