TypeError: Credentials need to be from either oauth2client or from google-auth

We Are Going To Discuss About TypeError: Credentials need to be from either oauth2client or from google-auth. So lets Start this Python Article.

TypeError: Credentials need to be from either oauth2client or from google-auth

  1. How to solve TypeError: Credentials need to be from either oauth2client or from google-auth

    I had the same problem today and found this answer: https://github.com/burnash/gspread/issues/1014#issuecomment-1082536016
    I finally solved it by replacing the old code with this one:
    from google.colab import auth auth.authenticate_user() import gspread from google.auth import default creds, _ = default() gc = gspread.authorize(creds)

  2. TypeError: Credentials need to be from either oauth2client or from google-auth

    I had the same problem today and found this answer: https://github.com/burnash/gspread/issues/1014#issuecomment-1082536016
    I finally solved it by replacing the old code with this one:
    from google.colab import auth auth.authenticate_user() import gspread from google.auth import default creds, _ = default() gc = gspread.authorize(creds)

Solution 1

I had the same problem today and found this answer: https://github.com/burnash/gspread/issues/1014#issuecomment-1082536016

I finally solved it by replacing the old code with this one:

from google.colab import auth
auth.authenticate_user()

import gspread
from google.auth import default
creds, _ = default()

gc = gspread.authorize(creds)

Original Author Dj Melmac Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment