简体   繁体   中英

GAE SDK 1.8.3 Python: InvalidCertificateException on deploy

I keep getting the below error every time I do a deploy after updating GAE to a new version (1.8.3 in this case).

I have read other questions about this and the going recommendation is to delete /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/cacerts/*cacerts.txt

Does anyone know of a better fix than deleting these files after every update?

Note: I have the Python SSL module installed

*** 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 ***

There is a copy of fancy_urllib inside fancy_urllib where the __init__.py is with InvalidCertificateException class definition.

Just copy .../fancy_urllib/fancy_urllib/__init__.py to .../fancy_urllib/__init__.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM