One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
andrwfrost
6 years agoNew member | Level 2
Dropbox API Error when downloading image to raspi
Hi guys, im a total noob in this kind of topic. I got an error messages when i try to download an image from my dropbox with api key.
This is the code:
import dropbox
dbx = dropbox.Dropbox("orHc3wTGXpAAAAAAAAAAftTm4_Z......")
dropboxPath = "/"
filename='picked_image1981016614414776853.jpg'
dbx.files_download_to_file("Copy of "+filename, dropboxPath+filename)
And this is the error message:
sudo python3 tesdownload.py
Traceback (most recent call last):
File "tesdownload.py", line 7, in <module>
dbx.files_download_to_file("Copy of "+filename, dropboxPath+filename)
File "/usr/local/lib/python3.5/dist-packages/dropbox/base.py", line 1141, in files_download_to_file
None,
File "/usr/local/lib/python3.5/dist-packages/dropbox/dropbox.py", line 296, in request
user_message_locale)
dropbox.exceptions.ApiError: ApiError('9aef17aad8ae453cea278550b962d978', DownloadError('path', LookupError('not_found', None)))
Can anyone help me with this one pls, im a complete noob :(
- Greg-DB
Dropbox Staff
This 'not_found' error indicates that "There is nothing at the given path". That is referring to the remote path on Dropbox for the file you requested to download.
For the 'files_download_to_file' method, that's the second parameter, to which you are supplying the path "/picked_image1981016614414776853.jpg" according to this code.
Are you sure that's the correct path? Note that if that access token is for a "Full Dropbox" app, the path should be the full path to the file, relative to the Dropbox folder, including any/all parent folders. If the access token is for an "app folder" app, the path should only be relative to the app folder itself.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,945 PostsLatest Activity: 7 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!