One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
phyokyi
8 years agoExplorer | Level 3
Python SDK ERROR
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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 2 days ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!