<?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: Cannot import 'Layer' from arcgis.mapping in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-import-layer-from-arcgis-mapping/m-p/1608905#M11340</link>
    <description>&lt;P&gt;What do you mean AI? It's the ArcGIS documentation that shows code snippets that error.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;`ImportError&lt;/SPAN&gt;&lt;SPAN class=""&gt;: cannot import name 'WebMap' from 'arcgis.mapping'`&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; arcgis.mapping &lt;SPAN class=""&gt;import&lt;/SPAN&gt; WebMap, WebScene&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/latest/samples/publishing-web-maps-and-web-scenes/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/latest/samples/publishing-web-maps-and-web-scenes/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Apr 2025 14:02:54 GMT</pubDate>
    <dc:creator>hershy1234</dc:creator>
    <dc:date>2025-04-24T14:02:54Z</dc:date>
    <item>
      <title>Cannot import 'Layer' from arcgis.mapping</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-import-layer-from-arcgis-mapping/m-p/1305558#M8843</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on a simple script which copies a web map and adds a new layer:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;from arcgis.gis import GIS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;from arcgis.mapping import WebMap&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;from arcgis.mapping import Layer&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I receive:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;ImportError: cannot import name 'Layer' from 'arcgis.mapping' (C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\mapping\__init__.py)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;ArcGIS Pro 3.1.1&lt;/P&gt;&lt;P&gt;What is wrong?&lt;/P&gt;&lt;P&gt;Thanks.&lt;BR /&gt;-b.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 13:03:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-import-layer-from-arcgis-mapping/m-p/1305558#M8843</guid>
      <dc:creator>Sfortunatamente</dc:creator>
      <dc:date>2023-07-04T13:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot import 'Layer' from arcgis.mapping</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-import-layer-from-arcgis-mapping/m-p/1305561#M8844</link>
      <description>&lt;P&gt;There is no class Layer in arcgis.mapping .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are some classes that could be what you want:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for x in arcgis.mapping.__dict__.keys():
    print(x)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;...
MapImageLayer
MapImageLayerManager
...
VectorTileLayer
...
Object3DLayer
IntegratedMeshLayer
Point3DLayer
VoxelLayer
PointCloudLayer
BuildingLayer
SceneLayer
...
MapServiceLayer
MapFeatureLayer
MapTable
MapRasterLayer
...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's also possible that you actually want &lt;A href="https://pro.arcgis.com/de/pro-app/latest/arcpy/mapping/layer-class.htm" target="_blank" rel="noopener"&gt;arcpy.mp.Layer&lt;/A&gt; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 13:30:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-import-layer-from-arcgis-mapping/m-p/1305561#M8844</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-07-04T13:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot import 'Layer' from arcgis.mapping</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-import-layer-from-arcgis-mapping/m-p/1305562#M8845</link>
      <description>&lt;P&gt;Thanks a lot! I should be more careful with AI then..&lt;/P&gt;&lt;P&gt;-b.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 13:33:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-import-layer-from-arcgis-mapping/m-p/1305562#M8845</guid>
      <dc:creator>Sfortunatamente</dc:creator>
      <dc:date>2023-07-04T13:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot import 'Layer' from arcgis.mapping</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-import-layer-from-arcgis-mapping/m-p/1608905#M11340</link>
      <description>&lt;P&gt;What do you mean AI? It's the ArcGIS documentation that shows code snippets that error.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;`ImportError&lt;/SPAN&gt;&lt;SPAN class=""&gt;: cannot import name 'WebMap' from 'arcgis.mapping'`&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; arcgis.mapping &lt;SPAN class=""&gt;import&lt;/SPAN&gt; WebMap, WebScene&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/latest/samples/publishing-web-maps-and-web-scenes/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/latest/samples/publishing-web-maps-and-web-scenes/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 14:02:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-import-layer-from-arcgis-mapping/m-p/1608905#M11340</guid>
      <dc:creator>hershy1234</dc:creator>
      <dc:date>2025-04-24T14:02:54Z</dc:date>
    </item>
  </channel>
</rss>

