-
Notifications
You must be signed in to change notification settings - Fork 273
PyDrive not working with oauth2client version 4.0 #78
Comments
Thank you for posting this here :) Could you please post instructions on how to reproduce the error, and a traceback? |
Hey, i also have the same problem. At the beginning i try to run the code on windows, and it worked. But when i try to run the code on my raspberry pi (OS raspbian) the code show me error about symboliclink. i run this code from pydrive.auth import GoogleAuth
gauth = GoogleAuth()
gauth.LocalWebserverAuth() import error : oauth2client.file.CredentialsFileSymbolicLinkError not found error i follow the same instruction on authentication page auth page when i try on windows and raspbian. |
@purbayasetiya Thank you for the details! The problem is that PyDrive relies on google-api-python-client which in turn relies on oauth2client. PyDrive now needs to be compatible with oauth2client 4.0.0. If either of you, @purbayasetiya and @dwai1714, need this urgently, replace lines 307-311 in auth.py with: try:
storage = Storage(credentials_file)
self.credentials = storage.locked_get()
except IOError:
raise InvalidCredentialsError('Credentials file cannot be symbolic link') and remove line 15: from oauth2client.file import CredentialsFileSymbolicLinkError I have not tested this yet. Let me know how you get on! |
Hi Robin
To: googledrive/PyDrive [email protected] @purbayasetiya Thank you for the details!The problem is that PyDrive relies on google-api-python-client which in turn relies on oauth2client. |
Related - Getting below when trying to run anything out of pydrive.auth
Based on discussion on the pydrive issues forum util has been merged into the "private" _helpers module. editing the auth file to read
seems to fix the issue |
Status update? I know the IOError replacement is only a stop-gap. What needs to be checked for oauth2client 4.0.0 compatibility from a testing standpoint? |
The current pydrive seems to be compatible with this older google api python client package. I've not tested though. |
Quick update: The plan is to add the oauth dependency explicitly to setup.py*, fix incompatibilities until all tests pass. I will not be able to do this in the next days. If any of you have time to fix these errors (which would be amazing), I will review PRs asap (<24hrs). *i.e. in setup(
...
install_requires=[
"google-api-python-client >= 1.2",
"oauth2client >= 4.0.0", # This line needs to be added.
"PyYAML >= 3.0",
],
...
) |
@keliomer thank you so much for the PR. I have reviewed and merged it (although GitHub doesn't seem to recognize it 😞). I'll leave this issue open until the new version is pushed to PyPI. |
Alright, the new version is live on PyPI - crises averted. Thank you again for all of your input! |
This works great now. |
File "/opt/python/run/venv/lib/python2.7/site-packages/pydrive/auth.py", line 224, in LocalWebserverAuth |
Link googlearchive/PyDrive#78 Fixes `ImportError: cannot import name CredentialsFileSymbolicLinkError`
oauth2client.file.CredentialsFileSymbolicLinkError not found error
The text was updated successfully, but these errors were encountered: