We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
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.
Greg-DB
Dropbox Staff
It sounds like that's occurring on the 'open' call for your local filesystem, not a Dropbox API call itself. Make sure you're providing the right 'local_file_path' and have permission to the specified path.
By the way, files_download returns a tuple, not a single object. You can find an example here and the documentation here. Alternatively, you can use files_download_to_file as shown here.
henrikstaaf
2 years agoExplorer | Level 3
Hi Greg
Thank you for your reply. I have been doing some troubleshooting and I have reduced my code sequentially to understand where the problem lies: Currently, I have the following code:
ACCESS_TOKEN = "MY_SECRET_TOKEN"
# Initialize the Dropbox client
dbx = dropbox.Dropbox(ACCESS_TOKEN)
dropbox_folder_path = '/Apps/provapp_images/se/1bvt14'
folder_metadata = dbx.files_list_folder(path=dropbox_folder_path)
Notice that I have double-checked the Access token and the path. I am including a screenshot of the path further below. Anyway, I encountered the following error message:
Traceback (most recent call last):
File "C:\Users\staaf\OneDrive\Skrivbord\testparser\test.py", line 10, in <module>
folder_metadata = dbx.files_list_folder(dropbox_folder_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\staaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\dropbox\base.py", line 2145, in files_list_folder
r = self.request(
^^^^^^^^^^^^^
File "C:\Users\staaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\dropbox\dropbox_client.py", line 351, in request
raise ApiError(res.request_id,
dropbox.exceptions.ApiError: ApiError('04e0554c02a240b0939a7f63ca6a00e8', ListFolderError('path', LookupError('not_found', None)))
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 24 minutes 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!