Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
dlevy
12 months agoNew member | Level 1
Slow response using Dropbox for Python
Hello,
My python code has been working well for months. Within the past 48 hours, the files_download command in the snippet below (with tokens obfuscated) has started to take about 45 seconds while previously it was instantaneous. It is the last line that is the culprit.
import dropbox
DROPBOX_APP_KEY = "?????"
DROPBOX_APP_SECRET = "?????"
DROPBOX_REFRESH_TOKEN = "????"
dbx = dropbox.Dropbox(app_key=DROPBOX_APP_KEY,
app_secret=DROPBOX_APP_SECRET,
oauth2_refresh_token=DROPBOX_REFRESH_TOKEN)
metadata, f = dbx.files_download('/alerts.csv')
Any suggestions?
With thanks,
David
6 Replies
- DB-Des12 months ago
Dropbox Community Moderator
Hi dlevy,
Download speeds can be influenced by a variety of factors, including network conditions, server load, or local configurations.
Sometimes resetting or retrying your connection gets you a different route and better speeds, but that is outside of our control. - dlevy12 months agoNew member | Level 1
Thanks. The download is instantaneous when I use Windows Explorer, for example. It is only with the Python wrapper over the Dropbox app that I have issues. I've tried this on different computers, networks, etc. with the same result.
- DB-Des12 months ago
Dropbox Community Moderator
Large files, file corruption or mismanagement of file chunks could also contribute to the change in download speeds.
It’s important to note that the Dropbox website and application may use different mechanisms and infrastructure for various pieces of functionality compared to the API. As such, comparing behavior and results between these platforms may result in inconsistencies.
- dlevy12 months agoNew member | Level 1
Thanks for letting me know about the different mechanisms. The file is tiny, just 258 bytes of text.
- DB-Des12 months ago
Dropbox Community Moderator
I’ve been unable to replicate the issue reported on my end, but below are a few troubleshooting steps that may help identify the cause:
- Check if any proxies, firewalls, VPNs, or similar network configurations are in use on the affected computers. These can sometimes interfere with the connection.
- Investigate whether you can get more visibility into the issue. For example, is there an option to enable more verbose logging or detailed output in your setup? Alternatively, you could try reproducing the issue using a tool like curl to observe the raw request and response.
- dlevy12 months agoNew member | Level 1
No proxies, firewalls, or VPNs.
I don't want to dig inside the Python API for Dropbox. I'm going to skip downloading the file each time and just read the local copy in
C:\Users\xxxxx\Dropbox\...
The file changes rarely, so this suits my needs.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!