<?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 Can't download file using files_download_to_file in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-download-file-using-files-download-to-file/m-p/532614#M25672</link>
    <description>&lt;P&gt;This is really starting to be a pain.&lt;/P&gt;
&lt;P&gt;I can't seem to get the correct directory of my file. I'm trying to download a file from my DB using the files_download_to_file() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to run&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;dbx&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;files_download_to_file&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"F:/Programming/Visual&amp;nbsp;Studio/Programming/Python/dbdltest/Database.xlsx"&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"/Stock_List/Database.xlsx"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I simply get back: &lt;SPAN&gt;DownloadError('path', LookupError('not_found', None)))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the actual issue here? I've tried using files_list_folder("") and files_list_folder("/Stock_List") too, to no avail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When i use files_list_folder("") I get nothing, but when i print(files_list_folder(")) i get a load of garbage jargon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Surely there is something simple im missing here and it isn't this finnicky to just simply download a file on to my local drive...&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jul 2021 12:56:20 GMT</pubDate>
    <dc:creator>harrycallard</dc:creator>
    <dc:date>2021-07-13T12:56:20Z</dc:date>
    <item>
      <title>Can't download file using files_download_to_file</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-download-file-using-files-download-to-file/m-p/532614#M25672</link>
      <description>&lt;P&gt;This is really starting to be a pain.&lt;/P&gt;
&lt;P&gt;I can't seem to get the correct directory of my file. I'm trying to download a file from my DB using the files_download_to_file() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to run&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;dbx&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;files_download_to_file&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"F:/Programming/Visual&amp;nbsp;Studio/Programming/Python/dbdltest/Database.xlsx"&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"/Stock_List/Database.xlsx"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I simply get back: &lt;SPAN&gt;DownloadError('path', LookupError('not_found', None)))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the actual issue here? I've tried using files_list_folder("") and files_list_folder("/Stock_List") too, to no avail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When i use files_list_folder("") I get nothing, but when i print(files_list_folder(")) i get a load of garbage jargon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Surely there is something simple im missing here and it isn't this finnicky to just simply download a file on to my local drive...&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 12:56:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-download-file-using-files-download-to-file/m-p/532614#M25672</guid>
      <dc:creator>harrycallard</dc:creator>
      <dc:date>2021-07-13T12:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can't download file using files_download_to_file</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-download-file-using-files-download-to-file/m-p/532832#M25684</link>
      <description>&lt;P&gt;This is the Python SDK, correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;calling print(dbx.files_list_folder("")) will show the full ListFolderResult object.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To iterate over the results and print just the path, you'll want something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;res = dbx.files_list_folder("")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for entry in res.entries:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(entry.path_lower)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will return valid paths that you can use with the&amp;nbsp;files_download_to_file call.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 06:11:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-download-file-using-files-download-to-file/m-p/532832#M25684</guid>
      <dc:creator>kylea</dc:creator>
      <dc:date>2021-07-14T06:11:28Z</dc:date>
    </item>
  </channel>
</rss>

