【发布时间】:2017-03-27 20:04:01
【问题描述】:
我正在尝试在 Google Cloud App Engine 柔性环境中部署我的 Django 1.10 应用,但出现以下错误:
ImportError: No module named src
我正在关注官方教程,位于:https://cloud.google.com/python/django/flexible-environment
运行以下命令时出现错误:
gcloud app deploy
过了一会儿,控制台显示这个错误:
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
[1] [INFO] Starting gunicorn 19.7.1
[1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[1] [INFO] Using worker: sync
[9] [INFO] Booting worker with pid: 9
[9] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named src.settings
[9] [INFO] Worker exiting (pid: 9)
[1] [INFO] Shutting down: Master
[1] [INFO] Reason: Worker failed to boot.
这是我的 app.yaml 配置:
# [START runtime]
runtime: python
env: flex
entrypoint: gunicorn -b :$PORT core.wsgi
beta_settings:
cloud_sql_instances: nazkter-zed:us-central1:nazkter-zed
runtime_config:
python_version: 3
# [END runtime]
这是我的项目结构:
- core/
-- app.yaml
-- requeriments.txt
-- manage.py
-- core/
--- __init__.py
--- settings.py
--- wsgi.py
--- urls.py
-- app1/
--- __init__.py
--- admin.py
--- apps.py
--- models.py
--- views.py
--- urls.py
我整天都在围绕这个错误,我想知道是什么导致了它。
【问题讨论】:
标签: python django google-app-engine google-cloud-platform