Open molinav opened 4 years ago
It can be bypassed by forcing google-api-python-client
to be lower than 1.5.0, replacing
'google-api-python-client >= 1.2',
with
'google-api-python-client >= 1.2, < 1.5.0',
in the setup.py
file. After doing this, although the dependencies are installed correctly, I get the following error when executing gsync
:
vic@thinkpad:/home/vic/github/gsync$ gsync
Traceback (most recent call last):
File "/home/vic/github/gsync/bin/gsync", line 17, in <module>
from libgsync.crawler import Crawler
File "/home/vic/github/gsync/libgsync/crawler.py", line 12, in <module>
from libgsync.sync import Sync
File "/home/vic/github/gsync/libgsync/sync/__init__.py", line 11, in <module>
from libgsync.drive.mimetypes import MimeTypes
File "/home/vic/github/gsync/libgsync/drive/__init__.py", line 24, in <module>
import oauth2client.util
ImportError: No module named util
because the default version installed for oauth2client
is 4.1.3, and the subpackage util
does not exist since version 4.0.0. So, similarly, in the setup.py
I needed to replace:
'oauth2client >= 1.1',
with
'oauth2client >= 1.1, < 4.0.0',
By the way, when fixing this dependency inconsistency I could realise that it is necessary to set the maximum version of httplib2
to 0.15.0, otherwise the uploads fail with an error that is hidden by the try-except clause located at Line 880 in libgsync/drive/__init__.py
. If I comment this try-except clause, the error raised is the following:
Error: RedirectMissingLocation('Redirected but the response is missing a Location: header.',)
which after some research it sent me to a discussion in StackOverflow in which it is explained with detail why google-api-python-client
is incompatible with httplib2>=0.16.0
.
The current
setup.py
inmaster
branch provides a dependency configuration that is inconsistent, so a manual installation will fail if the user has an old version ofhttplib2
, e.g. 0.9.2:Here it is the complete traceback:
from which this is the relevant part: