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

Timeout value error on flow.finish #106

Closed
grzekru opened this Issue May 28, 2017 · 5 comments

Comments

Projects
None yet
4 participants
@grzekru

grzekru commented May 28, 2017

Python 2.7.13
urllib3==1.21.1
requests==2.16.5
requests-oauthlib==0.8.0
requests-toolbelt==0.8.0

Works good on older requests version

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/site-packages/dropbox/oauth.py", line 239, in finish
return self._finish(code, None)
File "/usr/lib/python2.7/site-packages/dropbox/oauth.py", line 119, in _finish
resp = self.requests_session.post(url, data=params)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 570, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 523, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 587, in urlopen
timeout_obj = self._get_timeout(timeout)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 302, in _get_timeout
return Timeout.from_float(timeout)
File "/usr/lib/python2.7/site-packages/urllib3/util/timeout.py", line 154, in from_float
return Timeout(read=timeout, connect=timeout)
File "/usr/lib/python2.7/site-packages/urllib3/util/timeout.py", line 94, in init
self._connect = self._validate_timeout(connect, 'connect')
File "/usr/lib/python2.7/site-packages/urllib3/util/timeout.py", line 127, in _validate_timeout
"int, float or None." % (name, value))
ValueError: Timeout value connect was Timeout(connect=None, read=None, total=None), but it must be an int, float or None.

@573

This comment has been minimized.

Show comment
Hide comment
@573

573 May 28, 2017

Same here:

$ pip freeze ¦ grep dropbox
appdirs==1.4.3
certifi==2017.4.17
chardet==3.0.3
dropbox==6.9.0
git-remote-dropbox==0.2.4
idna==2.5
louis==3.0.0
packaging==16.8
pygobject==3.24.1
pyparsing==2.2.0
pyxdg==0.25
requests==2.16.5
six==1.10.0
team==1.0
typing==3.6.1
urllib3==1.21.1

>>> dbx.users_get_current_account()
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/urllib3/util/timeout.py", line 124, in _validate_timeout
float(value)
TypeError: float() argument must be a string or a number, not 'Timeout'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.6/site-packages/dropbox/base.py", line 2701, in users_get_current_account
None,
File "/usr/lib/python3.6/site-packages/dropbox/dropbox.py", line 249, in request
timeout=timeout)
File "/usr/lib/python3.6/site-packages/dropbox/dropbox.py", line 341, in request_json_string_with_retry
timeout=timeout)
File "/usr/lib/python3.6/site-packages/dropbox/dropbox.py", line 417, in request_json_string
timeout=timeout,
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 570, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 523, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 587, in urlopen
timeout_obj = self._get_timeout(timeout)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 302, in _get_timeout
return Timeout.from_float(timeout)
File "/usr/lib/python3.6/site-packages/urllib3/util/timeout.py", line 154, in from_float
return Timeout(read=timeout, connect=timeout)
File "/usr/lib/python3.6/site-packages/urllib3/util/timeout.py", line 94, in init
self._connect = self._validate_timeout(connect, 'connect')
File "/usr/lib/python3.6/site-packages/urllib3/util/timeout.py", line 127, in _validate_timeout
"int, float or None." % (name, value))
ValueError: Timeout value connect was Timeout(connect=30, read=30, total=None), but it must be an int, float or None.

573 commented May 28, 2017

Same here:

$ pip freeze ¦ grep dropbox
appdirs==1.4.3
certifi==2017.4.17
chardet==3.0.3
dropbox==6.9.0
git-remote-dropbox==0.2.4
idna==2.5
louis==3.0.0
packaging==16.8
pygobject==3.24.1
pyparsing==2.2.0
pyxdg==0.25
requests==2.16.5
six==1.10.0
team==1.0
typing==3.6.1
urllib3==1.21.1

>>> dbx.users_get_current_account()
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/urllib3/util/timeout.py", line 124, in _validate_timeout
float(value)
TypeError: float() argument must be a string or a number, not 'Timeout'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.6/site-packages/dropbox/base.py", line 2701, in users_get_current_account
None,
File "/usr/lib/python3.6/site-packages/dropbox/dropbox.py", line 249, in request
timeout=timeout)
File "/usr/lib/python3.6/site-packages/dropbox/dropbox.py", line 341, in request_json_string_with_retry
timeout=timeout)
File "/usr/lib/python3.6/site-packages/dropbox/dropbox.py", line 417, in request_json_string
timeout=timeout,
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 570, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 523, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 587, in urlopen
timeout_obj = self._get_timeout(timeout)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 302, in _get_timeout
return Timeout.from_float(timeout)
File "/usr/lib/python3.6/site-packages/urllib3/util/timeout.py", line 154, in from_float
return Timeout(read=timeout, connect=timeout)
File "/usr/lib/python3.6/site-packages/urllib3/util/timeout.py", line 94, in init
self._connect = self._validate_timeout(connect, 'connect')
File "/usr/lib/python3.6/site-packages/urllib3/util/timeout.py", line 127, in _validate_timeout
"int, float or None." % (name, value))
ValueError: Timeout value connect was Timeout(connect=30, read=30, total=None), but it must be an int, float or None.

@greg-db

This comment has been minimized.

Show comment
Hide comment
@greg-db

greg-db May 29, 2017

Thanks for writing in. We're looking into it.

It looks like this started with some recent changes to the requests library, so as a workaround you can downgrade to requests v2.15.1.

greg-db commented May 29, 2017

Thanks for writing in. We're looking into it.

It looks like this started with some recent changes to the requests library, so as a workaround you can downgrade to requests v2.15.1.

@greg-db

This comment has been minimized.

Show comment
Hide comment
@greg-db

greg-db May 29, 2017

It looks like this is fixed in requests v2.17.1, so please update to that and let me know if you're still seeing any issues.

greg-db commented May 29, 2017

It looks like this is fixed in requests v2.17.1, so please update to that and let me know if you're still seeing any issues.

@greg-db greg-db closed this May 29, 2017

@573

This comment has been minimized.

Show comment
Hide comment
@573

573 May 30, 2017

Thanks @greg-db upgrading to requests==2.17.1 works. Confirmed.

573 commented May 30, 2017

Thanks @greg-db upgrading to requests==2.17.1 works. Confirmed.

@Susairaj

This comment has been minimized.

Show comment
Hide comment
@Susairaj

Susairaj Sep 22, 2017

Thank you.....it works

Susairaj commented Sep 22, 2017

Thank you.....it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment