pyraxic Helpful | Level 6

Comments

  • I don't have an example but if you follow the documentation from dropbox, it should walk you through it.
  • Awesome! That works. Thank you
  • Here is my code. dbx = dropbox.Dropbox(oauth_result.access_token) result = dbx.files_list_folder("", recursive=True) flist = [] def process_entries(entries): for entry in entries: if isinstance(entry, dropbox.files.FileMetadata): flist.append(entry.name)…
  • I figured it out. It seems that I need to enter the remote path name. For example, if I have a folder named "Camera", it should use /Camera/filename. But how do I get the list of folder name and files under that folder name (if I have multiple folders)? I could use files_list_folder which gives me the list of files but how…
  • Seems like I was missing a leading "/" from my command but now it gives another error. for dfiles in flist: dbx.files_download_to_file('/Users/fela/Downloads/dropbox/'+dfiles, '/'+dfiles, rev=None) Error: ApiError at /dropbox_auth_finish ApiError('41b9e1718f4f92d51231197741ac31d5', DownloadError('path',…
  • Thank you!! It works.
  • I even changed that to outside of loop but same results. It doesn't seem to be getting to the while loop at all.
  • Even putting it outside of while loop didn't make any difference. m2 = dbx.files_list_folder_continue(cur) while m2.has_more == True: for i in m2.entries: if isinstance(i, dropbox.files.FileMetadata): flist.append(i.name) cur = m2.cursor m2 = dbx.files_list_folder_continue(cur) return render(request,…
  • Hi Greg, files_list_folders_continue() is already outside of the while loop. m2 = dbx.files_list_folder_continue(cur) while m2.has_more == True: for i in m2.entries: if isinstance(i, dropbox.files.FileMetadata): flist.append(i.name) cur = m2.cursor m2 = dbx.files_list_folder_continue(cur)
  • I am getting 4149 from dropbox web gui. I only have one folder called "/Camera". I selected all files and it shows that there are 4149 files in that folder. Even if I try to use the code metadata = dbx.files_list_folder("/Camera", recursive=True) It still shows 3998 files.
  • Okay, so I tried importing all the modules required to run this script as below and there are no errors. from dropbox import DropboxOAuth2Flow, oauth import http_status from flask import flash APP_KEY = 'mykey' APP_SECRET = 'mysecretkey' def get_dropbox_auth_flow(web_app_session): redirect_uri =…