<?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 Download a single file but getting API error in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-single-file-but-getting-API-error/m-p/712278#M31558</link>
    <description>&lt;P&gt;I have a file at /Commercial/Revenue Cycle/RC Tracker_Automated.xslx.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;metadata = dropbox.client.files_download_to_file(path="/Commercial/Revenue Cycle/RC Tracker_Automated.xlsx", download_path=".")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;This gives an error&lt;BR /&gt;&lt;BR /&gt;raise ApiError(res.request_id,&lt;BR /&gt;dropbox.exceptions.ApiError: ApiError('f5b0b8df42f945bf966bbd840b5e9c67', DownloadError('path', LookupError('not_found', None)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I specify a path="" I do not get an error. If I specify any path, I get an error. Why?&lt;/P&gt;</description>
    <pubDate>Fri, 08 Sep 2023 11:06:04 GMT</pubDate>
    <dc:creator>escanzano</dc:creator>
    <dc:date>2023-09-08T11:06:04Z</dc:date>
    <item>
      <title>Download a single file but getting API error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-single-file-but-getting-API-error/m-p/712278#M31558</link>
      <description>&lt;P&gt;I have a file at /Commercial/Revenue Cycle/RC Tracker_Automated.xslx.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;metadata = dropbox.client.files_download_to_file(path="/Commercial/Revenue Cycle/RC Tracker_Automated.xlsx", download_path=".")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;This gives an error&lt;BR /&gt;&lt;BR /&gt;raise ApiError(res.request_id,&lt;BR /&gt;dropbox.exceptions.ApiError: ApiError('f5b0b8df42f945bf966bbd840b5e9c67', DownloadError('path', LookupError('not_found', None)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I specify a path="" I do not get an error. If I specify any path, I get an error. Why?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 11:06:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-single-file-but-getting-API-error/m-p/712278#M31558</guid>
      <dc:creator>escanzano</dc:creator>
      <dc:date>2023-09-08T11:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Download a single file but getting API error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-single-file-but-getting-API-error/m-p/712366#M31560</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1743276"&gt;@escanzano&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You have one error for sure: 'download_path' should point to file where to save downloaded content, not to folder.&lt;/P&gt;&lt;P&gt;The actual exception, you got, means that something within the Dropbox path is not correct. A good way to start troubleshooting is to list files from account root up to desired file - folder' level by folder' level, starting with empty path (always correct). In such a way you will figure out how exactly you can address the file.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 10:53:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-single-file-but-getting-API-error/m-p/712366#M31560</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-09-08T10:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Download a single file but getting API error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-single-file-but-getting-API-error/m-p/712419#M31563</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt; As Здравко said, the 'download_path' should refer to a local file path where you want to save the file; not a folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And as for the 'path/not_found' error, as they said that's referring to the path on Dropbox itself. A "path/not_found" Dropbox API error indicates that the API call failed because there was nothing currently found at the specified &lt;CODE&gt;path&lt;/CODE&gt; in the connected account under the relevant root. For example, this can happen if there's a mistake or typo in the &lt;CODE&gt;path&lt;/CODE&gt; value the app supplies, if the file/folder has been renamed, moved, or deleted from that path, if the app is not connected to the correct account for that particular path, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When specifying the path, make sure you provide the full and accurate path for the desired file under the relevant root. For example, if you have a file named "example.csv" inside a folder named "folder", the path would be &lt;CODE&gt;"/folder/example.csv"&lt;/CODE&gt;. You can find &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#path-formats" target="_blank" rel="noopener noreferrer"&gt;more information on path formats here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are several things you can check in particular to debug this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL dir="auto"&gt;
&lt;LI&gt;Make sure you're using an currently accurate &lt;CODE&gt;path&lt;/CODE&gt; value: You can use &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_blank" rel="noopener noreferrer"&gt;/2/files/list_folder&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue" target="_blank" rel="noopener noreferrer"&gt;/2/files/list_folder/continue&lt;/A&gt; to list the contents of a folder so you can check what the correct &lt;CODE&gt;path&lt;/CODE&gt; values would be for items in those folder(s). To list the root, set &lt;CODE&gt;path&lt;/CODE&gt; to the empty string &lt;CODE&gt;""&lt;/CODE&gt; when calling &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_blank" rel="noopener noreferrer"&gt;/2/files/list_folder&lt;/A&gt;. You can use the &lt;CODE&gt;path_lower&lt;/CODE&gt; or &lt;CODE&gt;id&lt;/CODE&gt; values returned for the files/folders in that folder to interact with those files/folders. In the Dropbox Python SDK, those are &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_blank"&gt;files_list_folder&lt;/A&gt; and &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder_continue" target="_blank"&gt;files_list_folder_continue&lt;/A&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL dir="auto"&gt;
&lt;LI&gt;Make sure you're connected to the correct account for the &lt;CODE&gt;path&lt;/CODE&gt; value you're using: You can use &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#users-get_current_account" target="_blank" rel="noopener noreferrer"&gt;/2/users/get_current_account&lt;/A&gt; to check which account the app is connected to. In the Dropbox Python SDK, that's &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.users_get_current_account" target="_blank"&gt;users_get_current_account&lt;/A&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL dir="auto"&gt;
&lt;LI&gt;Make sure you're using app folder-relative paths, if your app is registered for the "app folder" access type: Apps with the "app folder" access type can only access the contents of the special app folder that gets automatically created for it. If your app has the "app folder" access type, then it will only be able to access files in the app folder, and the root for any path value supplied by that app will automatically be the app folder root. You can find &lt;A href="https://www.dropbox.com/developers/reference/developer-guide#app-permissions" target="_blank" rel="noopener noreferrer"&gt;more information on app permissions here&lt;/A&gt;. For example, If your app has the app folder access type and you're trying to access something you can see on the Dropbox web site at &lt;CODE&gt;"/Apps/&amp;lt;app folder name&amp;gt;/folder/example.csv"&lt;/CODE&gt;, you should only send the &lt;CODE&gt;path&lt;/CODE&gt; value as &lt;CODE&gt;"/folder/example.csv"&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL dir="auto"&gt;
&lt;LI&gt;Make sure you're accessing the relevant root: When using an app with the "full Dropbox" access type, API calls default to the member folder, but if you're trying to access the "team space" (only applicable to members of a team with the "team space" configuration), you'll need to configure that as the root explicitly, as covered in &lt;A href="https://developers.dropbox.com/dbx-team-files-guide" target="_blank" rel="noopener noreferrer"&gt;the Team Files Guide&lt;/A&gt;. In the Dropbox Python SDK, you would set that using &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.with_path_root" target="_blank"&gt;with_path_root&lt;/A&gt;.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 08 Sep 2023 13:35:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-single-file-but-getting-API-error/m-p/712419#M31563</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-09-08T13:35:13Z</dc:date>
    </item>
  </channel>
</rss>

