0
我想部署我的Django應用程序到heroku,但我不斷收到一個神祕的'ModuleNotFoundError:沒有模塊命名lukasSite' - lukasSite是我正在處理的網站的名稱。這也是我的項目文件夾和應用程序的名稱,儘管我還有其他一些名爲'community'的文件夾。Heroku Django應用程序無法啓動 - '沒有模塊命名的網站'
我不知道這個錯誤來自哪裏,但是當我嘗試運行heroku local web
並嘗試將我的網站部署到Heroku時,我得到了它。完整的錯誤如下:
[OKAY] Loaded ENV .env File as KEY=VALUE Format
21:33:09 web.1 | [2017-10-19 21:33:09 -0500] [18983] [INFO] Starting gunicorn 19.7.1
21:33:09 web.1 | [2017-10-19 21:33:09 -0500] [18983] [INFO] Listening at: http://0.0.0.0:5000 (18983)
21:33:09 web.1 | [2017-10-19 21:33:09 -0500] [18983] [INFO] Using worker: sync
21:33:09 web.1 | [2017-10-19 21:33:09 -0500] [18986] [INFO] Booting worker with pid: 18986
21:33:09 web.1 | [2017-10-20 02:33:09 +0000] [18986] [ERROR] Exception in worker process
21:33:09 web.1 | Traceback (most recent call last):
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
21:33:09 web.1 | worker.init_process()
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
21:33:09 web.1 | self.load_wsgi()
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
21:33:09 web.1 | self.wsgi = self.app.wsgi()
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
21:33:09 web.1 | self.callable = self.load()
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
21:33:09 web.1 | return self.load_wsgiapp()
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
21:33:09 web.1 | return util.import_app(self.app_uri)
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
21:33:09 web.1 | __import__(module)
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/community/community/wsgi.py", line 28, in <module>
21:33:09 web.1 | application = get_wsgi_application()
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
21:33:09 web.1 | django.setup(set_prefix=False)
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
21:33:09 web.1 | apps.populate(settings.INSTALLED_APPS)
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/django/apps/registry.py", line 85, in populate
21:33:09 web.1 | app_config = AppConfig.create(entry)
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/site-packages/django/apps/config.py", line 94, in create
21:33:09 web.1 | module = import_module(entry)
21:33:09 web.1 | File "/Users/lukasudstuen/softwareProjects/lukassite/env/lib/python3.6/importlib/__init__.py", line 126, in import_module
21:33:09 web.1 | return _bootstrap._gcd_import(name[level:], package, level)
21:33:09 web.1 | ModuleNotFoundError: No module named 'lukasSite'
21:33:09 web.1 | [2017-10-20 02:33:09 +0000] [18986] [INFO] Worker exiting (pid: 18986)
21:33:10 web.1 | [2017-10-19 21:33:10 -0500] [18983] [INFO] Shutting down: Master
21:33:10 web.1 | [2017-10-19 21:33:10 -0500] [18983] [INFO] Reason: Worker failed to boot.
21:33:10 web.1 Exited with exit code 3
事情我已經嘗試:
- 重命名的項目和文件夾,是相同的情況。 (我在Mac上本地工作,並部署到具有linux的Heroku)
- 將整個項目中的所有引用重命名爲小寫以及
- 查看我的文件以查看任何位置lukasSite已定義。 ..
- 淘Heroku'如何部署'的信息,以及論壇。
有沒有人有任何想法,我可以開始尋找?我完全不知道這是從哪裏來的。