<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to get list of files and folders in dropbox. in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765916#M33500</link>
    <description>&lt;P&gt;I see you've removed the first component with your name, but it looks like you've also changed the rest of it now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Specifically, the path from your original post but without the user name component would be:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;folder_path = '/Rioblanco Capital LLC'&lt;/LI-CODE&gt;
&lt;P&gt;but now you have:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;folder_path = '/Rioblanco Dropbox'&lt;/LI-CODE&gt;
&lt;P&gt;Make sure you're using the right path values based on the current contents of your account.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, my other comment means that you can try the following to see the contents of whatever the root folder for the call is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;folder_path = ''&lt;/LI-CODE&gt;
&lt;P&gt;If you look at the 'result' from that, it will contain metadata about the items there that you can use to build other path values as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2024 17:36:43 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2024-04-23T17:36:43Z</dc:date>
    <item>
      <title>Path for API: path of the empty string</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765891#M33493</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to get a list of all my file and folder names. I keep getting an error message saying:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VanessaGillier_0-1713890290343.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/45688i194AF5C99797DC5B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VanessaGillier_0-1713890290343.png" alt="VanessaGillier_0-1713890290343.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The path is copied from my dropbox. So, I dont understand how it could not be found.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 06:56:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765891#M33493</guid>
      <dc:creator>VanessaGillier</dc:creator>
      <dc:date>2024-04-24T06:56:19Z</dc:date>
    </item>
    <item>
      <title>Path for API folder and file list</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765898#M33496</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to get a list of all my file and folder names. I keep getting an error message saying:&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VanessaGillier_0-1713891009660.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/45690i8AFF19FFFF78E3F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VanessaGillier_0-1713891009660.png" alt="VanessaGillier_0-1713891009660.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;The path is copied from my dropbox. So, I dont understand how it could not be found.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 Apr 2024 16:50:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765898#M33496</guid>
      <dc:creator>VanessaGillier</dc:creator>
      <dc:date>2024-04-23T16:50:14Z</dc:date>
    </item>
    <item>
      <title>Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765901#M33497</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have been trying to get a complete overview of my Dropbox, Folders and File names. With some help, I was able to figure out a code. I am just getting started on coding.&lt;/P&gt;&lt;P&gt;However, I keep getting the same result, saying that the folder does not exist or cannot be accessed:&lt;/P&gt;&lt;P&gt;API error: ApiError('41e809ab87464c1d86f7baa83d5f82c4', ListFolderError('path', LookupError('not_found', None)))&lt;BR /&gt;Folder does not exist or could not be accessed.&lt;BR /&gt;Failed to retrieve files and folders.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the code;&lt;/P&gt;&lt;P&gt;import dropbox&lt;BR /&gt;import pandas as pd&lt;/P&gt;&lt;P&gt;# Replace 'YOUR_ACCESS_TOKEN' with your new access token&lt;BR /&gt;dbx = dropbox.Dropbox('TOKEN')&lt;/P&gt;&lt;P&gt;# Define a function to list files and folders&lt;BR /&gt;def list_files_and_folders(folder_path):&lt;BR /&gt;try:&lt;BR /&gt;response = dbx.files_list_folder(folder_path)&lt;BR /&gt;entries = response.entries&lt;BR /&gt;if entries:&lt;BR /&gt;file_names = []&lt;BR /&gt;folder_names = []&lt;BR /&gt;for entry in entries:&lt;BR /&gt;if isinstance(entry, dropbox.files.FolderMetadata):&lt;BR /&gt;folder_names.append(entry.name)&lt;BR /&gt;elif isinstance(entry, dropbox.files.FileMetadata):&lt;BR /&gt;file_names.append(entry.name)&lt;BR /&gt;return file_names, folder_names&lt;BR /&gt;else:&lt;BR /&gt;print("Folder is empty.")&lt;BR /&gt;return None, None&lt;BR /&gt;except dropbox.exceptions.ApiError as e:&lt;BR /&gt;print(f"API error: {e}")&lt;BR /&gt;print("Folder does not exist or could not be accessed.")&lt;BR /&gt;return None, None&lt;BR /&gt;except Exception as ex:&lt;BR /&gt;print(f"An unexpected error occurred: {ex}")&lt;BR /&gt;return None, None&lt;/P&gt;&lt;P&gt;# Specify the Dropbox folder path&lt;BR /&gt;folder_path = '/Vanessa Gillier/Rioblanco Capital LLC'&lt;/P&gt;&lt;P&gt;files, folders = list_files_and_folders(folder_path)&lt;/P&gt;&lt;P&gt;# Check if files and folders are retrieved successfully&lt;BR /&gt;if files is not None and folders is not None:&lt;BR /&gt;# Create a DataFrame&lt;BR /&gt;df = pd.DataFrame({'File Name': files, 'Folder Name': folders})&lt;BR /&gt;&lt;BR /&gt;# Export to Excel&lt;BR /&gt;df.to_excel('dropbox_contents.xlsx', index=False)&lt;BR /&gt;print("Files and folders retrieved successfully.")&lt;BR /&gt;else:&lt;BR /&gt;print("Failed to retrieve files and folders.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The permissions are all in order, when I use cd to go to the correct location, it finds it without a problem. Where could the problem lie?&lt;/P&gt;&lt;P&gt;I have removed the access token, but this is also to correct one copies straight from the location. I have also removed the location for privacy reasons, I hope you are still able to help me?&lt;/P&gt;&lt;P&gt;If there are other ways of doing this please inform me.&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 16:56:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765901#M33497</guid>
      <dc:creator>VanessaGillier</dc:creator>
      <dc:date>2024-04-23T16:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765904#M33498</link>
      <description>&lt;P&gt;I see you're including your user name in the "folder_path" value, but note that the root for API calls defaults to your member folder automatically, so you shouldn't include the name of the member folder. Try taking out that path component. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, when calling 'files_list_folder', you can supply a 'path' of the empty string '' to list the root for the call. That's generally a helpful first step for debugging issues like this.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 17:06:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765904#M33498</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-04-23T17:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765909#M33499</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VanessaGillier_0-1713892358699.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/45691iBA3ADD78B0DAE8AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VanessaGillier_0-1713892358699.png" alt="VanessaGillier_0-1713892358699.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is my new code after removing my username. but the problem remains.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second part of you answer also confuses me a bit, although I believe I did it.&lt;/P&gt;&lt;P&gt;I am very new to all of this, so dumming it down might be useful.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 17:16:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765909#M33499</guid>
      <dc:creator>VanessaGillier</dc:creator>
      <dc:date>2024-04-23T17:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765916#M33500</link>
      <description>&lt;P&gt;I see you've removed the first component with your name, but it looks like you've also changed the rest of it now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Specifically, the path from your original post but without the user name component would be:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;folder_path = '/Rioblanco Capital LLC'&lt;/LI-CODE&gt;
&lt;P&gt;but now you have:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;folder_path = '/Rioblanco Dropbox'&lt;/LI-CODE&gt;
&lt;P&gt;Make sure you're using the right path values based on the current contents of your account.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, my other comment means that you can try the following to see the contents of whatever the root folder for the call is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;folder_path = ''&lt;/LI-CODE&gt;
&lt;P&gt;If you look at the 'result' from that, it will contain metadata about the items there that you can use to build other path values as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 17:36:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765916#M33500</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-04-23T17:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765921#M33501</link>
      <description>&lt;P&gt;The new error message i get is the following;&lt;/P&gt;&lt;P&gt;C:\Users\Vanessa RioBlanco\Dropbox (Personal)\PC\Desktop\LEX 2024\Path Shortening\Python&amp;gt; python import_dropbox2.py&lt;BR /&gt;An unexpected error occurred: BadInputError('beaa26a4df804ca984f4c5c31a9382e0', 'Error in call to API function "files/list_folder": This API function operates on a single Dropbox account, but the OAuth 2 access token you provided is for an entire Dropbox Business team. Since your API app key has team member file access permissions, you can operate on a team member\'s Dropbox by providing the "Dropbox-API-Select-User" HTTP header or "select_user" URL parameter to specify the exact user &amp;lt;&lt;A href="https://www.dropbox.com/developers/documentation/http/teams" target="_blank" rel="noopener"&gt;https://www.dropbox.com/developers/documentation/http/teams&lt;/A&gt;&amp;gt;.')&lt;BR /&gt;Failed to retrieve files and folders.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could this be related to the fact I added all permission options? I did this because I kept finding on the internet it could be related to permissions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which ones would I need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dropbox is indeed a shared dropbox.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 17:59:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765921#M33501</guid>
      <dc:creator>VanessaGillier</dc:creator>
      <dc:date>2024-04-23T17:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765922#M33502</link>
      <description>&lt;P&gt;Based on that error message, you're now using an access token with "team scopes" enabled. For the sake of simplicity and security, and so you can use the code as you've written it, I recommend getting a new access token without the team scopes enabled again. You can change the scopes and then generate a new token using the app's page on &lt;A href="https://www.dropbox.com/developers/apps" target="_blank"&gt;the App Console&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 18:02:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765922#M33502</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-04-23T18:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765925#M33503</link>
      <description>&lt;P&gt;You already have been such a help thank you.&lt;/P&gt;&lt;P&gt;The next problem is this;&lt;/P&gt;&lt;P&gt;File "C:\Users\Vanessa RioBlanco\Dropbox (Personal)\PC\Desktop\LEX 2024\Path Shortening\Python\import_dropbox2.py", line 42, in &amp;lt;module&amp;gt;&lt;BR /&gt;df = pd.DataFrame({'File Name': files, 'Folder Name': folders})&lt;BR /&gt;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;BR /&gt;File "C:\Users\Vanessa RioBlanco\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\frame.py", line 778, in __init__&lt;BR /&gt;mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)&lt;BR /&gt;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;BR /&gt;File "C:\Users\Vanessa RioBlanco\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 503, in dict_to_mgr&lt;BR /&gt;return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)&lt;BR /&gt;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;BR /&gt;File "C:\Users\Vanessa RioBlanco\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 114, in arrays_to_mgr&lt;BR /&gt;index = _extract_index(arrays)&lt;BR /&gt;^^^^^^^^^^^^^^^^^^^^^^&lt;BR /&gt;File "C:\Users\Vanessa RioBlanco\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 677, in _extract_index&lt;BR /&gt;raise ValueError("All arrays must be of the same length")&lt;BR /&gt;ValueError: All arrays must be of the same length&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 18:07:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765925#M33503</guid>
      <dc:creator>VanessaGillier</dc:creator>
      <dc:date>2024-04-23T18:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765926#M33504</link>
      <description>&lt;P&gt;That's an error message from pandas, not Dropbox, so I can't offer help with that. You may want to refer to the documentation or support resources for pandas.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 18:11:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765926#M33504</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-04-23T18:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765927#M33505</link>
      <description>&lt;P&gt;I believe I figured that out. Is this an error you can help with.&lt;/P&gt;&lt;P&gt;Failed to retrieve files and folders or their lengths are different.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 18:16:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765927#M33505</guid>
      <dc:creator>VanessaGillier</dc:creator>
      <dc:date>2024-04-23T18:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files and folders in dropbox.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765928#M33506</link>
      <description>&lt;P&gt;That also does not appear to be an error from Dropbox itself. If you're having any trouble with the Dropbox API, please print out the error or unexpected output from the relevant Dropbox API call.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 18:19:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Path-for-API-path-of-the-empty-string/m-p/765928#M33506</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-04-23T18:19:31Z</dc:date>
    </item>
  </channel>
</rss>

