Kann nicht auf Heroku in DjangoGirls Tutorial

Ich folge diesem DjangoGirls Tutorial: http://tutorial.djangogirls.org/de/deploy/README.html

Wenn ich versuche, meine App / Admin-Seite zu öffnen, da das Tutorial heißt:

"Da wir nur die Admin-Ansicht für die App so weit erstellt haben, füge admin / zur URL hinzu (zB https://djangogirlsblog.herokuapp.com/admin/ ), um eine Arbeitsseite unserer Web-App zu sehen."

Ich bekomme noch die folgende Browser-Nachricht:

Anwendungsfehler In der Anwendung ist ein Fehler aufgetreten und Ihre Seite konnte nicht bedient werden. Versuche es noch einmal in ein paar Momenten.

Wenn Sie der Antragseigentümer sind, überprüfen Sie Ihre Protokolle für Details.

Das ist mein Projektlayout:

djangogirls |--mysite/ |--blog/ |--db.sqlite3 |----manage.py |----mysite/ |--myvenv/ |--Procfile |--requirements.txt |--runtime.txt |--.gitignore 

Dies sind die Inhalte von .gitignore:

 myvenv __pycache__ staticfiles local_settings.py db.sqlite3 *.py[co] *.pyc 

Das sind die Inhalte meiner mysite / wsgi.py

 import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") application = get_wsgi_application() from whitenoise.django import DjangoWhiteNoise application = DjangoWhiteNoise(application) 

Das sind die Inhalte von Procfile

web: gunicorn djangogirls.wsgi

Das Tutorial sagt uns, dass ich mysite.wsgi herauskopiere, aber ich sah in einem anderen Beitrag, dass es das Projekt_name.wsgi sein sollte, also habe ich das geändert.

Runtime.txt: python-2.7.6

Requirements.txt:

 dj-database-url==0.3.0 Django==1.8 gunicorn==19.3.0 whitenoise==1.0.6 psycopg2==2.5.4 

Ich weiß, das ist ein langer Posten und ich entschuldige mich dafür im Voraus, ich möchte mehr Informationen liefern als nicht genug, und ich verstehe nicht ganz, was sind die wichtigen Dinge, die ich in dieser Situation sehen sollte!

Das ist mein Heroku-Protokoll:

 2015-04-07T02:30:18.990628+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 189, in run 2015-04-07T02:30:18.990685+00:00 app[web.1]: super(Application, self).run() 2015-04-07T02:30:18.990710+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run 2015-04-07T02:30:18.990746+00:00 app[web.1]: Arbiter(self).run() 2015-04-07T02:30:18.990823+00:00 app[web.1]: self.manage_workers() 2015-04-07T02:30:19.728739+00:00 heroku[web.1]: Process exited with status 1 2015-04-07T02:30:19.750144+00:00 heroku[web.1]: State changed from starting to crashed 2015-04-07T02:30:19.750381+00:00 heroku[web.1]: State changed from crashed to starting 2015-04-07T02:30:22.860260+00:00 heroku[web.1]: Starting process with command `gunicorn djangogirls.wsgi` 2015-04-07T02:30:24.130180+00:00 app[web.1]: [2015-04-07 02:30:24 +0000] [3] [INFO] Listening at: http://0.0.0.0:24389 (3) 2015-04-07T02:30:24.137056+00:00 app[web.1]: [2015-04-07 02:30:24 +0000] [9] [INFO] Booting worker with pid: 9 2015-04-07T02:30:24.170773+00:00 app[web.1]: Traceback (most recent call last): 2015-04-07T02:30:24.170770+00:00 app[web.1]: [2015-04-07 02:30:24 +0000] [10] [ERROR] Exception in worker process: 2015-04-07T02:30:24.170775+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker 2015-04-07T02:30:24.170777+00:00 app[web.1]: worker.init_process() 2015-04-07T02:30:24.130312+00:00 app[web.1]: [2015-04-07 02:30:24 +0000] [3] [INFO] Using worker: sync 2015-04-07T02:30:24.170780+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2015-04-07T02:30:24.170778+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 118, in init_process 2015-04-07T02:30:24.170791+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app 2015-04-07T02:30:24.170792+00:00 app[web.1]: __import__(module) 2015-04-07T02:30:24.170783+00:00 app[web.1]: self.callable = self.load() 2015-04-07T02:30:24.170784+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load 2015-04-07T02:30:24.170786+00:00 app[web.1]: return self.load_wsgiapp() 2015-04-07T02:30:24.170798+00:00 app[web.1]: worker.init_process() 2015-04-07T02:30:24.170793+00:00 app[web.1]: ImportError: No module named djangogirls.wsgi 2015-04-07T02:30:24.170795+00:00 app[web.1]: Traceback (most recent call last): 2015-04-07T02:30:24.170796+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker 2015-04-07T02:30:24.170788+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp 2015-04-07T02:30:24.170789+00:00 app[web.1]: return util.import_app(self.app_uri) 2015-04-07T02:30:24.170806+00:00 app[web.1]: return self.load_wsgiapp() 2015-04-07T02:30:24.170807+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp 2015-04-07T02:30:24.170808+00:00 app[web.1]: return util.import_app(self.app_uri) 2015-04-07T02:30:24.170799+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 118, in init_process 2015-04-07T02:30:24.170811+00:00 app[web.1]: __import__(module) 2015-04-07T02:30:24.170802+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 2015-04-07T02:30:24.170803+00:00 app[web.1]: self.callable = self.load() 2015-04-07T02:30:24.170804+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load 2015-04-07T02:30:24.170800+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2015-04-07T02:30:24.170781+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 2015-04-07T02:30:24.176154+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 189, in run 2015-04-07T02:30:24.176159+00:00 app[web.1]: Arbiter(self).run() 2015-04-07T02:30:24.176144+00:00 app[web.1]: Traceback (most recent call last): 2015-04-07T02:30:24.176162+00:00 app[web.1]: self.manage_workers() 2015-04-07T02:30:24.176151+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run 2015-04-07T02:30:24.176168+00:00 app[web.1]: time.sleep(0.1 * random.random()) 2015-04-07T02:30:24.176153+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() 2015-04-07T02:30:24.176156+00:00 app[web.1]: super(Application, self).run() 2015-04-07T02:30:24.170877+00:00 app[web.1]: [2015-04-07 02:30:24 +0000] [10] [INFO] Worker exiting (pid: 10) 2015-04-07T02:30:24.176163+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 477, in manage_workers 2015-04-07T02:30:24.176148+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module> 2015-04-07T02:30:24.176165+00:00 app[web.1]: self.spawn_workers() 2015-04-07T02:30:24.176149+00:00 app[web.1]: sys.exit(run()) 2015-04-07T02:30:24.176166+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 541, in spawn_workers 2015-04-07T02:30:24.170813+00:00 app[web.1]: ImportError: No module named djangogirls.wsgi 2015-04-07T02:30:24.176161+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 174, in run 2015-04-07T02:30:24.178515+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3> 2015-04-07T02:30:24.170810+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app 2015-04-07T02:30:24.176158+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run 2015-04-07T02:30:24.178505+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR) 2015-04-07T02:30:24.141236+00:00 app[web.1]: self.callable = self.load() 2015-04-07T02:30:24.176170+00:00 app[web.1]: self.reap_workers() 2015-04-07T02:30:24.176169+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 214, in handle_chld 2015-04-07T02:30:24.176172+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 459, in reap_workers 2015-04-07T02:30:24.141232+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2015-04-07T02:30:24.141237+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load 2015-04-07T02:30:24.141239+00:00 app[web.1]: return self.load_wsgiapp() 2015-04-07T02:30:24.141254+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2015-04-07T02:30:24.141229+00:00 app[web.1]: worker.init_process() 2015-04-07T02:30:24.129374+00:00 app[web.1]: [2015-04-07 02:30:24 +0000] [3] [INFO] Starting gunicorn 19.3.0 2015-04-07T02:30:24.141223+00:00 app[web.1]: [2015-04-07 02:30:24 +0000] [9] [ERROR] Exception in worker process: 2015-04-07T02:30:24.141231+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 118, in init_process 2015-04-07T02:30:24.141246+00:00 app[web.1]: ImportError: No module named djangogirls.wsgi 2015-04-07T02:30:24.141228+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker 2015-04-07T02:30:24.141248+00:00 app[web.1]: Traceback (most recent call last): 2015-04-07T02:30:24.141226+00:00 app[web.1]: Traceback (most recent call last): 2015-04-07T02:30:24.141251+00:00 app[web.1]: worker.init_process() 2015-04-07T02:30:24.141234+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 2015-04-07T02:30:24.141252+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 118, in init_process 2015-04-07T02:30:24.141240+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp 2015-04-07T02:30:24.141249+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker 2015-04-07T02:30:24.141242+00:00 app[web.1]: return util.import_app(self.app_uri) 2015-04-07T02:30:24.141243+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app 2015-04-07T02:30:24.141244+00:00 app[web.1]: __import__(module) 2015-04-07T02:30:24.141262+00:00 app[web.1]: return util.import_app(self.app_uri) 2015-04-07T02:30:24.141256+00:00 app[web.1]: self.callable = self.load() 2015-04-07T02:30:24.141259+00:00 app[web.1]: return self.load_wsgiapp() 2015-04-07T02:30:24.141263+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app 2015-04-07T02:30:24.141255+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 2015-04-07T02:30:24.141258+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load 2015-04-07T02:30:24.141260+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp 2015-04-07T02:30:24.166744+00:00 app[web.1]: [2015-04-07 02:30:24 +0000] [10] [INFO] Booting worker with pid: 10 2015-04-07T02:30:24.141264+00:00 app[web.1]: __import__(module) 2015-04-07T02:30:24.141266+00:00 app[web.1]: ImportError: No module named djangogirls.wsgi 2015-04-07T02:30:24.141324+00:00 app[web.1]: [2015-04-07 02:30:24 +0000] [9] [INFO] Worker exiting (pid: 9) 2015-04-07T02:30:24.956327+00:00 heroku[web.1]: State changed from starting to crashed 2015-04-07T02:30:24.942505+00:00 heroku[web.1]: Process exited with status 1 2015-04-07T02:30:39.168025+00:00 heroku[api]: Scale to web=1 by paulzovighian@gmail.com 2015-04-07T02:30:45.176867+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=jtestblog.herokuapp.com request_id=457b2a51-1fc2-4f83-8316-c8fb0635c97b fwd="67.70.37.25" dyno= connect= service= status=503 bytes= 2015-04-07T02:30:48.582173+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=jtestblog.herokuapp.com request_id=137c668e-8d93-4c14-b98d-d1737adabf97 fwd="67.70.37.25" dyno= connect= service= status=503 bytes= 2015-04-07T02:30:48.976617+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/admin/" host=jtestblog.herokuapp.com request_id=8ad477b3-4348-4a90-b7bf-53791d7c5e02 fwd="67.70.37.25" dyno= connect= service= status=503 bytes= 2015-04-07T02:30:54.502759+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/admin/" host=jtestblog.herokuapp.com request_id=c074764e-4ac9-4205-8762-8073bf3cd7d6 fwd="67.70.37.25" dyno= connect= service= status=503 bytes= 

Es scheint, dass dies eine der härteren Stufen des Tutorials ist, und ich kann einfach nicht herausfinden, was dieser Fehler genau bedeutet … Vielen Dank im voraus an jeden, der helfen kann, ich schätze es wirklich!

    2 Solutions collect form web for “Kann nicht auf Heroku in DjangoGirls Tutorial”

    Wenn du den Ordner innerhalb der Wurzel projizierst, dann musst du genaue Pfade geben, so gunicorn wird Server besser .. 🙂

    Wie web: gunicorn --pythonpath app app.wsgi

    Für mehr Info pythonpath

    Das Problem ist in deinem Procfile. Die Anweisungen sagen zu tun:

     web: gunicorn mysite.wsgi 

    Aber du hast "djangogirls" statt "mysite" gesetzt. Wie Sie in den Kommentaren erklärt haben, wird Ihr Projekt eigentlich "mysite" genannt, und "djangogirls" ist einfach der Name des enthaltenen Ordners.

    Python ist die beste Programmiersprache der Welt.