Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gfiles.py to handle the deprecation of apiclient library #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JoelSharp
Copy link

Due 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.

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.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 29.245% when pulling e9b7191 on JoelSharp:patch-1 into f14da35 on maybelinot:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants