python - 无法将 twilio-python 库添加到 Google App Engine 项目

标签 python google-app-engine twilio

嗨,我一直在尝试将 twilio-python 库添加到谷歌应用程序引擎项目中。按照建议,我按照以下链接中的步骤操作:http://twilio-python.readthedocs.org/en/latest/appengine.html .

但是,我遇到了一些我有点无能为力的错误消息。我提供了我的应用程序引擎启动器的日志

请看看并让我知道我做错了什么。

这是日志消息:

*** Running dev_appserver with the following flags:
    --skip_sdk_update_check=yes --port=12081 --admin_port=8005
Python command: /usr/bin/python2.7
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py", line 83, in <module>
    _run_file(__file__, globals())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py", line 79, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1040, in <module>
    main()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1033, in main
    dev_server.start(options)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 758, in start
    options.config_paths, options.app_id)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 831, in __init__
    module_configuration = ModuleConfiguration(config_path, app_id)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 127, in __init__
    self._config_path)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 424, in _parse_configuration
    config, files = appinfo_includes.ParseAndReturnIncludePaths(f)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/appinfo_includes.py", line 82, in ParseAndReturnIncludePaths
    appyaml = appinfo.LoadSingleAppInfo(appinfo_file)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/appinfo.py", line 2214, in LoadSingleAppInfo
    raise appinfo_errors.EmptyConfigurationFile()
google.appengine.api.appinfo_errors.EmptyConfigurationFile

最佳答案

App Engine 尝试加载一个空配置文件,即您的 app.yaml 文件。因此它会引发 EmptyConfigurationFile 错误。应用引擎需要了解一些基本配置参数才能开始为您的应用提供服务,无论它多么基本。

以下是为您的示例构建的基本 app.yaml 配置文件:

application: twilio-demo
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: .*
  script: helloworld.app

您可以在 Configuring with app.yaml 上阅读更多内容

关于python - 无法将 twilio-python 库添加到 Google App Engine 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34735945/

相关文章:

python - 带有条件函数 When (?) 的 Django 查询

python - pyspark如何与java集成?

mysql - 用于持久保存 Google App Engine 上的 GWT 项目的外部 MySQL 数据库

python - Twilio/Django 未收到回复短信

ios - 除了 Twilio 提供的教程之外,还有什么好的 Twilio iOS VOIP Client 教程吗?

python - sklearn countvectorizer中的fit_transform和transform有什么区别?

python - 使用 sum(if...) 或条件语句操作两个数据集,这些语句与 Hive Hadoop Python 没有共同的标识符

google-app-engine - 在 AppEngine 上使用 Go 连接到第二代 Google SQL Cloud

python - Python 中的 Google App Engine 文件夹 url

twilio - 当客服人员将调用者置于等待状态时,如何更改音乐?