<?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 Feature Layer won't update from File GeoDatabase using Overwrite API in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/feature-layer-won-t-update-from-file-geodatabase/m-p/1083535#M6401</link>
    <description>&lt;P&gt;Hello - I need to automate a nightly update from one item in a File Geodatabase to overwrite a feature layer in ArcGIS Enterprise Portal.&amp;nbsp; I am using the code from this &lt;A title="Overwrite AGOL" href="https://ericsamson.com/Python/Overwrite_AGOL/Overwrite_AGOL.html" target="_blank" rel="noopener"&gt;site almost exactly&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can connect to the my portal site, and something runs and the feature layer even gives an updated modified date, but I don't think its finding my File GeoDatabase correctly.&lt;/P&gt;&lt;P&gt;This is the code I'm using (note that identifying info has been changed)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import os
import arcgis
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection

orgURL = "https://my.website.com"
adminUserName = "administratoraccount"
orgPass = "password"

gis = GIS(orgURL, username=adminUserName, password=orgPass)

LOCgdb = "C:\PLSS_HARN.gdb"
LOCAL_Parcel = "Parcel_Tax"

Parcel_Online = gis.content.search("id:12233456678889911000")

FLC_Parcel_Online = FeatureLayerCollection.fromitem(Parcel_Online[0])

FLC_Parcel_Online.manager.publish.overwrite(os.path.join(LOCgdb, LOCAL_Parcel))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can update the feature layer manually in Pro by overwriting the web layer just fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jul 2021 15:01:00 GMT</pubDate>
    <dc:creator>CarrieQuast</dc:creator>
    <dc:date>2021-07-28T15:01:00Z</dc:date>
    <item>
      <title>Feature Layer won't update from File GeoDatabase using Overwrite API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/feature-layer-won-t-update-from-file-geodatabase/m-p/1083535#M6401</link>
      <description>&lt;P&gt;Hello - I need to automate a nightly update from one item in a File Geodatabase to overwrite a feature layer in ArcGIS Enterprise Portal.&amp;nbsp; I am using the code from this &lt;A title="Overwrite AGOL" href="https://ericsamson.com/Python/Overwrite_AGOL/Overwrite_AGOL.html" target="_blank" rel="noopener"&gt;site almost exactly&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can connect to the my portal site, and something runs and the feature layer even gives an updated modified date, but I don't think its finding my File GeoDatabase correctly.&lt;/P&gt;&lt;P&gt;This is the code I'm using (note that identifying info has been changed)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import os
import arcgis
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection

orgURL = "https://my.website.com"
adminUserName = "administratoraccount"
orgPass = "password"

gis = GIS(orgURL, username=adminUserName, password=orgPass)

LOCgdb = "C:\PLSS_HARN.gdb"
LOCAL_Parcel = "Parcel_Tax"

Parcel_Online = gis.content.search("id:12233456678889911000")

FLC_Parcel_Online = FeatureLayerCollection.fromitem(Parcel_Online[0])

FLC_Parcel_Online.manager.publish.overwrite(os.path.join(LOCgdb, LOCAL_Parcel))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can update the feature layer manually in Pro by overwriting the web layer just fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 15:01:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/feature-layer-won-t-update-from-file-geodatabase/m-p/1083535#M6401</guid>
      <dc:creator>CarrieQuast</dc:creator>
      <dc:date>2021-07-28T15:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer won't update from File GeoDatabase using Overwrite API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/feature-layer-won-t-update-from-file-geodatabase/m-p/1083568#M6402</link>
      <description>&lt;P&gt;I'm surprised you don't mention an error.&lt;/P&gt;&lt;P&gt;One thing I would change immediately is how the path is written:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;LOCgdb = r"C:\PLSS_HARN.gdb"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, what is the point of the search? It seems like you know what the item id is, unless that number means something else. It would be more direct to do:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;item = gis.content.get("youritemid")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All that aside, I think the source of the problem is you're calling the wrong method. The last line should read:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FLC_Parcel_Online.manager.overwrite(os.path.join(LOCgdb, LOCAL_Parcel))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 16:00:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/feature-layer-won-t-update-from-file-geodatabase/m-p/1083568#M6402</guid>
      <dc:creator>emedina</dc:creator>
      <dc:date>2021-07-28T16:00:45Z</dc:date>
    </item>
  </channel>
</rss>

