Any idea where I should look for a solution? My django project worked fine on pythonanywhere. I then added a new app to the project, which worked fine locally. However, when I git pulled the project with the new app to PythonAnywhere, I got the following error:
2018-10-18 23:38:56,622: Error running WSGI application
2018-10-18 23:38:56,637: ModuleNotFoundError: No module named 'catalog.apps'
2018-10-18 23:38:56,637: File "/var/www/aceh40_pythonanywhere_com_wsgi.py", line 21, in <module>
2018-10-18 23:38:56,637: application = get_wsgi_application()
Here is the content of the WSGI file:
settings_path = '/home/aceh40/aceh40.pythonanywhere.com/aceh40'
sys.path.insert(0, settings_path)
dotenv_path = os.path.expanduser('~/aceh40.pythonanywhere.com') # adjust as appropriate
load_dotenv(os.path.join(dotenv_path, '.env'))
# Set environment variable to tell django where your settings.py is
os.environ['DJANGO_SETTINGS_MODULE'] = 'aceh40.settings'
# Set the 'application' variable to the Django wsgi app
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
The problem was with uncommitted files. Committing all files fixed the issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.