[英]ImportError: cannot import name SignedJwtAssertionCredentials using AppEngine dev server
When I do : 当我做 :
from oauth2client.client import SignedJwtAssertionCredentials
in my main.py which is served using the App Engine development server, I am getting an error : 在使用App Engine开发服务器提供服务的main.py中,出现错误:
ImportError: cannot import name SignedJwtAssertionCredentials
When I ran from a standard python console the same statement, I am not getting any error. 当我从标准python控制台运行同一条语句时,我没有收到任何错误。 The import works fine. 导入工作正常。
I confirm that I have pyopenssl installed on my system. 我确认我的系统上已安装pyopenssl。 I have already read this post which suggest only to install it: ImportError: cannot import name SignedJwtAssertionCredentials 我已经读过这篇文章,建议只安装它: ImportError:无法导入名称SignedJwtAssertionCredentials
Any idea of what's wrong with the development server? 您对开发服务器有什么问题有任何想法吗?
PS : My main goal is to connect to BigQuery PS:我的主要目标是连接到BigQuery
Instead of using SignedJwtAssertionCredentials
and deploying your PKCS12 key with your application, you can use AppAssertionCredentials
from the oauth2client.appengine
package. 您可以使用oauth2client.appengine
软件包中的AppAssertionCredentials
来代替使用SignedJwtAssertionCredentials
和在应用程序中部署PKCS12密钥。 Ensure that your appengine application service is added to your project and you are good to go. 确保将appengine应用程序服务添加到您的项目中,并且一切顺利。
Looks like a long standing issue with the AppEngine environment: https://code.google.com/p/google-api-python-client/issues/detail?id=133 AppEngine环境似乎是一个长期存在的问题: https : //code.google.com/p/google-api-python-client/issues/detail? id = 133
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.