简体   繁体   English

GAE SDK 1.9.5和InvalidCertificateException

[英]GAE SDK 1.9.5 and an InvalidCertificateException

Trying to import testbed from GAE SDK 1.95 with Python2.7.8 on osX Maverics 10.9.5 and I'm getting a InvalidCertificateException error. 尝试在osX Maverics 10.9.5上使用Python2.7.8从GAE SDK 1.95导入测试平台,我收到InvalidCertificateException错误。

    from google.appengine.ext import testbed   
  File "/usr/local/google_appengine/google/appengine/ext/testbed/__init__.py", line 120, in <module>  
    from google.appengine.api import urlfetch_stub   
  File "/usr/local/google_appengine/google/appengine/api/urlfetch_stub.py", line 34, in <module>  
    _fancy_urllib_InvalidCertException = fancy_urllib.InvalidCertificateException  
AttributeError: 'module' object has no attribute 'InvalidCertificateException'   

I looked at the fancy_url module and the InvalidCertificateException class is there, so I don't understand why it's not importing. 我查看了fancy_url模块,InvalidCertificateException类就在那里,所以我不明白它为什么不导入。

Apparently others have had the same error, so I attempt to correct it by deleting: urlfetch_cacerts.txt AND cacerts.txt from: 显然其他人也有同样的错误,所以我试图通过删除: urlfetch_cacerts.txt AND cacerts.txt来纠正它:

GoogleAppEngineLauncher/Contents/Resources/GoogleAppEngineDefault.bundle/Content‌​s/Resources/google_appengine/lib/cacerts/

Apparently the GAE installer creates a nested directory, this was fixed by copying the contents in: 显然,GAE安装程序创建了一个嵌套目录,这是通过复制以下内容来修复的:

cd /usr/local/google_appengine/lib
cp fancy_urllib/fancy_urllib/__init__.py fancy_urllib/__init__.py 

This is how the module is incorrectly structured, it looks like these 2 init .py files are duplicate: 这就是模块结构错误的方式,看起来这两个init .py文件是重复的:

/usr/local/google_appengine/lib/fancy_urllib/__init__.py   # this file is empty
/usr/local/google_appengine/lib/fancy_urllib/fancy_urllib/__init__.py # this file contains the functions.

FIXED THE ERROR 修正了错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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