<?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 'Items' missing from legend element in ArcPro 2.6 in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/items-missing-from-legend-element-in-arcpro-2-6/m-p/1075515#M42898</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm currently trying to call legend items from a layout element. However, on calling the .items attribute the following error is thrown:&lt;/P&gt;&lt;P&gt;&amp;lt;class 'arcpy._mp.LegendElement'&amp;gt;&lt;/P&gt;&lt;P&gt;'LegendElement' object has no attribute 'items'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;List of attributes related to LegendElement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__from_scripting_arc_object__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_arc_object', 'elementHeight', 'elementPositionX', 'elementPositionY', 'elementRotation', 'elementWidth', 'mapFrame', 'name', 'showTitle', 'syncLayerOrder', 'syncLayerVisibility', 'syncNewLayer', 'syncReferenceScale', 'title', 'type', 'visible']&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example code&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;legend&amp;nbsp;=&amp;nbsp;fepExportTemplate.listElements('LEGEND_ELEMENT')[0]&lt;/P&gt;&lt;P&gt;print(type(legend)) # returns LegendElement&lt;/P&gt;&lt;P&gt;print(str(legend.items)) # produces error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Testing this on a different machine with a copy of the data allowed the .items attribute to show up fine. Beacause of this I tried running the arcpy.getInstallInfo() method to compare the two environments. The main difference that I can see is the different are the ArcGIS Pro versions, but apparently updating the version of ArcGIS Pro used by ArcServer is not an option. See below for the differences between the two.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original data (.items attribute doesn't work)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;{'LicenseLevel': 'Advanced', 'Installer': 'gisadmin', 'ProductName': 'Server', 'Version': '10.8.1', 'SourceDir': 'D:\\_geoworx\\unpack\\ArcGIS 10.8.1\\ArcGISServer\\SetupFiles\\', 'InstallType': 'N/A', 'BuildNumber': '24234', 'InstallDate': '08/08/2020', 'InstallTime': '14:35:52', 'SPNumber': 'N/A', 'SPBuild': 'N/A', 'ProVersion': '2.6.0'}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Copied data on separate computer (.items attribute works)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;{'LicenseLevel': 'Advanced', 'Installer': 'AngusHunt', 'ProductName': 'ArcGISPro', 'Version': '2.8', 'SourceDir': 'C:\\Users\\AngusHunt\\Documents\\ArcGIS Pro 2.8\\ArcGISPro\\', 'InstallType': 'N/A', 'BuildNumber': '29751', 'InstallDate': '21/05/2021', 'InstallTime': '13:34:22', 'SPNumber': 'N/A', 'SPBuild': 'N/A'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas would be very helpful.&lt;/P&gt;</description>
    <pubDate>Sun, 04 Jul 2021 21:58:49 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-07-04T21:58:49Z</dc:date>
    <item>
      <title>'Items' missing from legend element in ArcPro 2.6</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/items-missing-from-legend-element-in-arcpro-2-6/m-p/1075515#M42898</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm currently trying to call legend items from a layout element. However, on calling the .items attribute the following error is thrown:&lt;/P&gt;&lt;P&gt;&amp;lt;class 'arcpy._mp.LegendElement'&amp;gt;&lt;/P&gt;&lt;P&gt;'LegendElement' object has no attribute 'items'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;List of attributes related to LegendElement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__from_scripting_arc_object__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_arc_object', 'elementHeight', 'elementPositionX', 'elementPositionY', 'elementRotation', 'elementWidth', 'mapFrame', 'name', 'showTitle', 'syncLayerOrder', 'syncLayerVisibility', 'syncNewLayer', 'syncReferenceScale', 'title', 'type', 'visible']&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example code&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;legend&amp;nbsp;=&amp;nbsp;fepExportTemplate.listElements('LEGEND_ELEMENT')[0]&lt;/P&gt;&lt;P&gt;print(type(legend)) # returns LegendElement&lt;/P&gt;&lt;P&gt;print(str(legend.items)) # produces error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Testing this on a different machine with a copy of the data allowed the .items attribute to show up fine. Beacause of this I tried running the arcpy.getInstallInfo() method to compare the two environments. The main difference that I can see is the different are the ArcGIS Pro versions, but apparently updating the version of ArcGIS Pro used by ArcServer is not an option. See below for the differences between the two.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original data (.items attribute doesn't work)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;{'LicenseLevel': 'Advanced', 'Installer': 'gisadmin', 'ProductName': 'Server', 'Version': '10.8.1', 'SourceDir': 'D:\\_geoworx\\unpack\\ArcGIS 10.8.1\\ArcGISServer\\SetupFiles\\', 'InstallType': 'N/A', 'BuildNumber': '24234', 'InstallDate': '08/08/2020', 'InstallTime': '14:35:52', 'SPNumber': 'N/A', 'SPBuild': 'N/A', 'ProVersion': '2.6.0'}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Copied data on separate computer (.items attribute works)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;{'LicenseLevel': 'Advanced', 'Installer': 'AngusHunt', 'ProductName': 'ArcGISPro', 'Version': '2.8', 'SourceDir': 'C:\\Users\\AngusHunt\\Documents\\ArcGIS Pro 2.8\\ArcGISPro\\', 'InstallType': 'N/A', 'BuildNumber': '29751', 'InstallDate': '21/05/2021', 'InstallTime': '13:34:22', 'SPNumber': 'N/A', 'SPBuild': 'N/A'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas would be very helpful.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jul 2021 21:58:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/items-missing-from-legend-element-in-arcpro-2-6/m-p/1075515#M42898</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-07-04T21:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: 'Items' missing from legend element in ArcPro 2.6</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/items-missing-from-legend-element-in-arcpro-2-6/m-p/1075518#M42899</link>
      <description>&lt;P&gt;Different versions of arcpy.&lt;/P&gt;&lt;P&gt;Pro's&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/legendelement-class.htm" target="_blank"&gt;LegendElement—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;items is a readonly property&lt;/P&gt;&lt;P&gt;and in CIM&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/legendelement-class.htm" target="_blank"&gt;LegendElement—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jul 2021 22:11:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/items-missing-from-legend-element-in-arcpro-2-6/m-p/1075518#M42899</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-07-04T22:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: 'Items' missing from legend element in ArcPro 2.6</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/items-missing-from-legend-element-in-arcpro-2-6/m-p/1075520#M42900</link>
      <description>&lt;P&gt;Thanks Dan, that makes sense. Do you know if it is possible to update the Arcpy packages on an ArcGIS Server?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jul 2021 22:14:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/items-missing-from-legend-element-in-arcpro-2-6/m-p/1075520#M42900</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-07-04T22:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: 'Items' missing from legend element in ArcPro 2.6</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/items-missing-from-legend-element-in-arcpro-2-6/m-p/1075522#M42901</link>
      <description>&lt;P&gt;Don't know Angus, not a server user, but I was under the impression that server had python 2 and python 3 variants.&amp;nbsp; python 3 is what Pro uses, so check your server documentation.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jul 2021 22:18:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/items-missing-from-legend-element-in-arcpro-2-6/m-p/1075522#M42901</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-07-04T22:18:02Z</dc:date>
    </item>
  </channel>
</rss>

