<?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: ArcGIS Python API Overwrite Feature Service Not Working in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311160#M68241</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10787"&gt;@Shauna-RaeBrown&lt;/a&gt;&amp;nbsp;I believe that would work as expected if I was working only with feature classes but communicating with a feature class to a feature service would require using the ArcGIS Python API.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jul 2023 18:52:12 GMT</pubDate>
    <dc:creator>ArizonaGIS</dc:creator>
    <dc:date>2023-07-24T18:52:12Z</dc:date>
    <item>
      <title>ArcGIS Python API Overwrite Feature Service Not Working</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311128#M68239</link>
      <description>&lt;P&gt;****Edit. When I publish a zipped file geodatabase with only layers and perform the overwrite function, it works as expected, but when I publish a zipped file geodatabase with multiple layers and tables, that is where it is erroring out on me. I believe the ArcGIS Python API and its overwrite function are limited to one or the other kind of dataset, not a combination of both layers and tables.&lt;/P&gt;&lt;P&gt;I am trying to overwrite a feature service on ArcGIS Online using the ArcGIS API for Python. The code I am using is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Import necessary libraries
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection

# Log in to your AGOL account
gis = GIS("https://www.arcgis.com", "Your Username", "Your Password")

# Access the service using its ID
service_item = gis.content.get('d4a4d33b25434986a249666c64daf9dc')

# Access the feature layer collection associated with the service
flc = FeatureLayerCollection.fromitem(service_item)

# Define the path to your .gdb.zip file
gdb_zip_path = 'C:\\GIS_Project\\Navajo County ETL Process\\DATAMARK VEP Dataset\\Navajo_County_ETL.gdb.zip'

# Overwrite the feature service
flc.manager.overwrite(gdb_zip_path)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to run this script, I get the following error:&lt;/P&gt;&lt;P&gt;`TypeError: can only concatenate str (not "NoneType") to str`&lt;/P&gt;&lt;P&gt;The traceback points towards this line of code:&lt;/P&gt;&lt;P&gt;`flc.manager.overwrite(gdb_zip_path)`&lt;/P&gt;&lt;P&gt;From my understanding, this error might be occurring because the item I am trying to overwrite is not inside a specific folder in my content, causing issues when the API tries to concatenate a string with `None`. However, I have confirmed that this item is at the root of my content and not inside a specific folder.&lt;/P&gt;&lt;P&gt;Has anyone encountered this issue before, and if so, how did you resolve it?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 02:42:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311128#M68239</guid>
      <dc:creator>ArizonaGIS</dc:creator>
      <dc:date>2023-07-25T02:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Python API Overwrite Feature Service Not Working</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311142#M68240</link>
      <description>&lt;P&gt;The following line of script allows me to overwrite an existing file.&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 18:16:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311142#M68240</guid>
      <dc:creator>Shauna-RaeBrown</dc:creator>
      <dc:date>2023-07-24T18:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Python API Overwrite Feature Service Not Working</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311160#M68241</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10787"&gt;@Shauna-RaeBrown&lt;/a&gt;&amp;nbsp;I believe that would work as expected if I was working only with feature classes but communicating with a feature class to a feature service would require using the ArcGIS Python API.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 18:52:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311160#M68241</guid>
      <dc:creator>ArizonaGIS</dc:creator>
      <dc:date>2023-07-24T18:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Python API Overwrite Feature Service Not Working</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311370#M68244</link>
      <description>&lt;P&gt;From the docs of overwrite- Only hosted &lt;EM&gt;feature layer collection services&lt;/EM&gt; can be overwritten.&lt;/P&gt;&lt;P&gt;I think you nailed it in your edit; just upload separately.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 03:39:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311370#M68244</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-07-25T03:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Python API Overwrite Feature Service Not Working</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311378#M68245</link>
      <description>&lt;P&gt;@Anonymous User&amp;nbsp;Kind of odd that the manual way through AGOL of dropping a file geodatabase that contains both layers &amp;amp; tables is capable of an overwrite but using the ArcGIS Python API workflow it doesn’t work?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 05:16:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1311378#M68245</guid>
      <dc:creator>ArizonaGIS</dc:creator>
      <dc:date>2023-07-25T05:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Python API Overwrite Feature Service Not Working</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1314310#M68320</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/456136"&gt;@ArizonaGIS&lt;/a&gt;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-documents/overwrite-arcgis-online-feature-service-using/ta-p/904457" target="_self"&gt;this&lt;/A&gt; could be another solution to try.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 20:45:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-python-api-overwrite-feature-service-not/m-p/1314310#M68320</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2023-08-01T20:45:28Z</dc:date>
    </item>
  </channel>
</rss>

