Questions tagged [pygsheets]

A python library to access Google Spreadsheets through the Google Sheets API. Use this tag to ask questions about pygsheets usage and errors

pygsheets is a python library to access Google Spreadsheets through the Google Sheets API (currently API v4). Use this tag to ask questions about pygsheets usage and errors.

Github for the package: https://github.com/nithinmurali/pygsheets

Full package documentation: https://pygsheets.readthedocs.io/en/stable/

167 questions
0
votes
0 answers

Pygsheets: Segmentation Fault

I am new to python and was trying my hand at something. I am trying to load a google sheet using python and for that I'm using pygsheets. But whenever I try to load a sheet into a dataframe of Pandas, it's throwing an error: Segmentation Fault (core…
Ayusch
  • 417
  • 7
  • 17
0
votes
1 answer

How to use custom exceptions from packages in your excepts clauses?

I have a script which uses the package pygsheets to upload a dataframe to Google sheets. If the dataframe is empty, the following error appears: InvalidArgumentValue: provide either cells or values, not both So, I have been trying to use a…
Javier Lopez Tomas
  • 2,072
  • 3
  • 19
  • 41
0
votes
3 answers

Gsheet Python. Append a row and ignore the first column. How?

import gspread from oauth2client.service_account import ServiceAccountCredentials scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive'] credentials =…
t0m3k
  • 307
  • 1
  • 14
0
votes
0 answers

Invalid JSON payload received. Unknown name at 'requests[1].paste_data.data': Cannot find field

UPDATE: I used the api explorer on the google bactch update page and was able to successfully update the spreadsheet but when I replicate this in my code I am still getting an error. The API explorer did work with the json format.
0
votes
1 answer

gsheets inserting python dictonary using batchupdate

I am new to gheets and am looking for a way to insert the data that I have scraped into gheets that is currently in a python dictionary. I would like to do this in a batch process so my spider can update multiple fields at once. {'page_url':…
dcarlo56ave
  • 253
  • 5
  • 18
0
votes
1 answer

Sending dataframe to a worksheet within a Google Sheet document

I am using the below code to send df to a google sheet. Data is being exported to sheet1 within google sheets. Is there a way how I can modify my code to send another dataframe to sheet2 within the same google worksheet? gc =…
Mtra
  • 201
  • 4
  • 10
0
votes
1 answer

How do I authorize pygsheets with an externally hosted json?

gc = pygsheets.authorize(service_file='https://api.myjson.com/bins/******') I tried this now, but I'm getting this error: FileNotFoundError: [Errno 2] No such file or directory: 'https://api.myjson.com/bins/******' How can I do this?
Slip
  • 1
  • 2
0
votes
1 answer

How to create a new column from function result

Currently running the below script which checks for errors within a long list of urls. This code first looks for unique urls within df['Final_URL'], tests each separate url and returns the status of that link url. When I run the below code I get the…
Mtra
  • 201
  • 4
  • 10
0
votes
1 answer

How to write a list of URLs to a google drive spreadsheet with pygsheets

I have a list of urls that I'm trying to upload to a spreadsheet with pygsheets. For some reason, instead of updating cells in the specified range, the script only updates one cell. Relevant part of the script below: wks =…
Matthew
  • 411
  • 6
  • 22
0
votes
1 answer

Python 3.7: Pygsheets get all record stopped working

I have several scripts using pygsheets to get information from google sheets. Today they have stopped working without any errors or exceptions being noted. Debuging Attempts: Tried running in different ways 1. Visual Studio Code - just stops…
rdt0086
  • 138
  • 6
0
votes
0 answers

pygsheets set_dataframe: IndexError: list index out of range

I am trying to use pygsheets to put a dataframe into a google sheet. However, i am getting a list index out of range error, and can not find any solution. My dataframe: year month has product? Sold year month …
Laila Van Ments
  • 147
  • 2
  • 16
0
votes
1 answer

pygsheet worksheet size without empty values

How to get row/col number of the last (bottom-right) non-empty cell in worksheet? Worksheet's rows and cols attributes count also empty cells.
3voC
  • 647
  • 7
  • 19
0
votes
0 answers

Export Google WorkSheet as HTML using Service Account Key and its Client

I want the download worksheet from Google Sheet as HTML file using Service Account Key. I don't have OAuth Key. What all access I have : I have full access of that Particular Google Sheet only. I have shared that Sheet with Service Account Client…
random_commit
  • 11
  • 1
  • 1
0
votes
1 answer

Creating a Basic Filter

In pygsheets, is it possible to turn filtering on and off? I am able to get a dataframe into a sheet, but I cannot figure out how to turn on a filter without manually going to the sheet itself. My dataframe will be changing size and the default…
0
votes
1 answer

How to catch the url that cause SSL certificate_verify_failed in python?

I'm trying to access the google sheets api with python within corporate network, that uses firewall. Then, I need to discover all the url/domains google sheets api requests to send IT team unlock the access for theses url's. I am using the…