-
我使用Boto3,我能够将凭证拖到Jupyter笔记本上。你知道吗
现在尝试打开creds = ServiceAccountCredentials.from_json_keyfile_name(result, scope)
# Create an S3 client
s3 = boto3.client('s3')
# Call to S3 to retrieve the policy for the given bucket
result = s3.get_bucket_acl(Bucket='sheet-credentials')
print(result)
# Calling google sheet api
creds = ServiceAccountCredentials.from_json_keyfile_name(result, scope)
client = gspread.authorize(creds)
sheet = client.open("CALCULATOR").worksheet("hist")
google_sheet = sheet.get_all_records()
print(google_sheet)
FileNotFoundError: [Errno 2] No such file or directory: 'sheet-credential.json'
它在我的本地机器上工作,因为我在本地有sheet-credential.json
文件。你知道吗
如何将此文件发送到EC2实例以运行脚本?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