pythonanywhere 上的 ModuleNotFoundError

ModuleNotFoundError on pythonanywhere

知道我应该在哪里寻找解决方案吗?我的 django 项目在 pythonanywhere 上运行良好。然后我向该项目添加了一个新应用程序,该应用程序在本地运行良好。但是,当我 git 将带有新应用程序的项目拉到 PythonAnywhere 时,出现以下错误:

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()

WSGI文件内容如下:

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()

问题出在未提交的文件上。提交所有文件解决了这个问题。