<?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 Error when trying to save a new web map to portal arcgis 2.4.0.1 - arcgis.map.Map().save() in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-when-trying-to-save-a-new-web-map-to-portal/m-p/1602394#M73985</link>
    <description>&lt;P&gt;I recently upgraded from ArcGIS Pro 3.1.1 to 3.4.3, which includes the latest Python API (2.4.0.1).&amp;nbsp;I am working in a disconnected environment, so I'm unable to use conda/pip to re-install/repair python libraries in the default environment that is instlled with ArcGIS Pro. I believe I may have encountered a bug in the new arcgis.map.Map() class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I previously used the now depricated WebMap class, and saved a new web map to ArcGIS Enterprise using the following snippet:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcgis
gis = arcgis.gis.GIS(url=&amp;lt;PortalURL&amp;gt;, username=&amp;lt;PortalUsername&amp;gt;, password=&amp;lt;PortalPassword&amp;gt;, set_active=True)
webMap = arcgis.mapping.WebMap()
#add some layers
webMapProperties = {'title':'Example Web Map', 'type':'Web Map', 'description':'Example description'}
webMapItem = webMap.save(item_properties=webMapProperties, thumbnail=&amp;lt;path to thumbnail&amp;gt;)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Since the WebMap class has been deprecated in ArcGIS Pro 3.4 / arcgis 2.4.0, I am working on updating my script to utilize the new Map class with the following snippet:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.map import Map
gis = arcgis.gis.GIS(url=&amp;lt;PortalURL&amp;gt;, username=&amp;lt;PortalUsername&amp;gt;, password=&amp;lt;PortalPassword&amp;gt;, set_active=True)
webMap = Map()
webMapProperties = {'title':'Example Web Map', 'type':'Web Map', 'description':'Example description'}
webMapItem = webMap.save(item_properties=webMapProperties, thumbnail=&amp;lt;path to thumbnail&amp;gt;)&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.map.toc.html#arcgis.map.Map.save" target="_self"&gt;The documentation&amp;nbsp; for the save method&lt;/A&gt; suggests that Map objects have a save() method, with the following sample:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;new_wm_item = wm.save(webmap_item_properties, thumbnail=’./webmap_thumbnail.png’)&lt;/LI-CODE&gt;&lt;P&gt;When I try to call the save() method on a Map object, I am getting the following ModuleNotFoundError: No module named 'arcgis._impl._content_manager'.&lt;/P&gt;&lt;P&gt;When I look at my Python environment, there is a "_impl" folder in "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\", but there is no "_content_manager" within the "_impl" folder.&lt;/P&gt;&lt;P&gt;However, "..\site-packages\arcgis\gis\_impl\_content_manager\" does exist. It looks like the API is looking in the wrong "_impl" directory to find the _content_manager class.&lt;/P&gt;&lt;P&gt;To make it a little more clear:&lt;BR /&gt;"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\_impl\_content_manager" DOES NOT EXIST&lt;BR /&gt;"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_content_manager" EXISTS&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "C:\Users\me\Desktop\Atlas-Publish\atlas-publish\Installer\Installer_3x.py", line 1541, in &amp;lt;module&amp;gt;&lt;BR /&gt;webMapItem = webMap.save(item_properties=webMapProperties, folder=portalFolder, thumbnail=WebMapThmb)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\map\map_widget.py", line 647, in save&lt;BR /&gt;return self._helper.save(item_properties, thumbnail, metadata, owner, folder)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\map\_utils.py", line 1837, in save&lt;BR /&gt;elif not isinstance(folder, arcgis_cm.Folder):&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\auth\tools\_lazy.py", line 49, in __getattr__&lt;BR /&gt;return getattr(self._load(), attrb)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\auth\tools\_lazy.py", line 45, in _load&lt;BR /&gt;self._mod = importlib.import_module(self._module_name)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\importlib\__init__.py", line 126, in import_module&lt;BR /&gt;return _bootstrap._gcd_import(name[level:], package, level)&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1204, in _gcd_import&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1176, in _find_and_load&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1140, in _find_and_load_unlocked&lt;BR /&gt;ModuleNotFoundError: No module named 'arcgis._impl._content_manager'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;One note is that my OCD kicked in while installing the ArcGIS Pro 3.4 patches, and even though "Each patch is cumulative of all previous patch fixes", I installed 3.4.1, then 3.4.2, then the latest 3.4.3 when upgrading my ArcGIS Pro installation.&lt;/P&gt;&lt;P&gt;One other note is that I am running ArcGIS Enterprise 11.3. While writing up this post, I came across this page, that suggests that ArcGIS Pro 3.3 is more compatible with Enterprise 11.3. The deprecation of the WebMap class isn't present in ArcGIS Pro 3.3's default python environment (arcgis 2.3.0). I still thought this question was relevant, as it seems like a potential bug in arcgis 2.4.0.1.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Apr 2025 16:13:03 GMT</pubDate>
    <dc:creator>ATFerguson</dc:creator>
    <dc:date>2025-04-03T16:13:03Z</dc:date>
    <item>
      <title>Error when trying to save a new web map to portal arcgis 2.4.0.1 - arcgis.map.Map().save()</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-save-a-new-web-map-to-portal/m-p/1602394#M73985</link>
      <description>&lt;P&gt;I recently upgraded from ArcGIS Pro 3.1.1 to 3.4.3, which includes the latest Python API (2.4.0.1).&amp;nbsp;I am working in a disconnected environment, so I'm unable to use conda/pip to re-install/repair python libraries in the default environment that is instlled with ArcGIS Pro. I believe I may have encountered a bug in the new arcgis.map.Map() class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I previously used the now depricated WebMap class, and saved a new web map to ArcGIS Enterprise using the following snippet:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcgis
