In Jupyter notebook module 'gspread' has no attribute 'authorize'
See original GitHub issueIm getting the above error when trying to use gspread from a jupyter notebook.
Environment info
Operating System: windows 10 Python version: 3.5.2 gspread version: 0.6.2 installed from pip
My code
import gspread
from oauth2client.service_account import ServiceAccountCredentials
scope = ['https://spreadsheets.google.com/feeds']
credentials = ServiceAccountCredentials.from_json_keyfile_name(r'C:\Users\james\mykey.json', scope)
gc = gspread.authorize (credentials)
This results in:
AttributeError Traceback (most recent call last)
<ipython-input-109-71ba1615f471> in <module>()
4 scope = ['https://spreadsheets.google.com/feeds']
5 credentials = ServiceAccountCredentials.from_json_keyfile_name(r'C:\Users\james\VividVision-5b8596511cfc.json', scope)
----> 6 gc = gspread.authorize (credentials)
7
8 #gc = client.open_by_key ('Gardening Data')
AttributeError: module 'gspread' has no attribute 'authorize'
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
AttributeError: module 'gspread' has no attribute 'open_by_key'
I am trying to access a spreadsheet from python using gspread, but keep getting an attribute error. open_by_url ...
Read more >gspread Documentation - Read the Docs
Simple authentication with OAuth. gspread.auth.authorize(credentials, client_factory=<class gspread.client.Client>). Login to Google API using ...
Read more >Release 3.7.0 Anton Burnashev - gspread Documentation
A service account is a special type of Google account intended to represent a non-human user that needs to authenticate and be authorized...
Read more >AttributeError: partially initialized module has no attribute ...
The solution is not to name the Python file the same as any of the modules being imported in that Python file. Related....
Read more >gspread worksheet.update error : r/learnpython - Reddit
AttributeError: 'Worksheet' object has no attribute 'update' ... (most recent call last) <ipython-input-132-e085af26b2ed> in <module>() 21 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do you have any files named
gspread.py
or directory calledgspread
in your working directory?[‘Cell’, ‘CellNotFound’, ‘Client’, ‘GSpreadException’, ‘IncorrectCellLabel’, ‘NoValidUrlKeyFound’, ‘Spreadsheet’, ‘SpreadsheetNotFound’, ‘Worksheet’, ‘WorksheetNotFound’, ‘author’, ‘builtins’, ‘cached’, ‘doc’, ‘file’, ‘loader’, ‘name’, ‘package’, ‘path’, ‘spec’, ‘version’, ‘authorize’, ‘client’, ‘exceptions’, ‘models’, ‘urls’, ‘utils’] 3.0.1 on google colab
[‘Cell’, ‘CellNotFound’, ‘Client’, ‘GSpreadException’, ‘IncorrectCellLabel’, ‘NoValidUrlKeyFound’, ‘Spreadsheet’, ‘Spreadsh eetNotFound’, ‘Worksheet’, ‘WorksheetNotFound’, ‘author’, ‘builtins’, ‘cached’, ‘doc’, ‘file’, ‘loade r’, ‘name’, ‘package’, ‘path’, ‘spec’, ‘version’, ‘auth’, ‘authorize’, ‘client’, ‘exceptions’, ‘model s’, ‘oauth’, ‘service_account’, ‘urls’, ‘utils’] 3.6.0 on IDE