用python部署Google app引擎失败 [英] Deploying Google app engine with python failed
问题描述
我尝试在Google CDN(appspot)上使用Google App Engine 1.19.7和Python 2.7.9部署一些文件。
我相信这不是一个大问题,但我不是专家。
我在'Google开发者'
中创建了应用程序app.yaml文件的内容是:
应用程序:o-naturel版本:1运行时:python27 api_version:1线程安全:true
#过期时间:30 jours default_expiration:30d
处理程序:
- url:/ styles static_dir:styles
- url:/ images static_dir:images
$ b $ - url:/ files static_dir:files
# - url:/.*
#static_files:index.html
#upload:index.html
在部署期间查找下面的错误。希望我能得到答案,因为我无法关注我的网站的发展。非常感谢提前!!!!
2014-12-12 17:56:28运行命令:['C: \\Python27\\pythonw.exe','-u','C:\\Program Files(x86)\\Google\\google_appengine\\appcfg.py', '--no_cookies',u'--电子邮件地址= patrick.sanchez24@gmail.com','--passin','更新','D:\\Cdn-App_o-naturel']
05:56 PM应用:o-naturel;版本:1
05:56 PM主持人:appengine.google.com
Traceback(最近的最后一次调用):
文件C:\程序文件(x86)\Google\ google_appengine \appcfg.py,第127行,位于< module>
run_file(__ file__,globals())
文件C:\程序文件(x86)\Google\google_appengine\appcfg.py,第123行,在run_file中
execfile (_PATHS.script_file(script_name),globals_)
文件C:\程序文件(x86)\Google\google_appengine\google\appengine\tools\appcfg.py,第5397行,在< module>
main(sys.argv)
文件C:\程序文件(x86)\Google\google_appengine\google\appengine\tools\appcfg.py,第5388行,在主
结果= AppCfgApp(argv).Run()
文件C:\程序文件(x86)\Google\google_appengine\google\appengine\tools\appcfg。 py,第2978行,运行
self.action(self)
文件C:\程序文件(x86)\Google\google_appengine\google\appengine\tools\ appcfg.py行5044,位于__call__
return method()
文件C:\程序文件(x86)\Google\google_appengine\google\appengine\tools\ appcfg.py,第3791行,更新
self._UpdateWithParsedAppYaml(appyaml,self.basepath)
文件C:\程序文件(x86)\Google\google_appengine\google\ appengine \ tools \appcfg.py,行3812,在_UpdateWithParsedAppYaml
updatecheck.CheckForUpdates()
文件C:\程序文件(x86)\Google\google_appengine\google\appengine\tools\sdk_update_checker.py,行243,在CheckForUpdates
runtime = runtime))
文件C:\程序文件(x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py,第424行,发送
f = self.opener.open(req )
文件C:\Python27\lib\urllib2.py,行431,打开
response = self._open(req,data)
文件C:\\ \\ Python27\lib\urllib2.py,第449行,在_open
'_open',req)
文件C:\Python27\lib\urllib2.py,第409行,在_call_chain
result = func(* args)
文件C:\Python27\lib\urllib2.py,行1240,在https_open
context = self._context中)
TypeError:do_open()得到了一个意想不到的关键字参数'context'
2014-12-12 17:56:31(进程已退出,代码为1)
您可以关闭它窗口现在。
/ strong>,您应该安装Python 2.7.8 。
当我在Python 2.7.9 中运行GAE / P时,发生此错误与您一样。
但是,当我在Python中运行GAE / P <2.7.8 时,它工作正常。
可能是2014-12-10发布的Python 2.7.9 与2014-12-8发布的GAE / P之间的区别。
请尝试使用Python 2.7.8 。
I try to deploy some files on google CDN (appspot) with Google App Engine release 1.19.7 and Python 2.7.9. I'm sure that's it's not a big problem but I'm not a specialist. I've created the application in 'Google developers' The content of the file app.yaml is :
application: o-naturel version: 1 runtime: python27 api_version: 1 threadsafe: true
# Expiration des fichiers : 30 jours default_expiration: "30d"
handlers:
- url: /styles static_dir: styles
- url: /images static_dir: images
- url: /files static_dir: files
#- url: /.*
# static_files: index.html
# upload: index.html
Find below the errors during the deployment. Hope I will get an answer because I can not follow the development of my web site. Many thanks in advance !!!!
2014-12-12 17:56:28 Running command: "['C:\\Python27\\pythonw.exe', '-u', 'C:\\Program Files (x86)\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=patrick.sanchez24@gmail.com', '--passin', 'update', 'D:\\Cdn-App_o-naturel']"
05:56 PM Application: o-naturel; version: 1
05:56 PM Host: appengine.google.com
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 127, in <module>
run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 123, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5397, in <module>
main(sys.argv)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5388, in main
result = AppCfgApp(argv).Run()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2978, in Run
self.action(self)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5044, in __call__
return method()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3791, in Update
self._UpdateWithParsedAppYaml(appyaml, self.basepath)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3812, in _UpdateWithParsedAppYaml
updatecheck.CheckForUpdates()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\sdk_update_checker.py", line 243, in CheckForUpdates
runtime=runtime))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 424, in Send
f = self.opener.open(req)
File "C:\Python27\lib\urllib2.py", line 431, in open
response = self._open(req, data)
File "C:\Python27\lib\urllib2.py", line 449, in _open
'_open', req)
File "C:\Python27\lib\urllib2.py", line 409, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 1240, in https_open
context=self._context)
TypeError: do_open() got an unexpected keyword argument 'context'
2014-12-12 17:56:31 (Process exited with code 1)
You can close this window now.
If you use Python 2.7.9, you should install Python 2.7.8. When I ran GAE/P in Python 2.7.9, this error occured just like you. However, it worked correctly, when I ran GAE/P in Python 2.7.8. Probably, the difference is between Python 2.7.9 released 2014-12-10 and GAE/P released 2014-12-8 now.
Please try Python 2.7.8.
这篇关于用python部署Google app引擎失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!