You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
henrikstaaf
2 years agoExplorer | Level 3
accessing images from dropbox using python
Using Python, I am trying to download pictures from my dropbox app but I run into the following error message
"Error downloading file from Dropbox: [Errno 13] Permission denied:"
Here is ...
- 2 years ago
henrikstaaf, as seems your application is application folder application. You should take in mind that all paths are rooted in your application (its own) folder, not the account one (something you seem haven't done)! Try with a path like '/se/1bvt14' to list your folder. 😉
Hope this helps.
Здравко
2 years agoLegendary | Level 20
Hi henrikstaaf,
One possible thing is you have a real permission error, as stated in the message. If you try to read a local file and put it on the same place as 'local_download_path',... Did you try it? Or just try to save some dumb content there (instead of real content download from Dropbox), just to check if you're able save. If you change for a test you code to something like:
...
with open(local_file_path, 'wb') as f:
# response = dbx.files_download(path=dropbox_file_path)
response = b"Hello world!"
print(response)
f.write(response.content)
except Exception as e:
print('Error downloading file from Dropbox: ' + str(e))
what's going on 🤔... Or try to suspend the local write like:
...
if dbx:
# with open(local_file_path, 'wb') as f:
response = dbx.files_download(path=dropbox_file_path)
print(response)
# f.write(response.content)
except Exception as e:
print('Error downloading file from Dropbox: ' + str(e))
How changes the behavior in both cases? Where stops the error? 🧐
If I have to bet, your local path is malformed or incomplete. Check down this.
Hope this gives direction.
Add: Incomplete Dropbox path seems a logical version too or incorrectly set (or skip to set) namespace (if your account is a business one).
- henrikstaaf2 years agoExplorer | Level 3
However, In my latest code block, I don't even involve a local path and yet it's throwing an error. I am not that good at programming yet so perhaps I am just not understanding what you want me to try out? 😔
- Здравко2 years agoLegendary | Level 20
henrikstaaf, as seems your application is application folder application. You should take in mind that all paths are rooted in your application (its own) folder, not the account one (something you seem haven't done)! Try with a path like '/se/1bvt14' to list your folder. 😉
Hope this helps.
- henrikstaaf2 years agoExplorer | Level 3
Thank you for your help! I will try to implement what you said and solve the issue
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,883 PostsLatest Activity: 10 hours agoIf 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!