Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hey Greg,
I've tried to adapt this code in order to get a bunch of files that begin with the letters 'zas', but I found the script just ran for hours without any luck, so I stripped it back to see what was happening.
I define my root and result:
root_path = '/MarketingCreative/External/Bidalgo_Zynga_CSR2/' result = dbx.files_list_folder(root_path, recursive=True)
And then I'm just printing the file name if its a file, and the folder name if it's a folder:
def process_entries(entries): for entry in entries: if isinstance(entry, dropbox.files.FileMetadata): file = entry.path_display.rsplit('/', 1)[1] print(file) else: print("Folder "+entry.path_display) process_entries(result.entries) while result.has_more: result = dbx.files_list_folder_continue(result.cursor) process_entries(result.entries)
Again, this is just to see why the script is taking so long with no results.
It seems that after the first few files, the script just keeps repeating the root folder, and not progressing the the subfolders (and files) within (see photos).
If I specific a sub folder in the root path, eg:
root_path = '/MarketingCreative/External/Bidalgo_Zynga_CSR2/C2_112118_2.1_FormulaItalia3_Trailer_VS_AlfaRomeo_[LOC]/' result = dbx.files_list_folder(root_path, recursive=True)
The script does what I need it to, but at this one level up, it seems to be an infinite loop.
How could I go about debugging this? Is it a cursor issue do you think?
Thanks
@IanHarker This issue is still open with engineering, but I don't have an update to share yet.
The team is reporting that this issue is now fixed and should be working properly.
Apologies for any inconvenience this may have caused, and thanks again for bringing this to our attention.
Hi there!
If you need more help you can view your support options (expected response time for a 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!