Questions tagged [gspread]

gspread is an asynchronous Python library for interacting with Google Spreadsheets.

gspread is a Python library for interacting with Google Spreadsheets.

949 questions
2
votes
1 answer

AttributeError: 'module' object has no attribute 'authorize'

I want to reporting something to google spreadsheet, my code for example: import json import gspread from oauth2client.service_account import ServiceAccountCredentials scope = ['https://spreadsheets.google.com/feeds'] credentials =…
malin
  • 21
  • 1
  • 4
2
votes
1 answer

Gspread, cant make a cell blank

When using gspread with python3 it seems like its not possible to make a cell value blank, is this really the case? Everytime I try updating a cell with value "" the cell then looks blank but formulas arent working. Even when using sheet.clear() it…
Martin Björn
  • 51
  • 1
  • 3
2
votes
1 answer

gspread reading a google sheet file using python 3

I'm using Python 3 running Pycharm and the module gspread to read google sheet files in my google drive. Well, I've followed all steps from this link about how to read a file. Unfortunately, my code here below doesn't work yet. import gspread …
Andres Urrego Angel
  • 1,842
  • 7
  • 29
  • 55
2
votes
1 answer

gspread - Import header titles and start data on Row 2

I run a daily script checking 50 prices via Beautiful Soup and gspread. I clear the data using clear() but the script also clears the header title (Column 1 etc) and then starts the data import on the next row after the rows I have cleared. (Row…
me9867
  • 1,519
  • 4
  • 25
  • 53
2
votes
1 answer

gspread get key once opened by title

how do I get the key of the workbook if I know only the name of the workbook? I can use open by title, but once i'm in I didn't find a get.key type method in the documents. Is there a way to get the key by only knowing the title?
jason
  • 3,811
  • 18
  • 92
  • 147
2
votes
1 answer

How to solve Gspread oauth refresher token error?

I have a gspread Python script which has been working perfectly for 6 months. Now suddenly I'm receiving an error when trying to authorize my service account credentials. Here is the error: raise HttpAccessTokenRefreshError(error_msg,…
R001W
  • 71
  • 3
2
votes
0 answers

Using gspread results in Token invalid - AuthSub token has wrong scope

Trying to access my spreadsheet under my organizational account. I have run the Google API Python Client Quickstart and substituted the appropriate pieces to use my spreadsheet and everything worked. When I change things up to use gspread I…
Eric
  • 636
  • 2
  • 9
  • 23
2
votes
1 answer

gspread HTTPError: 400 using insert_row OR add_row

my first SO question so I hope that I don't anger the group ;-) Using gspread 0.4.0 and Python 2.7, I can access pages in my Google Sheet, can read data, and can change the content of cells using update_cell(). However, attempts to insert a row or…
steve
  • 31
  • 4
2
votes
1 answer

gspread update_cell very slow

I have two google spreadsheets: QC- many columns, I want to check if a value from column 4 appears in the second spreadsheet lastEdited_PEID; if it does, it would put 'Bingo!' in column 14 of the same row where the value was found lastEdited- one…
pawelty
  • 1,000
  • 8
  • 27
2
votes
3 answers

Are cell notes and color queryable with gspread?

I am trying to learn Python and this Google API thing, and I am wondering if cell notes and colors are queryable in gspread or in another form? If so, could someone please point me in the right direction or documentation? So far I have found two…
user3696118
  • 343
  • 3
  • 17
2
votes
0 answers

incompleteread error: I'm trying to read a spread sheet using gspread

I'm using get_all_values() function which some times throws an error content = worksheet.get_all_values() File "/usr/local/lib/python2.7/dist-packages/gspread/models.py", line 339, in get_all_values cells = self._fetch_cells() File…
ck reddy
  • 494
  • 7
  • 17
2
votes
1 answer

AttributeError: 'Spreadsheet' object has no attribute 'range'

Hi stackoverflow community, I am new to python. I want to edit a google spreadsheet using gspread. The following is the code I am using: import json import gspread from oauth2client.service_account import ServiceAccountCredentials json_key =…
Aman Baweja
  • 35
  • 1
  • 1
  • 4
2
votes
1 answer

Gspread keep alive after update google auth2

There are several examples for 'keep the connection with google spreadsheet alive' But all I found are based on the 'old' Google Sign-In system which isn't work anymore since april 2015 What is the proper methode to keep the connection with…
Richard de Ree
  • 2,329
  • 4
  • 30
  • 47
2
votes
1 answer

gspread populate google spreadsheet from python no attribute 'update_acell'

I'm stuckle all morning to fill a cell in a google spreadsheet from a python script. After running through a couple of out-dated tutorials I can open the spreadsheet, using this script import gspread from oauth2client.service_account import…
2
votes
1 answer

Python Gspread 401 error after a period of time

I am trying to write a program to grab stats i have recorded in google spreadsheets and write them to a text file to be read and displayed on a stream. The program works fine for the most part but every once in a while it crashes with the…
TheTrooble
  • 53
  • 9