krasalexander
krasalexander

Reputation: 77

Python Dropbox Core API: TypeError when completing authorization

I'm using manual on https://www.dropbox.com/developers/core/start/python . Have made everything equal to manual, including creation of my app in account, copy-past of app keys, allowing to use the app using the key (in fact I open the link in my browser, click allow and copy confirmation code). After this, I want to finish authorization, but I get such error text:

    >>> access_token, user_id = flow.finish(code)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/dropbox/client.py", line 1233, in finish
    return self._finish(code, None)
  File "/usr/local/lib/python2.7/dist-packages/dropbox/client.py", line 1101, in _finish
    response = self.rest_client.POST(url, params=params)
  File "/usr/local/lib/python2.7/dist-packages/dropbox/rest.py", line 316, in POST
    return cls.IMPL.POST(*n, **kw)
  File "/usr/local/lib/python2.7/dist-packages/dropbox/rest.py", line 254, in POST
    post_params=params, headers=headers, raw_response=raw_response)
  File "/usr/local/lib/python2.7/dist-packages/dropbox/rest.py", line 218, in request
    preload_content=False
  File "/usr/lib/python2.7/dist-packages/urllib3/poolmanager.py", line 112, in urlopen
    conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)
  File "/usr/lib/python2.7/dist-packages/urllib3/poolmanager.py", line 84, in connection_from_host
    pool = pool_cls(host, port, **self.connection_pool_kw)
TypeError: __init__() got an unexpected keyword argument 'ssl_version'

P.S. Flow object is alive => http://screencloud.net/v/nDi0

Upvotes: 0

Views: 420

Answers (1)

alko
alko

Reputation: 48317

Is seems you use urllib3 version 1.5 or older. Upgrade it to 1.6 or 1.7.

Upvotes: 1

Related Questions