Learn how to make the most out of the Dropbox Community here 💙.
Forum Discussion
Apollonius
7 years agoExplorer | Level 4
Error while uploading a zip file using Python script
I'm trying to write a Python script where there would be a list of "paths" to files and they would serially be uploaded to my Dropbox. I thought of uploading a directory as a Zip archive if the ...
- 7 years ago
Thanks for the report! This appears to be an issue when using the Dropbox Python SDK with Python 3. We're looking into it.
As a workaround, please try setting an unlimited timeout when constructing your Dropbox client, like this:
dropbox.Dropbox(TOKEN, timeout=None)
Please let me know if that does or doesn't help.
Apollonius
7 years agoExplorer | Level 4
Thanks, that did the trick...
But my script took 7 mins and 1.372 seconds. I guess that's to be expected given that the zip file is around 90 MB and I have a 250 kilobyte per sec broadband connection...
I'm curious though, is it because of Python 3 that larger files get "timed out" errors by default and I have to erase that limit by using timeout=None?
But my script took 7 mins and 1.372 seconds. I guess that's to be expected given that the zip file is around 90 MB and I have a 250 kilobyte per sec broadband connection...
I'm curious though, is it because of Python 3 that larger files get "timed out" errors by default and I have to erase that limit by using timeout=None?
Greg-DB
Dropbox Staff
7 years agoGreat, thanks for confirming that.
Yes, between Python 2 and Python 3 there appears to be a change in behavior that results in this issue when using a non-None timeout. We're looking into it, but for now that workaround is required to avoid this issue.
Yes, between Python 2 and Python 3 there appears to be a change in behavior that results in this issue when using a non-None timeout. We're looking into it, but for now that workaround is required to avoid this issue.
- Apollonius7 years agoExplorer | Level 4
Got it!:slight_smile:
If you don't mind, is there any way so that I can know that this issue has been fixed so that I can update my code?- Greg-DB7 years ago
Dropbox Staff
I'll be sure to follow up here once I have an update on this issue.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,963 PostsLatest Activity: 11 hours 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!