2015-08-14 68 views
2

我正在嘗試使用Google地球引擎應用程序的時髦燈示例來測試Google App Engine的基本應用程序。EEException:服務器返回的HTTP代碼:404 ---使用Google App Engine和Google Earth Engine測試應用程序

我克隆了GEE github存儲庫中的trendy-lights應用程序,並更新了app.yaml中的應用程序名稱,config.py中的EE_ACCOUNT以及privatekey.pem文件。我沒有做任何其他改變。然而,時尚燈應用程序無法正常工作。

請參閱下面的錯誤。我想弄清楚爲什麼它不起作用。 (僅供參考,我嘗試了GAE中的示例燒瓶應用程序,它運行良好,當我進入應用程序網頁時,我看到'Hello World'文本)。

有誰知道我得到的錯誤是指什麼?我沒有線索,我不知道如何調試它。

另一個問題:對於使用GAE和GEE運行這個應用程序(即時髦燈的例子),我是否必須註冊參加GAE免費試用? (我是GEE值得信賴的測試人員)

感謝您的幫助!

阿里

[email protected]:~/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 - 

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

+0

看起來好像EE SDK試圖擊中沒有響應的端點。理解錯誤的關鍵在於'send_('/ algorithms',{},'GET')'。 – Nick

回答

2

現在解決了此問題中發佈的問題。

我的服務帳戶必須由Google地球引擎平臺的管理員列入白名單,以便應用能夠運行。

+0

很高興聽到它解決了! – Nick

+0

需要多長時間? – vascobnunes

+0

@vascobnunes要將帳戶列入白名單,向GEE管理員發送消息後幾個小時 – Ali

0

如發佈here,您必須致電ee.Initialize()以便earthengine api搜索由命令earthengine authenticate創建的驗證文件。