GAE SDK 1.8.3 Python:部署时出现InvalidCertificateException

时间:2013-08-13 01:14:40

标签: python google-app-engine ssl-certificate

在将GAE更新为新版本(本例中为1.8.3)后,每次部署时都会出现以下错误。

我已阅读有关此问题的其他问题,目前的建议是删除/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/cacerts/*cacerts.txt

有没有人知道比每次更新后删除这些文件更好的解决方法?

注意:我安装了Python SSL模块

*** Running appcfg.py with the following flags:
    --no_cookies --email=joshainglis@gmail.com --passin update
10:52 AM Host: appengine.google.com
10:52 AM Application: josha-search-py-demo; version: 1
Traceback (most recent call last):
  File "google_appengine/appcfg.py", line 171, in <module>
    run_file(__file__, globals())
  File "google_appengine/appcfg.py", line 167, in run_file
    execfile(script_path, globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 4282, in <module>
    main(sys.argv)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 4273, in main
    result = AppCfgApp(argv).Run()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2409, in Run
    self.action(self)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 4003, in __call__
    return method()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2987, in Update
    updatecheck.CheckForUpdates()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/sdk_update_checker.py", line 259, in CheckForUpdates
    runtime=runtime))
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
    f = self.opener.open(req)
  File "/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/urllib2.py", line 1215, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/fancy_urllib/fancy_urllib/__init__.py", line 383, in do_open
    url_error.reason.args[1])
fancy_urllib.InvalidCertificateException: Host appengine.google.com returned an invalid certificate (_ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed): 
To learn more, see http://code.google.com/appengine/kb/general.html#rpcssl
If deploy fails you might need to 'rollback' manually.
The "Make Symlinks..." menu option can help with command-line work.
*** appcfg.py has finished with exit code 1 ***

1 个答案:

答案 0 :(得分:0)

fancy_urllib内有fancy_urllib的副本,其中__init__.py的{​​class}定义为InvalidCertificateException

只需将.../fancy_urllib/fancy_urllib/__init__.py复制到.../fancy_urllib/__init__.py

即可