Google app engine 使用python部署Google应用程序引擎失败

Google app engine 使用python部署Google应用程序引擎失败,google-app-engine,python-2.7,deployment,Google App Engine,Python 2.7,Deployment,我尝试使用GoogleAppEngineRelease1.19.7和Python2.7.9在GoogleCDN(appspot)上部署一些文件。 我肯定这不是什么大问题,但我不是专家。 我在“谷歌开发者”中创建了这个应用程序 app.yaml文件的内容为: application: o-naturel version: 1 runtime: python27 api_version: 1 threadsafe: true # Expiration des fichiers : 30 jour

我尝试使用GoogleAppEngineRelease1.19.7和Python2.7.9在GoogleCDN(appspot)上部署一些文件。 我肯定这不是什么大问题,但我不是专家。 我在“谷歌开发者”中创建了这个应用程序 app.yaml文件的内容为:

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
在下面查找部署期间的错误。希望我能得到一个答案,因为我不能跟上我的网站的发展。非常感谢

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.
2014-12-12 17:56:28运行命令:“['C:\\Python27\\pythonw.exe','-u','C:\\Program Files(x86)\\Google\\Google\u appengine\\appcfg.py','--no_cookies',u'--email=patrick。sanchez24@gmail.com“,”--passin“,”update“,”D:\\Cdn-App_o-nature']
下午5:56应用:o-naturel;版本:1
下午5:56主持人:appengine.google.com
回溯(最近一次呼叫最后一次):
文件“C:\Program Files(x86)\Google\Google\u appengine\appcfg.py”,第127行,在
运行\u文件(\uuuu文件,globals())
文件“C:\Program Files(x86)\Google\Google\u appengine\appcfg.py”,第123行,在run\u文件中
execfile(_PATHS.script_文件(script_名称),全局文件)
文件“C:\Program Files(x86)\Google\Google\U appengine\Google\appengine\tools\appcfg.py”,第5397行,在
主(系统argv)
文件“C:\Program Files(x86)\Google\Google\U appengine\Google\appengine\tools\appcfg.py”,第5388行,主目录
结果=AppCfgApp(argv).Run()
文件“C:\Program Files(x86)\Google\Google\U appengine\Google\appengine\tools\appcfg.py”,第2978行,正在运行
自我行动(self)
文件“C:\Program Files(x86)\Google\Google\u appengine\Google\appengine\tools\appcfg.py”,第5044行,在调用中__
返回方法()
文件“C:\Program Files(x86)\Google\Google\U appengine\Google\appengine\tools\appcfg.py”,第3791行,正在更新中
self.\u UpdateWithParsedAppYaml(appyaml,self.basepath)
文件“C:\Program Files(x86)\Google\Google\u appengine\Google\appengine\tools\appcfg.py”,第3812行,位于\u UpdateWithParsedAppYaml中
updatecheck.CheckForUpdates()
CheckForUpdate中的文件“C:\Program Files(x86)\Google\Google\U appengine\Google\appengine\tools\sdk\U update\U checker.py”,第243行
运行时=运行时)
文件“C:\Program Files(x86)\Google\Google\U appengine\Google\appengine\tools\appengine\U rpc.py”,第424行,在Send中
f=自动开启器开启(要求)
文件“C:\Python27\lib\urllib2.py”,第431行,打开
响应=自身打开(请求,数据)
文件“C:\Python27\lib\urllib2.py”,第449行,处于打开状态
"开放",
文件“C:\Python27\lib\urllib2.py”,第409行,在调用链中
结果=func(*args)
文件“C:\Python27\lib\urllib2.py”,第1240行,https\u open
上下文=自身(上下文)
TypeError:do_open()获得意外的关键字参数“context”
2014-12-12 17:56:31(流程退出,代码为1)
你现在可以关闭这个窗口了。

如果使用Python2.7.9,则应安装Python2.7.8。 当我在Python2.7.9中运行GAE/P时,这个错误和您一样发生了。 但是,当我在Python中运行GAE/P时,它工作正常。 可能是2014-12-10发布的Python2.7.9和现在发布的GAE/P之间的差异


如果要继续使用Python 2.7.9,请尝试Python2.7.8

,解决方案如所示: 为我工作


不得不更改三行代码,它开始工作。

SDK中似乎有一个bug。 请参阅上面的Deep链接。 对我来说,最简单的解决方案是添加:
--跳过\u sdk\u update\u check=yes
到附加选项。
稍后,我将手动检查并下载较新版本,然后再次删除该选项。

通过将Google App Engine SDK升级到1.9.18(在GoogleAppEngineLauncher UI中,使用帮助>检查更新),我可以修复此问题。
我正在运行Python 2.7.9。

您发布的app.yaml中似乎缺少很多换行符——可能是Windows换行符问题?不确定可能会导致什么问题(我不使用Windows:-),但你能看看你是否能让app.yaml(使用一些好的编辑器?)进入一种状态,它至少会复制并粘贴到这里,然后重试…?用户“Japanish”给了我答案。这是Python2.7.9的一个问题。我使用了Python2.7.8,它工作得非常好。谢谢你回答我的问题…相关的谷歌问题:为我工作。谢谢