3

I'm working with Google App Engine SDK version 1.8.2 on a Mac OS X 10.6.8 system. The application itself is written in Python 2.7, although I don't think that's relevant to the problem. When I attempt to bulkload the datastore in the development environment, it fails. The command I'm using is:

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

This command worked with every version of the SDK going back to 2010. It broke when SDK version 1.8.0 came out, it worked again when 1.8.1 came out, and broke again when 1.8.2 came out.

Thanks in advance for your help.

Error message below:

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

4

3 回答 3

2

TL; DR:return response.ParseFromString(response_pb.response())我通过在第 228 行添加 google\appengine\ext\remote_api\remote_api_stub.py 来“破解”这个错误

我在 SDK 1.8.3 中有类似的错误,这是 Traceback:

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'

我有点“破解”它(:在第 228 行的 remote_api_stub.py 中我添加了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())
于 2013-08-08T12:26:39.720 回答
1

我在使用 SDK 1.8.5 时遇到了同样的问题,并且可以验证它现在可以与 1.8.6 一起使用!

于 2013-10-25T07:36:50.923 回答
1

我们知道这个问题正在修复中。我们在appengine 问题 9666对此进行了跟踪,请关注该线程以获取更新。很高兴你现在有一个解决方法。这不会影响针对生产的批量加载操作。

于 2013-08-09T01:36:05.163 回答