GEA无法运行Python 程序

Google App Egine 运行Python的web失败

WARNING  2012-03-06 12:41:06,812 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
Warning: You are using a Python runtime (2.6) that is more recent than the production runtime environment (2.5). Your application may use features that are not available in the production environment and may not work correctly when deployed to production.
INFO     2012-03-06 12:41:07,125 appengine_rpc.py:160] Server: appengine.google.com
INFO     2012-03-06 12:41:07,125 appcfg.py:581] Checking for updates to the SDK.
Traceback (most recent call last):
  File "C:\Google\google_appengine\dev_appserver.py", line 125, in 
    run_file(__file__, globals())
  File "C:\Google\google_appengine\dev_appserver.py", line 121, in run_file
    execfile(script_path, globals_)
  File "C:\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 690, in 
    sys.exit(main(sys.argv))
  File "C:\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 631, in main
    update_check.CheckForUpdates()
  File "C:\Google\google_appengine\google\appengine\tools\appcfg.py", line 592, in CheckForUpdates
    runtime=self.config.runtime)
  File "C:\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 366, in Send
    f = self.opener.open(req)
  File "C:\Python26\lib\urllib2.py", line 391, in open
    response = self._open(req, data)
  File "C:\Python26\lib\urllib2.py", line 409, in _open
    '_open', req)
  File "C:\Python26\lib\urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "C:\Python26\lib\urllib2.py", line 1178, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "C:\Google\google_appengine\lib\fancy_urllib\fancy_urllib\__init__.py", line 354, in do_open
    req)
  File "C:\Python26\lib\urllib2.py", line 1142, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "C:\Python26\lib\httplib.py", line 914, in request
    self._send_request(method, url, body, headers)
  File "C:\Python26\lib\httplib.py", line 951, in _send_request
    self.endheaders()
  File "C:\Python26\lib\httplib.py", line 908, in endheaders
    self._send_output()
  File "C:\Python26\lib\httplib.py", line 780, in _send_output
    self.send(msg)
  File "C:\Python26\lib\httplib.py", line 739, in send
    self.connect()
  File "C:\Google\google_appengine\lib\fancy_urllib\fancy_urllib\__init__.py", line 170, in connect
    'hostname mismatch')
fancy_urllib.InvalidCertificateException: Host appengine.google.com returned an invalid certificate (hostname mismatch): {'notAfter': 'Sep 30 23:59:59 2013 GMT', 'subject': ((('countryName', u'US'),), (('stateOrProvinceName', u'California'),), (('localityName', u'Mountain View'),), (('organizationName', u'Google Inc'),), (('commonName', u'www.google.com'),))}
To learn more, see http://code.google.com/appengine/kb/general.html#rpcssl

原因:版本不兼容,具体是SSL模块的不兼容。

解决:使用Python 2.5的解析器。

或许自己下载Python旧的SSL module可以解决问题,但那样比较麻烦,没有尝试。

你可能感兴趣的:(Python问题)