我试图将我的Django应用程序部署到heroku,但我一直收到一个神秘的' ModuleNotFoundError:No Module命名为lukasSite' - lukasSite是我正在处理的网站的名称。它也是我的项目文件夹和应用程序的名称,虽然我有一些名为' community的其他文件夹。'
我无法判断此错误的来源,但是当我尝试运行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
我已经尝试过的事情:
有没有人对我在哪里开始寻找有任何想法?我完全不知道它来自何处。
答案 0 :(得分:1)
我有另一个包含我的Django项目文件夹的文件夹,该文件夹被我的项目推高了。原来文件夹结构必须与提供的示例Django项目结构相匹配。