gis = arcgis.gis.GIS(url=&amp;lt;PortalURL&amp;gt;, username=&amp;lt;PortalUsername&amp;gt;, password=&amp;lt;PortalPassword&amp;gt;, set_active=True)
webMap = arcgis.mapping.WebMap()
#add some layers
webMapProperties = {'title':'Example Web Map', 'type':'Web Map', 'description':'Example description'}
webMapItem = webMap.save(item_properties=webMapProperties, thumbnail=&amp;lt;path to thumbnail&amp;gt;)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Since the WebMap class has been deprecated in ArcGIS Pro 3.4 / arcgis 2.4.0, I am working on updating my script to utilize the new Map class with the following snippet:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.map import Map
gis = arcgis.gis.GIS(url=&amp;lt;PortalURL&amp;gt;, username=&amp;lt;PortalUsername&amp;gt;, password=&amp;lt;PortalPassword&amp;gt;, set_active=True)
webMap = Map()
webMapProperties = {'title':'Example Web Map', 'type':'Web Map', 'description':'Example description'}
webMapItem = webMap.save(item_properties=webMapProperties, thumbnail=&amp;lt;path to thumbnail&amp;gt;)&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.map.toc.html#arcgis.map.Map.save" target="_self"&gt;The documentation&amp;nbsp; for the save method&lt;/A&gt; suggests that Map objects have a save() method, with the following sample:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;new_wm_item = wm.save(webmap_item_properties, thumbnail=’./webmap_thumbnail.png’)&lt;/LI-CODE&gt;&lt;P&gt;When I try to call the save() method on a Map object, I am getting the following ModuleNotFoundError: No module named 'arcgis._impl._content_manager'.&lt;/P&gt;&lt;P&gt;When I look at my Python environment, there is a "_impl" folder in "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\", but there is no "_content_manager" within the "_impl" folder.&lt;/P&gt;&lt;P&gt;However, "..\site-packages\arcgis\gis\_impl\_content_manager\" does exist. It looks like the API is looking in the wrong "_impl" directory to find the _content_manager class.&lt;/P&gt;&lt;P&gt;To make it a little more clear:&lt;BR /&gt;"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\_impl\_content_manager" DOES NOT EXIST&lt;BR /&gt;"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_content_manager" EXISTS&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "C:\Users\me\Desktop\Atlas-Publish\atlas-publish\Installer\Installer_3x.py", line 1541, in &amp;lt;module&amp;gt;&lt;BR /&gt;webMapItem = webMap.save(item_properties=webMapProperties, folder=portalFolder, thumbnail=WebMapThmb)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\map\map_widget.py", line 647, in save&lt;BR /&gt;return self._helper.save(item_properties, thumbnail, metadata, owner, folder)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\map\_utils.py", line 1837, in save&lt;BR /&gt;elif not isinstance(folder, arcgis_cm.Folder):&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\auth\tools\_lazy.py", line 49, in __getattr__&lt;BR /&gt;return getattr(self._load(), attrb)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\auth\tools\_lazy.py", line 45, in _load&lt;BR /&gt;self._mod = importlib.import_module(self._module_name)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\importlib\__init__.py", line 126, in import_module&lt;BR /&gt;return _bootstrap._gcd_import(name[level:], package, level)&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1204, in _gcd_import&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1176, in _find_and_load&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1140, in _find_and_load_unlocked&lt;BR /&gt;ModuleNotFoundError: No module named 'arcgis._impl._content_manager'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;One note is that my OCD kicked in while installing the ArcGIS Pro 3.4 patches, and even though "Each patch is cumulative of all previous patch fixes", I installed 3.4.1, then 3.4.2, then the latest 3.4.3 when upgrading my ArcGIS Pro installation.&lt;/P&gt;&lt;P&gt;One other note is that I am running ArcGIS Enterprise 11.3. While writing up this post, I came across this page, that suggests that ArcGIS Pro 3.3 is more compatible with Enterprise 11.3. The deprecation of the WebMap class isn't present in ArcGIS Pro 3.3's default python environment (arcgis 2.3.0). I still thought this question was relevant, as it seems like a potential bug in arcgis 2.4.0.1.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 16:13:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-save-a-new-web-map-to-portal/m-p/1602394#M73985</guid>
      <dc:creator>ATFerguson</dc:creator>
      <dc:date>2025-04-03T16:13:03Z</dc:date>
    </item>
  </channel>
</rss>

