2013-08-05 29 views
3

我在Mac OS X 10.6.8系統上使用Google App Engine SDK 1.8.2版。應用程序本身是用Python 2.7編寫的,但我認爲這與這個問題沒有關係。當我嘗試在開發環境中批量加載數據存儲時,它失敗。我使用的命令是:appcfg.py upload_data在Google App Engine SDK 1.8.2中失敗

appcfg.py upload_data --config_file=bulkloader.yaml --kind=Capitulary --url=http://localhost:8080/_ah/remote_api --filename=upload.xml 

該命令與SDK可以追溯到至2010年時的SDK版本1.8.0出來它打破的每一個版本的工作,它再次工作時,1.8.1出來了,當1.8.2出來時再次爆發。

在此先感謝您的幫助。

錯誤下面消息:

INFO 2013-08-05 14:19:05,312 module.py:595] default: "GET /_ah/remote_api?rtok=215098893971 HTTP/1.1" 200 70 INFO 2013-08-05 14:19:05,569 module.py:595] default: "GET /_ah/remote_api HTTP/1.1" 200 42 ERROR 2013-08-05 14:19:05,716 handler.py:384] Exception while handling service_name: "datastore_v4" method: "AllocateIds" request: "" Traceback (most recent call last): File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/handler.py", line 380, in post response_data = self.ExecuteRequest(request) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/handler.py", line 411, in ExecuteRequest response_data) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall return stubmap.MakeSyncCall(service, call, request, response) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall rpc.CheckSuccess() File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl self.request, self.response) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall self._MakeRealSyncCall(service, call, request, response) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 234, in _MakeRealSyncCall raise pickle.loads(response_pb.exception()) AttributeError: 'NoneType' object has no attribute 'THREADSAFE' INFO 2013-08-05 14:19:05,773 module.py:595] default: "POST /_ah/remote_api HTTP/1.1" 200 96 ERROR 2013-08-05 14:19:05,793 handler.py:384] Exception while handling service_name: "datastore_v4" method: "AllocateIds" request: "" Traceback (most recent call last): File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/handler.py", line 380, in post response_data = self.ExecuteRequest(request) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/handler.py", line 411, in ExecuteRequest response_data) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall return stubmap.MakeSyncCall(service, call, request, response) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall rpc.CheckSuccess() File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl self.request, self.response) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall self._MakeRealSyncCall(service, call, request, response) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 234, in _MakeRealSyncCall raise pickle.loads(response_pb.exception()) AttributeError: 'NoneType' object has no attribute 'THREADSAFE' INFO 2013-08-05 14:19:05,802 module.py:595] default: "POST /_ah/remote_api HTTP/1.1" 200 96

回答

2

TL; DR:我在谷歌\ AppEngine上\分機加入return response.ParseFromString(response_pb.response()) '黑客' 這個差錯\ remote_api的\ remote_api_stub.py上線228

我在SDK 1.8.3類似的錯誤,這裏的回溯:

Traceback (most recent call last): 

    File "C:\Dev\GAE\google\appengine\ext\remote_api\handler.py", line 380, in post 
    response_data = self.ExecuteRequest(request) 

    File "C:\Dev\GAE\google\appengine\ext\remote_api\handler.py", line 411, in ExecuteRequest 
    response_data) 

    File "C:\Dev\GAE\google\appengine\api\apiproxy_stub_map.py", line 94, in MakeSyncCall 
    return stubmap.MakeSyncCall(service, call, request, response) 

    File "C:\Dev\GAE\google\appengine\api\apiproxy_stub_map.py", line 328, in MakeSyncCall 
    rpc.CheckSuccess() 

    File "C:\Dev\GAE\google\appengine\api\apiproxy_rpc.py", line 156, in _WaitImpl 
    self.request, self.response) 

    File "C:\Dev\GAE\google\appengine\ext\remote_api\remote_api_stub.py", line 200, in MakeSyncCall 
    self._MakeRealSyncCall(service, call, request, response) 

    File "C:\Dev\GAE\google\appengine\ext\remote_api\remote_api_stub.py", line 234, in _MakeRealSyncCall 
    raise pickle.loads(response_pb.exception()) 

AttributeError: 'NoneType' object has no attribute 'THREADSAFE' 

我有點「黑客」周圍(:在remote_api_stub.py上線228我已經添加return response.ParseFromString(response_pb.response()),從而忽視了問題的錯誤檢查upload_data現在的工作,但我們希望他們在下一版本中解決這個問題(;

return response.ParseFromString(response_pb.response()) 
if response_pb.has_application_error(): 
    error_pb = response_pb.application_error() 
    raise apiproxy_errors.ApplicationError(error_pb.code(), 
             error_pb.detail()) 
elif response_pb.has_exception(): 
    raise pickle.loads(response_pb.exception()) 
elif response_pb.has_java_exception(): 
    raise UnknownJavaServerError("An unknown error has occured in the " 
           "Java remote_api handler for this call.") 
else: 
    response.ParseFromString(response_pb.response()) 
+1

Aleksandar,謝謝你的回答。我做出了您所建議的更改,現在我可以批量將數據從XML文件上傳到開發服務器。 – user2653321

+0

非常感謝!谷歌無法與我們一起做...再次謝謝! –

1

我們很高興這個問題重新解決。我們正在跟蹤appengine issue 9666,請觀看該線索的更新。很高興你現在有一個解決方法。這不會影響批量生產。

1

我遇到了與SDK 1.8.5相同的問題,可以驗證它現在可以在1.8.6下工作!

相關問題