ImportError: cannot import name SignedJwtAssertion

2019-05-30 23:06发布

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 :

ImportError: cannot import name SignedJwtAssertionCredentials

When I ran from a standard python console the same statement, I am not getting any error. The import works fine.

I confirm that I have pyopenssl installed on my system. I have already read this post which suggest only to install it: ImportError: cannot import name SignedJwtAssertionCredentials

Any idea of what's wrong with the development server?

PS : My main goal is to connect to BigQuery

1条回答
The star\"
2楼-- · 2019-05-30 23:26

Instead of using SignedJwtAssertionCredentials and deploying your PKCS12 key with your application, you can use AppAssertionCredentials from the oauth2client.appengine package. Ensure that your appengine application service is added to your project and you are good to go.

Looks like a long standing issue with the AppEngine environment: https://code.google.com/p/google-api-python-client/issues/detail?id=133

查看更多
登录 后发表回答