【问题标题】:EEException: Server returned HTTP code: 404 --- testing app with Google App Engine and Google Earth EngineEEException:服务器返回 HTTP 代码:404 --- 使用 Google App Engine 和 Google Earth Engine 测试应用
【发布时间】:2018-09-04 16:45:21
【问题描述】:

我正在尝试使用带有 Google Earth Engine 应用程序的时尚灯光示例来测试带有 Google App Engine 的基本应用程序。

我从 GEE github 存储库中克隆了 Trendy-lights 应用程序,并更新了 app.yaml 中的应用程序名称、config.py 中的 EE_ACCOUNT 和 privatekey.pem 文件。我没有做任何其他改变。但是,时尚灯应用程序不起作用。

请查看我在下面得到的错误。我试图弄清楚为什么它不起作用。 (仅供参考,我在 GAE 中尝试了示例烧瓶应用程序,它运行良好,当我进入应用程序网页时,我看到了“Hello World”文本)。

有谁知道我得到的错误指的是什么?我没有头绪,也不知道如何调试它。

另一个问题:要使用 GAE 和 GEE 运行这个应用程序(即时尚灯示例),我是否必须注册 GAE 免费试用? (我是 GEE 值得信赖的测试人员)

感谢您的帮助!

阿里

user@osgeolive:~/shared/git/earthengine-api/demos/trendy-lights$ /home/user/google_appengine/dev_appserver.py ./
INFO    2015-08-14 14:07:21,304 sdk_update_checker.py:229] Checking for updates to the SDK.
INFO    2015-08-14 14:07:21,735 sdk_update_checker.py:257] The SDK is up to date.
WARNING  2015-08-14 14:07:22,512 simple_search_stub.py:1126] Could not read search indexes from /tmp/appengine.test-project-1036.user/search_indexes
INFO    2015-08-14 14:07:22,516 api_server.py:205] Starting API server at: http://localhost:52519
INFO    2015-08-14 14:07:22,530 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO    2015-08-14 14:07:22,531 admin_server.py:118] Starting admin server at: htp://localhost:8000
INFO    2015-08-14 14:07:51,222 client.py:515] Attempting refresh to obtain initial access_token
INFO    2015-08-14 14:07:51,262 client.py:755] Refreshing access_token
ERROR   2015-08-14 14:07:53,438 wsgi.py:263]

Traceback (most recent call last):
  File "/home/user/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/home/user/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/home/user/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/server.py", line 241, in <module>
    ee.Initialize(EE_CREDENTIALS)
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/ee/__init__.py", line 83, in Initialize
    ApiFunction.initialize()
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/ee/apifunction.py", line 145, in initialize
    signatures = data.getAlgorithms()
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/ee/data.py", line 341, in getAlgorithms
    return send_('/algorithms', {}, 'GET')
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/ee/data.py", line 594, in send_
    response.status)
EEException: Server returned HTTP code: 404

INFO    2015-08-14 14:07:53,573 module.py:809] default: "GET / HTTP/1.1" 500 -
INFO    2015-08-14 14:07:53,625 client.py:515] Attempting refresh to obtain initial access_token
INFO    2015-08-14 14:07:53,666 client.py:755] Refreshing access_token
ERROR   2015-08-14 14:07:55,192 wsgi.py:263]

Traceback (most recent call last):
  File "/home/user/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/home/user/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/home/user/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/server.py", line 241, in <module>
    ee.Initialize(EE_CREDENTIALS)
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/ee/__init__.py", line 83, in Initialize
    ApiFunction.initialize()
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/ee/apifunction.py", line 145, in initialize
    signatures = data.getAlgorithms()
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/ee/data.py", line 341, in getAlgorithms
    return send_('/algorithms', {}, 'GET')
  File "/home/user/shared/git/earthengine-api/demos/trendy-lights/ee/data.py", line 594, in send_
    response.status)
EEException: Server returned HTTP code: 404

INFO    2015-08-14 14:07:55,198 module.py:809] default: "GET /favicon.ico HTTP/1.1" 500 -

我在 Windows 8.1 上运行的 VirtualBox 上运行 osgeo Lubuntu。 (VirtualBox-5.0.0-101573-Win、osgeo-live-8.5、Python 2.7.6、Google App Engine 1.9.24)。

【问题讨论】:

  • 似乎 EE SDK 正在尝试访问没有响应的端点。理解错误的关键是send_('/algorithms', {}, 'GET')

标签: python google-app-engine google-earth-engine


【解决方案1】:

此问题中发布的问题现已解决。

Google Earth Engine 平台的管理员必须将我的服务帐户列入白名单,该应用才能运行。

【讨论】:

  • 花了多长时间?
  • @vascobnunes 要将该帐户列入白名单,只需在向 GEE 管理员发送消息几个小时后
  • 请注意,您不需要服务帐户即可使用 Earth Engine API!这仅适用于您正在开发 App Engine 应用程序。
【解决方案2】:

正如here 发布的那样,您必须调用ee.Initialize() 以便earthengine api 搜索由命令earthengine authenticate 创建的身份验证文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-04-28
    • 1970-01-01
    • 2013-09-09
    • 2019-03-28
    • 1970-01-01
    • 2020-02-17
    • 1970-01-01
    • 2012-07-25
    相关资源
    最近更新 更多