<?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: Python Script to Auto update Web Map from Arc Pro project in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/python-script-to-auto-update-web-map-from-arc-pro/m-p/1709563#M103733</link>
    <description>&lt;P&gt;Try&amp;nbsp;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;server&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;UploadServiceDefinition(&lt;/SPAN&gt;&lt;SPAN class=""&gt;sd&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;portal_url&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Double check you are signed in&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;print(arcpy.GetActivePortalURL())&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Change raise Exception(f"Map '{map_name}' not found.")&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;sddraft = os.path.join(sharing_draft_folder, f"{service_name}.sddraft")&lt;BR /&gt;sd = os.path.join(sharing_draft_folder, f"{service_name}.sd")&lt;/P&gt;&lt;P&gt;print(f"{service_name} published successfully!")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And for the Exception try,&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;except&lt;/SPAN&gt; &lt;SPAN class=""&gt;Exception&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Publishing failed."&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;GetMessages(&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;GetMessages(&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;GetMessages(&lt;/SPAN&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;raise&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jun 2026 14:56:01 GMT</pubDate>
    <dc:creator>ShareUser</dc:creator>
    <dc:date>2026-06-24T14:56:01Z</dc:date>
    <item>
      <title>Python Script to Auto update Web Map from Arc Pro project</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-script-to-auto-update-web-map-from-arc-pro/m-p/1709400#M103715</link>
      <description>&lt;P&gt;I would like to create a python Script to automatically update my web map from my ArcPro project.&lt;/P&gt;&lt;P&gt;I have a ArcPro project that I manually update the web map right now.&lt;/P&gt;&lt;P&gt;I also used experience builder to create a user-friendly web map that uses the data from my published web map.&lt;/P&gt;&lt;P&gt;I have attached my first try at a script, but it doesn't work. Any help on how to fix the script would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2026 20:34:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-script-to-auto-update-web-map-from-arc-pro/m-p/1709400#M103715</guid>
      <dc:creator>ShareUser</dc:creator>
      <dc:date>2026-06-23T20:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script to Auto update Web Map from Arc Pro project</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-script-to-auto-update-web-map-from-arc-pro/m-p/1709563#M103733</link>
      <description>&lt;P&gt;Try&amp;nbsp;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;server&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;UploadServiceDefinition(&lt;/SPAN&gt;&lt;SPAN class=""&gt;sd&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;portal_url&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Double check you are signed in&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;print(arcpy.GetActivePortalURL())&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Change raise Exception(f"Map '{map_name}' not found.")&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;sddraft = os.path.join(sharing_draft_folder, f"{service_name}.sddraft")&lt;BR /&gt;sd = os.path.join(sharing_draft_folder, f"{service_name}.sd")&lt;/P&gt;&lt;P&gt;print(f"{service_name} published successfully!")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And for the Exception try,&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;except&lt;/SPAN&gt; &lt;SPAN class=""&gt;Exception&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Publishing failed."&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;GetMessages(&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;GetMessages(&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;GetMessages(&lt;/SPAN&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;raise&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2026 14:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-script-to-auto-update-web-map-from-arc-pro/m-p/1709563#M103733</guid>
      <dc:creator>ShareUser</dc:creator>
      <dc:date>2026-06-24T14:56:01Z</dc:date>
    </item>
  </channel>
</rss>

