Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
RCR
9 years agoExplorer | Level 3
Python SDK constant errors
Trying to make a small app that will read a pair of files from a dropbox folder and compile a small database from them. Just getting started, following the sample but I keep getting errors of differe...
- 9 years agoIt looks like the ValueError issue is fixed in requests v2.17.1, so please update to that and let me know if you're still seeing any issues.
Greg-DB
Dropbox Community Moderator
9 years agoThat's correct, if your app has the "app folder" permission, everything your app does or "sees" is relative to the app folder itself. You would use "" to refer to the app folder itself, since it's your app's root, or "/subfolder", etc. to refer to something inside your app folder.
From your first paragraph, it sounds like "testFolder" is your app folder itself, so to list its contents you would use a path parameter of "". In your second paragraph, it sounds like you may be trying to specify "testFolder", which wouldn't be necessary. If you're still not seeing the expected results, please share the code and output.
Also, note that the full Dropbox version wouldn't be looking at the same files if you pass the same path string. I.e., using the path "/testFolder" would list the following folders, as seen on the Dropbox web site, for the respective permissions:
- full Dropbox: /testFolder
- app folder: /Apps/<app folder name>/testFolder
From your first paragraph, it sounds like "testFolder" is your app folder itself, so to list its contents you would use a path parameter of "". In your second paragraph, it sounds like you may be trying to specify "testFolder", which wouldn't be necessary. If you're still not seeing the expected results, please share the code and output.
Also, note that the full Dropbox version wouldn't be looking at the same files if you pass the same path string. I.e., using the path "/testFolder" would list the following folders, as seen on the Dropbox web site, for the respective permissions:
- full Dropbox: /testFolder
- app folder: /Apps/<app folder name>/testFolder
RCR
9 years agoExplorer | Level 3
Sorry I wasn't clear. Let me try again.
I have a folder called 'testFolder' and two apps. The folder itself has 1 PDF file.
For the app with access to a single folder, (set to 'testFolder' in the app settings), the following produces an empty list of entries:
for entry in dbx.files_list_folder('').entries:
print(entry.name)Now, for the app with full access, the following produces a list with the one entry for the PDF file:
for entry in dbx.files_list_folder('/Apps/testFolder').entries:
print(entry.name)These two operations are supposed to be accessing the same folder, are they not?
Thank you for your help so far
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks for clarifying. Yes, those two should give you the same listing.
Make sure both apps are linked to the same account though. You can use users_get_current_account to check that.
If you're still getting unexpected results, feel free to open a ticket with the specific code and output from the affected account and we'll be happy to look into it specifically for you:
https://www.dropbox.com/developers/contact- RCR9 years agoExplorer | Level 3
Well, this is curious. I have firgured it out, but I'm not sure if this is a glitch or not.
So, the original name of the folder for the app was the name of the App (something like App-Test-Name), but, like I said, I changed it in the settings to 'testFolder'.
I then created a folder with that name within the Apps folder. Right beside the original App-Test-Name folder.
I tested now (by adding a different file to App-Test-Name), and the single-folder app is actually listing the contents of the 'App-Test-Name' folder instead of 'testFolder'.Something seems off here...
- Greg-DB9 years ago
Dropbox Community Moderator
Manually creating a folder won't connect it to your app. The app folder is a special app folder automatically created for the app when the app is linked to the user's account.
Also, if you change the app folder name setting for an app, it won't change the name of any app folders already created in already linked user accounts.
So, it sounds like this is working as expected, since the existing app folder was "App-Test-Name", and "testFolder" was just the normal folder you created after the fact.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!