Open philiprhoades opened 9 years ago
I think I might be encountering the same issue. I, actually, cloned the git repo into git/gsync (to have the latest code), then installed on my PC-BSD (FreeBSD) system with: sudo pip install -e git/gsync
I enter the retrieved token and the prompt returns after: gsync --authorize . . . and I see the .gsync config directory is created.
When I run gsync, as below, I get prompted again with: "Authorization is required to access your Google Drive."
gsync -vr drive://a_folder /full/path/to/local/folder
After getting and entering another code, I get the same prompt again.
I put a print statement to verify the token text gotten from raw_input() was what I had typed in, because I swear I had some issue with that in the past (strange characters, or cut and paste issues, or . . .). But it was what I had entered.
I wondered if you hit your limit on your Google API key, so I enabled the drive API in my developer's console, and created my own key. I downloaded and copied to client.json, in .gsync. But I still got the same error.
Another thing: .gsync/credentials is an empty file. If the authorization is successful, shouldn't that "cache" info?
i have same problem too.
DEBUG: FlowExchangeError('invalid_grantCode was already redeemed.',): invalid_grantCode was already redeemed. DEBUG: FlowExchangeError('invalid_grantCode was already redeemed.',): File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/EGG-INFO/scripts/gsync", line 82, in main Crawler(src, dest).run() File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/crawler.py", line 76, in init info = self._drive.stat(self._dst) File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/drive/init.py", line 668, in stat ents = self._query(parent_id=parent_id) File "/usr/lib/python2.6/site-packages/retrying-1.3.3-py2.6.egg/retrying.py", line 49, in wrapped_f return Retrying(_dargs, _dkw).call(f, _args, _kw) File "/usr/lib/python2.6/site-packages/retrying-1.3.3-py2.6.egg/retrying.py", line 212, in call raise attempt.get() File "/usr/lib/python2.6/site-packages/retrying-1.3.3-py2.6.egg/retrying.py", line 247, in get six.reraise(self.value[0], self.value[1], self.value[2]) File "/usr/lib/python2.6/site-packages/retrying-1.3.3-py2.6.egg/retrying.py", line 200, in call attempt = Attempt(fn(_args, _kwargs), attempt_number, False) File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/drive/init.py", line 936, in _query with self.service() as service: File "/usr/lib64/python2.6/contextlib.py", line 16, in enter return self.gen.next() File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/drive/init.py", line 347, in service credentials = self._obtain_credentials() File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/drive/init.py", line 491, in _obtain_credentials credentials = flow.step2_exchange(code) File "/usr/lib/python2.6/site-packages/oauth2client/util.py", line 137, in positional_wrapper return wrapped(_args, _kwargs) File "/usr/lib/python2.6/site-packages/oauth2client/client.py", line 2014, in step2_exchange raise FlowExchangeError(error_msg)
gsync: invalid_grantCode was already redeemed. gsync error: FlowExchangeError at drive(491) [client=0.1.14]
gsync will be perfect for me if I can get it working! - Many thanks for doing it!
I see there is a forward slash as the second character in the code - could that be causing the problem?
Thanks,
Phil.