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

oauth2client.util error #166

Closed
je-vv opened this issue Nov 10, 2016 · 4 comments
Closed

oauth2client.util error #166

je-vv opened this issue Nov 10, 2016 · 4 comments

Comments

@je-vv
Copy link

je-vv commented Nov 10, 2016

With current release (0.14.8), the following oaut2client error is gotten when trying to mount:

...
File "/usr/lib/python2.7/site-packages/gdrivefs/gdtool/chunked_download.py", line > 22, in ChunkedDownload @oauth2client.util.positional(4)
AttributeError: 'module' object has no attribute 'util'

See the AUR user @nagyesz comment:

https://aur.archlinux.org/packages/gdrivefs

@je-vv
Copy link
Author

je-vv commented Nov 10, 2016

This (diff -Naur old new) patch provide by @nagyesz on AUR, fixes the issue:

--- GDriveFS-0.14.8_orig/gdrivefs/gdtool/chunked_download.py 2016-07-16 17:27:28.000000000 +0200
+++ GDriveFS-0.14.8/gdrivefs/gdtool/chunked_download.py 2016-11-10 15:58:06.000000000 +0100
@@ -2,7 +2,10 @@
import time
import random

-import oauth2client
+try:
\+ from oauth2client import util
+except ImportError:
\+ from oauth2client import _helpers as util
import apiclient.http
import apiclient.errors

@@ -19,7 +22,7 @@
that needs to be downloaded (not a request object, which doesn't apply here).
"""

\- @oauth2client.util.positional(4)
\+ @util.positional(4)
def __init__(self, fd, http, uri, chunksize=DEFAULT_CHUNK_SIZE, start_at=0):
"""Constructor.

@@ -43,7 +46,7 @@
self._sleep = time.sleep
self._rand = random.random

\- @oauth2client.util.positional(1)
\+ @util.positional(1)
def next_chunk(self, num_retries=0):
"""Get the next chunk of the download.

I can't fork to my github account since I already have a pull request with an older fork (to work around the multi threading python fuse issue on reads).

@asreimer
Copy link

A pull request (#175) that fixes this issue using @je-vv's patch was made months ago. I've tested and it definitely resolves the issue.

@dsoprea
Copy link
Owner

dsoprea commented Nov 29, 2017

Merged. Thanks for mentioning it.

@dsoprea dsoprea closed this as completed Nov 29, 2017
@dsoprea
Copy link
Owner

dsoprea commented Nov 29, 2017

Released and uploaded to PyPI as 0.14.9 .

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

No branches or pull requests

3 participants