Reputation: 115
Getting this error in my error logs when deploying my site
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(
Here are my Configurations:
Code: Source Code & Working Directory.jpeg
Wsgi Configurations: Wsgi config.jpeg
Virtual Environmet: Virtual env.jpeg
Static Files & Security: Static_Files & Security.jpeg
Settings.py: Settings 1.jpeg Settings 2.jpeg
Console: Console.jpeg
Upvotes: 0
Views: 144
Reputation: 5776
You have a module (in this case tracker) that appears in you python path in 2 different places. You can either change your python path so that the module only occurs in one location (in your case, you can either remove . from the python path, or /home/jpf911/COVID19-Vaccination-Tracker/COVID19-Vaccination-Tracker/vaccination_tracker/). Or you can add an AppConfig object to your project that tells Django which of those paths to use (search the Django docs for AppConfig for details)
Upvotes: 0