Google应用引擎批量加载程序会在上传时打开空文件

时间:2013-07-18 10:09:31

标签: google-app-engine development-environment bulkloader

我正在运行以下两个命令:

appcfg.py download_data --kind=Journal --url=http://appname.appspot.com/_ah/remote_api --filename=Journals.sql3
appcfg.py upload_data --url=http://localhost:8080/_ah/remote_api --kind=Journal --filename=Journals.sql3

第一个成功下载以下文件中的数据: bulkloader-结果,20130718.112127.sql3 Journals.sql3 没有任何错误。当我在记事本中打开文件时,看起来数据就在那里。

每次运行时,第二个都会打开一个随机的新空文件(例如bulkloader-progress-20130718.115805.sql3)。然后它给出以下错误日志:

INFO     2013-07-18 11:54:48,930 module.py:595] default: "POST /_ah/remote_api HTTP/1.1" 200 96
INFO     2013-07-18 11:58:17,563 module.py:595] default: "GET /_ah/remote_api?rtok=36123921049 HTTP/1.1" 200 64
INFO     2013-07-18 11:58:20,609 module.py:595] default: "GET /_ah/remote_api HTTP/1.1" 200 37
ERROR    2013-07-18 09:58:20,618 handler.py:384] Exception while handling service_name: "datastore_v4"
method: "AllocateIds"
request: ""
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remote_api\handler.py", line 380, in post
    response_data = self.ExecuteRequest(request)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remote_api\handler.py", line 411, in ExecuteRequest
    response_data)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py", line 94, in MakeSyncCall
    return stubmap.MakeSyncCall(service, call, request, response)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py", line 328, in MakeSyncCall
    rpc.CheckSuccess()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apiproxy_rpc.py", line 156, in _WaitImpl
    self.request, self.response)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remote_api\remote_api_stub.py", line 200, in MakeSyncCall
    self._MakeRealSyncCall(service, call, request, response)
  File "C:\Program Files (x86)\Google\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-07-18 11:58:20,622 module.py:595] default: "POST /_ah/remote_api HTTP/1.1" 200 96

我做错了什么?

编辑:仍然没有解决方案。有趣的是,在应用引擎服务器上上传确实有效。

1 个答案:

答案 0 :(得分:4)

看起来这个问题有一个ticket,它与最新版本的Python dev服务器(1.8.2)有关。

根据故障单上的建议,我将我的开发服务器降级到之前的SDK版本(1.8.1),批量上传再次按预期工作。