<?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: Download Zipped File Geodatabase on ArcGIS Online through API in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/download-zipped-file-geodatabase-on-arcgis-online/m-p/770008#M649</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even though the user account of the person who posted this question is deactivated, an answer can be found from this post&amp;nbsp;&lt;A href="https://community.esri.com/thread/208467-download-feature-service-as-file-geodatabase"&gt;https://community.esri.com/thread/208467-download-feature-service-as-file-geodatabase&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2018 20:09:32 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2018-11-15T20:09:32Z</dc:date>
    <item>
      <title>Download Zipped File Geodatabase on ArcGIS Online through API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/download-zipped-file-geodatabase-on-arcgis-online/m-p/770007#M648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to download a hosted feature layer by using the ArcGIS Python API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The workflow I followed is to export the layer as a file geodatabase first, then search for its itemID by using 'content.search()' and finally using the 'get_data()' to download the FGB to the temp file path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the problem is that the script is not stable (I think it may be a bug) because with the exact code, sometime it would download the exported FGB with only 1 KB in size, while the rest of time it would download FGB with the correct size. I cannot find the problem because everything seems work perfectly when I test the code out in Jupyter Notebook, until the very last step where I try to download the exported FGB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The followings are a subset of my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;STRONG&gt;anno_gis = GIS(url, user_name, password)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;wildlife = anno_gis.content.get(item_id)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;tod_date = datetime.date.today()&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;date = tod_date.strftime('%Y%m%d')&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;title = "Wildlife_FGB_" + date&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;wildlife.export(title,'File Geodatabase', parameters=None, wait='True')&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;search_fgb = anno_gis.content.search(query = "title:{}*".format("Wildlife_FGB_" + date))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;search_fgb[0]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;STRONG&gt;fgb_item_id = search_fgb[0].id&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;fgb = anno_gis.content.get(fgb_item_id)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;temp_fgb= fgb.get_data()&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;STRONG&gt;fgb.delete()&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 18:40:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/download-zipped-file-geodatabase-on-arcgis-online/m-p/770007#M648</guid>
      <dc:creator>deleted-user-iWc3EQwf6ke7</dc:creator>
      <dc:date>2018-04-19T18:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Download Zipped File Geodatabase on ArcGIS Online through API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/download-zipped-file-geodatabase-on-arcgis-online/m-p/770008#M649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even though the user account of the person who posted this question is deactivated, an answer can be found from this post&amp;nbsp;&lt;A href="https://community.esri.com/thread/208467-download-feature-service-as-file-geodatabase"&gt;https://community.esri.com/thread/208467-download-feature-service-as-file-geodatabase&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 20:09:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/download-zipped-file-geodatabase-on-arcgis-online/m-p/770008#M649</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-11-15T20:09:32Z</dc:date>
    </item>
  </channel>
</rss>

