I am trying to connect to Dropbox to read in a csv into my python program. I can currently connect, but I can't access the folder I want to access. I configured my app to have all access. When I click on "All Files" in Dropbox Desktop, I currently have two folder there- We'll call them Folder 1 and Folder 2. I want to access a file within Folder 2, which is a Team folder. We do not have Team Space as far as I can tell but I could be wrong ,if that's applicable.
My code looks like this:
try:
dropbox_file_path = ''
# connect to dropbox using member id
dbx = dropbox.DropboxTeam(os.getenv('DROPBOX_TOKEN')).as_user(member_id)
# list all the files from the folder
result = dbx.files_list_folder(dropbox_file_path, recursive=False)
# print entries
for entry in result.entries:
print(entry.name)
except Exception as e:
print(e)
This code works just fine, but it only prints out the file/folder names within Folder 1. As you can see, my path is an empty string, which should point it to my root. Is there a reason I can't see or access the other folder? I have admin access to Folder 2. It behaves as though that folder doesn't exist and Folder 1 is my root folder. I thought the "All Files" link in dropbox would take me to my root, which would mean Folder 1 and Folder 2 would be children of it, but it doesn't seem to think so. How can I access the correct files?
I get a LookupError when I try to access the file I want since it can't get into that folder.