python - Google AppEngine 端点错误 : Fetching service config failed (status code 404)

标签 python google-app-engine

我正在执行 Quickstart 中的步骤.

我确实注意到了 another question对此。 我仔细检查了 app.yaml 中的 env_variables 部分是否具有正确的 ENDPOINTS_SERVICE_NAMEENDPOINTS_SERVICE_VERSION 值。

../_ah/api/explorer 未在“服务”下显示任何端点。

这是什么错误以及如何修复它?

错误日志显示:

 (/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py:263)
Traceback (most recent call last):
  File "/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/main.py", line 103, in <module>
    api = endpoints.api_server([EchoApi])
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/endpoints/apiserving.py", line 520, in api_server
    controller)
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/control/wsgi.py", line 121, in add_all
    a_service = loader.load()
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/control/service.py", line 110, in load
    return self._load_func(**kw)
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/config/service_config.py", line 78, in fetch_service_config
    _log_and_raise(Exception, message_template.format(status_code))
  File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/config/service_config.py", line 126, in _log_and_raise
    raise exception_class(message)
Exception: Fetching service config failed (status code 404)

最佳答案

我有相同的异常跟踪,除了我的是 403。希望对其他有同样挫败感的人有帮助。

异常:获取服务配置失败(状态代码 403)

我终于发现在我的 app.yaml 中它有来自 GIT 克隆的这个

ENDPOINTS_SERVICE_NAME:echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog

快速入门只指示我替换 YOUR-PROJECT-ID。

我还必须用 .appspot.com 替换 .cloud.goog

关于python - Google AppEngine 端点错误 : Fetching service config failed (status code 404),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42310672/

相关文章:

google-app-engine - Google App Engine PHP SDK - 如何在 Ubuntu (15.10) 上安装?

python - 将 MySQL 结果写入 Google Cloud Storage 中的 CSV 文件

python - 使用相机内在矩阵在 2D 图像上投影 3D 网格

python - 如何在脚本中检测 Python 版本 2 或 3?

python - 在 Python 中使用周期性正态分布 (von Mises) 提取时间特征

python - 使文件处理代码与 asyncio 兼容

google-app-engine - Google App Engine 和域名

google-app-engine - JPA 与 App Engine 上的低级数据存储

google-app-engine - 无权创建 App Engine 应用程序

Python 列表切片