本文介绍了Ubuntu上的python应用引擎导入本地数据存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图根据此问题的答案创建数据存储的本地副本。在MAC / Windows上它可以正常工作,但现在我使用的是Ubuntu,并且出现此错误:
Traceback ):
文件/opt/google/google_appengine/appcfg.py,第133行,位于< module>
run_file(__ file__,globals())
文件/opt/google/google_appengine/appcfg.py,第129行,在run_file中
execfile(_PATHS.script_file(script_name),globals_)
在< module>中的文件/opt/google/google_appengine/google/appengine/tools/appcfg.py,第5445行,
main(sys.argv)
在主
result = AppCfgApp(argv)中的文件/opt/google/google_appengine/google/appengine/tools/appcfg.py,行5436。运行()
运行
self.action(self)
文件/ opt中的文件/opt/google/google_appengine/google/appengine/tools/appcfg.py,行2997 /google/google_appengine/google/appengine/tools/appcfg.py,第5092行,在__call__
return method()
文件/ opt / google / google_appengine / google / appengine / tools / appcfg。在PerformDownload
run_fn(args)
中运行py,第4874行,在RunBulkloader中为/opt/google/google_appengine/google/appengine/tools/appcfg.py,第4777行$ b $ sys .exit(bulkloader.Run(arg_dict))
运行
中的文件/opt/google/google_appengine/google/appengine/tools/bulkloader.py,行4405返回_PerformBulkload(arg_dict)
文件/opt/google/google_appengine/google/appengine/tools/bulkloader.py,行4145,位于_PerformBulkload
passin = arg_dict ['passin']
KeyError:'pa ssin'
我试过使用--passin,但是没有这样的参数给appcfg.py
关于什么可能出错的想法?
我试图使用的命令是:
appcfg.py upload_data --filename = Downloads / data.csv --url = http:// localhost:8080 / remote_api
解决方案
刚试过设置passin = False,而不是从bulkloader.py中的arg_dict ['passin']获取它, p>
passin = False #arg_dict ['passin']
self.passin = False #arg_dict ['passin']
I'm trying to create a local copy of the datastore following the answer on this question How to create local copy of GAE datastore? . On MAC/Windows it works, but now i'm using Ubuntu and I get this error:
Traceback (most recent call last):
File "/opt/google/google_appengine/appcfg.py", line 133, in <module>
run_file(__file__, globals())
File "/opt/google/google_appengine/appcfg.py", line 129, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "/opt/google/google_appengine/google/appengine/tools/appcfg.py", line 5445, in <module>
main(sys.argv)
File "/opt/google/google_appengine/google/appengine/tools/appcfg.py", line 5436, in main
result = AppCfgApp(argv).Run()
File "/opt/google/google_appengine/google/appengine/tools/appcfg.py", line 2997, in Run
self.action(self)
File "/opt/google/google_appengine/google/appengine/tools/appcfg.py", line 5092, in __call__
return method()
File "/opt/google/google_appengine/google/appengine/tools/appcfg.py", line 4874, in PerformDownload
run_fn(args)
File "/opt/google/google_appengine/google/appengine/tools/appcfg.py", line 4777, in RunBulkloader
sys.exit(bulkloader.Run(arg_dict))
File "/opt/google/google_appengine/google/appengine/tools/bulkloader.py", line 4405, in Run
return _PerformBulkload(arg_dict)
File "/opt/google/google_appengine/google/appengine/tools/bulkloader.py", line 4145, in _PerformBulkload
passin = arg_dict['passin']
KeyError: 'passin'
I tried using --passin, but there is no such argument to appcfg.pyAny ideas about what could go wrong?
The command I am trying to use is:
appcfg.py upload_data --filename=Downloads/data.csv --url=http://localhost:8080/remote_api
解决方案
Just tried setting passin = False instead of getting it from arg_dict['passin'] in bulkloader.py and it works.
passin = False #arg_dict['passin']
self.passin = False #arg_dict['passin']
这篇关于Ubuntu上的python应用引擎导入本地数据存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!