gspread icon indicating copy to clipboard operation
gspread copied to clipboard

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

Open johangarzon opened this issue 8 years ago • 2 comments

Environment info

Operating System: Ubuntu 16.04 LTS Python version: 2.7.6 gspread version: 3.0.1

Steps to reproduce

import gspread
try:
     login = SignedJwtAssertionCredentials(email, key, scope)
     login = gspread.authorize(login)

        return login
     except gspread.AuthenticationError as e:
        self.logger.error(e)
        exit(1)

2). Also check:

for x in dir(gspread):
    print x
...
Cell
CellNotFound
Client
GSpreadException
IncorrectCellLabel
NoValidUrlKeyFound
Spreadsheet
SpreadsheetNotFound
Worksheet
WorksheetNotFound
__author__
__builtins__
__doc__
__file__
__name__
__package__
__path__
__version__
authorize
client
exceptions
models
urls
utils

Stack trace or other output that would be helpful

Traceback (most recent call last): File "/script_load.py", line 23, in gdoc_data = gdoc.retrieve_data() File "/gdocs.py", line 67, in retrieve_data worksheet = self._login().open_by_key(self.spreadsheet_key) File "/gdocs.py", line 60, in _login except gspread.AuthenticationError as e: AttributeError: 'module' object has no attribute 'AuthenticationError'

johangarzon avatar Aug 02 '18 12:08 johangarzon

Not an issue in general but would be nice to keep the authentication exception available.

johangarzon avatar Aug 02 '18 13:08 johangarzon

This function does not exists anymore. It does not apply anymore the new API does not need to login before.

Closing this issue.

lavigne958 avatar May 24 '21 19:05 lavigne958