【发布时间】:2019-01-30 02:02:40
【问题描述】:
我为 Google App Engine 构建了一个应用程序,当我尝试运行该应用程序时,它运行良好。但是当我部署它时,它抛出了内部服务器 500 错误。当我检查错误报告时,它说“目录中没有名为cloud的模块”
下面是我的 requirements.txt
gunicorn==19.3.0
twilio==6.8.4
google-cloud-automl==0.1.1
google-cloud-storage==1.0.0
google-cloud==0.34.0
GoogleAppEngineCloudStorageClient==1.9.22.1
我的Yaml文件如下
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: .*
script: main.app
python文件中使用的导入是
from google.cloud import automl_v1beta1 as automl
from google.cloud import storage
当我手动运行时它起作用了。但部署后,错误是
ImportError: No module named cloud
<module> (/base/data/home/apps/..
提前谢谢你
【问题讨论】:
标签: python google-app-engine google-cloud-platform google-cloud-storage pypi