Gautier / bitbucket-sync

bitbucket-sync synchronize locally all the repositories of a bitbucket account
MIT License
12 stars 6 forks source link

error: GET/HEAD requests should not include body #1

Closed vlcinsky closed 10 years ago

vlcinsky commented 10 years ago

Trying to call the command I get an error:

$ bitbucket-sync --account vlcinsky --directory . --key  xxxKEYxx --secret  xxSECRETxx
Traceback (most recent call last):
  File "/home/javl/Envs/bitbucket-sync/bin/bitbucket-sync", line 9, in <module>
    load_entry_point('bitbucket-sync==0.1.1', 'console_scripts', 'bitbucket-sync')()
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/bitbucket_sync/main.py", line 55, in main
    response = requests.get(deploy_keys_resource, auth=oauth)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/api.py", line 65, in get
    return request('get', url, **kwargs)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/safe_mode.py", line 39, in wrapped
    return function(method, url, **kwargs)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/api.py", line 51, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/sessions.py", line 241, in request
    r.send(prefetch=prefetch)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/models.py", line 521, in send
    r = self.auth(self)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests_oauthlib/core.py", line 61, in __call__
    unicode(r.full_url), unicode(r.method), r.data, r.headers)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/oauthlib/oauth1/rfc5849/__init__.py", line 274, in sign
    raise ValueError('GET/HEAD requests should not include body.')
ValueError: GET/HEAD requests should not include body.

Installed packages (using virtualenv):

$ pip freeze
-f /home/javl/.pip/packages
argparse==1.2.1
bitbucket-sync==0.1.1
docopt==0.5.0
oauthlib==0.6.0
requests==0.14.2
requests-oauthlib==0.2.0
wsgiref==0.1.2

Using Ubuntu 13.04

$ python
Python 2.7.4 (default, Sep 26 2013, 03:20:26) 
[GCC 4.7.3] on linux2
Gautier commented 10 years ago

Hi Jan,

sorry for the slow response I was actually in Prague last week when I received your issue. It's good to know some-one else is using this tool!

After replicating your issue I've updated requests and requests-oauthlib to more recent versions and this seemed to work nicely. The new version of bitbucket-sync is on pypi.

Please note that the --account option has been removed as it wasn't actually used.

Gautier

vlcinsky commented 10 years ago

Hi Gautier. I hope, you enjoyed your stay in Prague.

I can confirm, reported issue is resolved.

Anyway, I have some following crashes, which will come to another ticket.

Thanks for your effort, I hope, your tool may help me making backups of our repos on Bitbucket.

Jan