cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Python SDK ERROR

Explorer | Level 3

When I run following code

 

import dropbox
dbx = dropbox.Dropbox('ACCESS TOKEN REMOVE')
for entry in dbx.files_list_folder('').entries:
print(entry.name)

 

I got following error

 

Traceback (most recent call last): File "", line 1, in runfile('/home/naruto/Desktop/CPG/dropbox_test.py', wdir='/home/naruto/Desktop/CPG') File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile execfile(filename, namespace) File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "/home/naruto/Desktop/CPG/dropbox_test.py", line 11, in for entry in dbx.files_list_folder('').entries: File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/dropbox/base.py", line 715, in files_list_folder None, File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/dropbox/dropbox.py", line 234, in request timeout=timeout) File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/dropbox/dropbox.py", line 325, in request_json_string_with_retry timeout=timeout) File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/dropbox/dropbox.py", line 409, in request_json_string timeout=timeout, File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 535, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 488, in request resp = self.send(prep, **send_kwargs) File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 609, in send r = adapter.send(request, **kwargs) File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/requests/adapters.py", line 423, in send timeout=timeout File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 588, in urlopen timeout_obj = self._get_timeout(timeout) File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 303, in _get_timeout return Timeout.from_float(timeout) File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/urllib3/util/timeout.py", line 154, in from_float return Timeout(read=timeout, connect=timeout) File "/home/naruto/Apps/anaconda3/lib/python3.6/site-packages/urllib3/util/timeout.py", line 94, in __init__ self._connect = self._validate_timeout(connect, 'connect') File "/home/naruto/Apps/anaconda3/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.
2 Replies 2
Highlighted

Re: Python SDK ERROR

Explorer | Level 3

dropbox sdk 8.0.0

Highlighted

Re: Python SDK ERROR

Dropboxer
Dropboxer
This is a result of an issue in the requests library. It's been fixed in requests itself, so please update requests to the latest version (currently 2.18.1).

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?