Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
668 views
in Technique[技术] by (71.8m points)

api - Connection between Jupyter Notebook and Gsheet - Failed - HttpError 403 Error

Im completetly new using Google Cloud Platform and APIs so I dont know how to fix this issue. I`m trying to connect my Jupyter notebook with a google sheet so I can connect a dataset on Jupyter to Gsheet.

I made all the connections and didn`t get any error, for my last step I used the code below:

from df2gspread import df2gspread as d2g
wks_name = 'Jupyter Manipulated Data'
    d2g.upload(df_apn1, wks_name, credentials=credentials, row_names=True)

and received this error :

HttpError: <HttpError 403 when requesting https://www.googleapis.com/drive/v3/files/root?fields=id&alt=json returned "Insufficient Permission: Request had insufficient authentication scopes.">

I havent found any solution here that could fix this and, as I said before, I dont have experience with this so I really have no idea how to fix it. I made sure that everything that was suppose to be enable is so this is not the issue.

Does anybody know how to fix this?

Thank you

question from:https://stackoverflow.com/questions/65952999/connection-between-jupyter-notebook-and-gsheet-failed-httperror-403-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Make sure that the credentials created have the right scope. The specific information about scopes when using Google Sheets can be found here.

This medium article serves as a very nice tutorial.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...