Skip to content

Commit

Permalink
Update gfiles.py to handle the deprecation of apiclient library
Browse files Browse the repository at this point in the history
Do to the removal of the '__version__' attribute from apiclient by google (see discussion: googleapis/google-api-python-client#870), the line in gfiles.py 'from apiclient import discovery, errors' raises 'AttributeError: module 'googleapiclient' has no attribute '__version__'. Per the discussion referenced above, the preferred implementation is now to import from googleapiclient, instead of apiclient, and I've validated that this resolves the error.

To replicate the issue, run  df2gspread.upload() with valid parameters and the AttributeError will be raised.
  • Loading branch information
JoelSharp committed May 14, 2020
1 parent f14da35 commit e9b7191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion df2gspread/gfiles.py
Expand Up @@ -10,7 +10,7 @@
import re
from httplib2 import Http

from apiclient import discovery, errors
from googleapiclient import discovery, errors
import gspread

from .utils import logr
Expand Down

0 comments on commit e9b7191

Please sign in to comment.