<?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 WebMap object getting TraitError from webmapitem in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1115186#M6800</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm using the example from the&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.mapping.toc.html?highlight=webmap" target="_blank" rel="noopener"&gt;ArcGIS Python API doco&lt;/A&gt;&amp;nbsp;on how to search for portal items, filter by Web Map. From here I want to get the list of layers within this map but I'm getting an TraitError&amp;nbsp;&lt;/P&gt;&lt;P&gt;wm_item = gis.content.get('6229f30bb378405397b24615e8dcaf60')&lt;/P&gt;&lt;P&gt;wm = WebMap(wm_item)&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;TraitError&lt;/SPAN&gt;: The 'comm' trait of a Layout instance must be a Comm or None, but a value of class 'ipykernel.comm.comm.Comm' (i.e. &amp;lt;ipykernel.comm.comm.Comm object at 0x000002630B46DE48&amp;gt;) was specified.&lt;/PRE&gt;&lt;P&gt;Currently using the python within ArcGIS Pro 2.7 with Patch 4 applied.&lt;/P&gt;&lt;P&gt;Has anybody come across this/know what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 09 Nov 2021 07:34:09 GMT</pubDate>
    <dc:creator>AnthonyRyanEQL</dc:creator>
    <dc:date>2021-11-09T07:34:09Z</dc:date>
    <item>
      <title>WebMap object getting TraitError from webmapitem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1115186#M6800</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm using the example from the&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.mapping.toc.html?highlight=webmap" target="_blank" rel="noopener"&gt;ArcGIS Python API doco&lt;/A&gt;&amp;nbsp;on how to search for portal items, filter by Web Map. From here I want to get the list of layers within this map but I'm getting an TraitError&amp;nbsp;&lt;/P&gt;&lt;P&gt;wm_item = gis.content.get('6229f30bb378405397b24615e8dcaf60')&lt;/P&gt;&lt;P&gt;wm = WebMap(wm_item)&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;TraitError&lt;/SPAN&gt;: The 'comm' trait of a Layout instance must be a Comm or None, but a value of class 'ipykernel.comm.comm.Comm' (i.e. &amp;lt;ipykernel.comm.comm.Comm object at 0x000002630B46DE48&amp;gt;) was specified.&lt;/PRE&gt;&lt;P&gt;Currently using the python within ArcGIS Pro 2.7 with Patch 4 applied.&lt;/P&gt;&lt;P&gt;Has anybody come across this/know what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 07:34:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1115186#M6800</guid>
      <dc:creator>AnthonyRyanEQL</dc:creator>
      <dc:date>2021-11-09T07:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: WebMap object getting TraitError from webmapitem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1115355#M6802</link>
      <description>&lt;P&gt;Hello Anthony,&lt;/P&gt;&lt;P&gt;Where are you running this script from?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 18:46:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1115355#M6802</guid>
      <dc:creator>ABishop</dc:creator>
      <dc:date>2021-11-09T18:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: WebMap object getting TraitError from webmapitem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1222474#M7913</link>
      <description>&lt;P&gt;(old question, but I just ran into the same thing and found this, so I'm adding what worked for me so google will crawl it!)&lt;/P&gt;&lt;P&gt;As far as I could tell, this was basically just a problem the jupyter kernel being unhappy in Pro. Quitting and relaunching Pro cured the issue for me.&lt;/P&gt;&lt;P&gt;A little more detail on my situation: I wrote a python script and got it working the way I wanted, then used that as the basis for a Python Toolbox (.pyt). When running the tool created from the script, I was getting the "The 'comm' trait of a Layout instance expected a Comm or None trait" error while creating a WebMap from a web map item already retrieved from the portal. The standalone script continued to work; only the GP tool was failing in this way. Quitting and relaunching Pro cleared it up.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 13:35:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1222474#M7913</guid>
      <dc:creator>JeffreyBurka</dc:creator>
      <dc:date>2022-10-17T13:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: WebMap object getting TraitError from webmapitem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1330680#M9032</link>
      <description>&lt;P&gt;I found this post via Google, and restarting pro worked for me.&amp;nbsp; Thanks for the tip!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 15:59:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1330680#M9032</guid>
      <dc:creator>Chris_Kell</dc:creator>
      <dc:date>2023-09-20T15:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: WebMap object getting TraitError from webmapitem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1648519#M11622</link>
      <description>&lt;P&gt;I'm running into the same error, except the error statement reads a little bit different now:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;traitlets.traitlets.TraitError: The 'comm' trait of a Layout instance expected a Comm or None, not the Comm at '0x1ef84ef3d90'.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'm getting this error in a jupyter notebook, but also in the direct python window.&lt;/P&gt;&lt;P&gt;I'm on Pro v3.3.1 wirh Python v3.11.8&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2025 12:34:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-object-getting-traiterror-from-webmapitem/m-p/1648519#M11622</guid>
      <dc:creator>CSDING_GIS</dc:creator>
      <dc:date>2025-09-08T12:34:56Z</dc:date>
    </item>
  </channel>
</rss>

