0

我是一个Python新手(2周前开始学习它),我正在努力完成这项任务。InvalidClientSecretsError - df2gspread - 熊猫 - Google表格

我想从熊猫导出一个数据帧到Google Spreadsheet。然而,在已经跟随在具有相同的错误一切必要的步骤(https://github.com/maybelinot/df2gspread)我把:

InvalidClientSecretsError: ('Error opening file', 'C:\Users\ User/.gdrive_private', 'No such file or directory', 2)

我使用的代码是:

from df2gspread import df2gspread as d2g 
import pandas as pd 

spreadsheet = 'C:\Users\User\Google Drive\Marketing Team' 

wks = d2g.upload(df_all_daily_campaign_y, wks_name='Example worksheet') 

请鸵鸟政策给什么用理所当然因为我对这个主题的知识非常有限!

我看到这个问题在互联网上发布,但没有发布的答案!任何帮助将不胜感激!

回答

0

错误表明必须的OAuth包含C:\Users\ User/.gdrive_private中的客户机密的文件无法找到。

请检查您的Client Secrets的完整性。在给定文档中提到 如,

That can be error prone, along with it being an incomplete picture of all the information that is needed to get OAuth 2.0 working, which requires knowing all the endpoints and configuring a Redirect Endpoint.

更多信息和帮助代码可以在GitHuboauth2client.clientsecrets找到。