部署我的站点时在错误日志中获取此错误
2021-04-23 16:20:38,663: Error running WSGI application
2021-04-23 16:20:38,676: django.core.exceptions.ImproperlyConfigured: The app module <module 'tracker' (namespace)> has multiple filesystem locations (['/home/jpf911/COVID19-Vaccination-Tracker/COVID19-Vaccination-Tracker/vaccination_tracker/tracker', './tracker']); you must configure this app with an AppConfig subclass with a 'path' class attribute.
2021-04-23 16:20:38,676: File "/var/www/jpf911_pythonanywhere_com_wsgi.py", line 14, in <module>
2021-04-23 16:20:38,677: application = get_wsgi_application()
2021-04-23 16:20:38,677:
2021-04-23 16:20:38,677: File "/home/jpf911/.virtualenvs/vaccinationvenv/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2021-04-23 16:20:38,677: django.setup(set_prefix=False)
2021-04-23 16:20:38,678:
2021-04-23 16:20:38,678: File "/home/jpf911/.virtualenvs/vaccinationvenv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2021-04-23 16:20:38,678: apps.populate(settings.INSTALLED_APPS)
2021-04-23 16:20:38,679:
2021-04-23 16:20:38,679: File "/home/jpf911/.virtualenvs/vaccinationvenv/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
2021-04-23 16:20:38,679: app_config = AppConfig.create(entry)
2021-04-23 16:20:38,679:
2021-04-23 16:20:38,679: File "/home/jpf911/.virtualenvs/vaccinationvenv/lib/python3.8/site-packages/django/apps/config.py", line 255, in create
2021-04-23 16:20:38,679: return app_config_class(app_name, app_module)
2021-04-23 16:20:38,679:
2021-04-23 16:20:38,679: File "/home/jpf911/.virtualenvs/vaccinationvenv/lib/python3.8/site-packages/django/apps/config.py", line 49, in __init__
2021-04-23 16:20:38,679: self.path = self._path_from_module(app_module)
2021-04-23 16:20:38,680:
2021-04-23 16:20:38,680: File "/home/jpf911/.virtualenvs/vaccinationvenv/lib/python3.8/site-packages/django/apps/config.py", line 88, in _path_from_module
2021-04-23 16:20:38,680: raise ImproperlyConfigured(
以下是我的配置:
代码:源代码&工作目录.jpeg
Wsgi配置:Wsgi config.jpeg
虚拟环境:Virtual env.jpeg
静态文件&安全性:Static_Files&Security.jpeg
Settings.py:设置1.jpeg设置2.jpeg
控制台:Console.jpeg
您有一个模块(在本例中为跟踪器(,它出现在您的python路径中的两个不同位置。您可以更改您的python路径,使模块只出现在一个位置(在您的情况下,您可以从python路径中删除.,或/home/jpf911/COVID19疫苗接种跟踪器/COVID19接种跟踪器/疫苗接种跟踪器/(。或者,你可以在你的项目中添加一个AppConfig对象,它告诉Django要使用哪条路径(在Django文档中搜索AppConfig以获取详细信息(