We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
_shintaku_
3 years agoExplorer | Level 3
I can't access newly created folders via API
I am using Dropbox for Python (https://dropbox-sdk-python.readthedocs.io/en/latest/index.html). However, I realized that the script doesn't retrieve newly created folders. The script is like this....
client = dropbox.Dropbox(DROPBOX_ACCESS_TOKEN)
file_list = client.files_list_folder(r'', recursive=True )
myfolders = [x.name for x in file_list.entries if 'size' not in dir(x)]
print(myfolders)
This script gave the same problem on both 'App folder' and 'Full Dropbox' as suggested on this thread: https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-can-t-see-new-files-in-APP-folder/td-p/352584
Hi _shintaku_,
Did you try to continue pagination using 'files_list_folder_continue'? 🧐 If not, give it a try. 😉
By the way.. 'if 'size' not in dir(x)' ..statement is not very stable. Better use 'type(x) is '...
Hope this helps.
- ЗдравкоLegendary | Level 20
Hi _shintaku_,
Did you try to continue pagination using 'files_list_folder_continue'? 🧐 If not, give it a try. 😉
By the way.. 'if 'size' not in dir(x)' ..statement is not very stable. Better use 'type(x) is '...
Hope this helps.
- _shintaku_Explorer | Level 3
Thank you @Здравко, you solution solved it.
- Greg-DBDropbox Staff
_shintaku_ You're not guaranteed to get everything back in one call to files_list_folder, so as Здравко indicated, make sure you implement files_list_folder_continue in addition to files_list_folder as documented.
Also, here's an example of how you can check the type of a Metadata object.
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 7 days 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!