<?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 Issue with ArcPy Metadata in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/151869#M11715</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been looking at the new metadata module that has recently been added to ArcPy and having trouble with using it outside of ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the documentation (&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/metadata/metadata-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/metadata/metadata-class.htm"&gt;Metadata—Metadata module | Documentation&lt;/A&gt;) there is this sample:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; arcpy &lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;aprx = arcpy.mp.ArcGISProject(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;r"C:\Projects\data_management.aprx"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #f8f8f8; color: #595959; "&gt;aprx_metadata = aprx.metadata&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #f8f8f8; color: #595959; "&gt;print(aprx_metadata.title)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #f8f8f8; color: #595959; "&gt;print(aprx_metadata.description)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine in ArcGIS Pro e.g.&lt;/P&gt;&lt;P&gt;&lt;IMG class="j-img-floatstart image-1 jive-image" src="https://community.esri.com/legacyfs/online/497659_pastedImage_4.png" style="float: left;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when running outside of ArcGIS Pro it is not getting the metadata e.g.&lt;/P&gt;&lt;P&gt;&lt;IMG class="j-img-floatstart image-2 jive-image" src="https://community.esri.com/legacyfs/online/497690_pastedImage_5.png" style="float: left;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is using ArcGIS Pro 2.5.1. It seems to be okay for metadata on datasets, but not for projects, layers and maps from my testing. I'm not sure if this is a bug or if there is something else I need to be doing when executing the code outside of ArcGIS Pro?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jun 2020 00:42:43 GMT</pubDate>
    <dc:creator>sweston_doc</dc:creator>
    <dc:date>2020-06-24T00:42:43Z</dc:date>
    <item>
      <title>Issue with ArcPy Metadata</title>
      <link>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/151869#M11715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been looking at the new metadata module that has recently been added to ArcPy and having trouble with using it outside of ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the documentation (&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/metadata/metadata-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/metadata/metadata-class.htm"&gt;Metadata—Metadata module | Documentation&lt;/A&gt;) there is this sample:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; arcpy &lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;aprx = arcpy.mp.ArcGISProject(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;r"C:\Projects\data_management.aprx"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #f8f8f8; color: #595959; "&gt;aprx_metadata = aprx.metadata&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #f8f8f8; color: #595959; "&gt;print(aprx_metadata.title)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #f8f8f8; color: #595959; "&gt;print(aprx_metadata.description)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine in ArcGIS Pro e.g.&lt;/P&gt;&lt;P&gt;&lt;IMG class="j-img-floatstart image-1 jive-image" src="https://community.esri.com/legacyfs/online/497659_pastedImage_4.png" style="float: left;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when running outside of ArcGIS Pro it is not getting the metadata e.g.&lt;/P&gt;&lt;P&gt;&lt;IMG class="j-img-floatstart image-2 jive-image" src="https://community.esri.com/legacyfs/online/497690_pastedImage_5.png" style="float: left;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is using ArcGIS Pro 2.5.1. It seems to be okay for metadata on datasets, but not for projects, layers and maps from my testing. I'm not sure if this is a bug or if there is something else I need to be doing when executing the code outside of ArcGIS Pro?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2020 00:42:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/151869#M11715</guid>
      <dc:creator>sweston_doc</dc:creator>
      <dc:date>2020-06-24T00:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ArcPy Metadata</title>
      <link>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/151870#M11716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running ArcGIS Pro v2.5.0, and have the exact same issue. Did you ever figure this out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2020 19:16:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/151870#M11716</guid>
      <dc:creator>GB_MattPanunto_GISS</dc:creator>
      <dc:date>2020-09-03T19:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ArcPy Metadata</title>
      <link>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/151871#M11717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEyOTk3OA==" title="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEyOTk3OA=="&gt;BUG-000129978: In Arcpy Metadata, the metadata stays empty (NULL) o..&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEyOTgzOQ==" title="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEyOTgzOQ=="&gt;BUG-000129839: Unable to access or edit the metadata in ArcGIS Pro ..&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could be the issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2020 20:14:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/151871#M11717</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-09-03T20:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ArcPy Metadata</title>
      <link>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/151872#M11718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh good find Dan, thanks. Here's to hoping it does indeed get resolved in v2.7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2020 21:43:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/151872#M11718</guid>
      <dc:creator>GB_MattPanunto_GISS</dc:creator>
      <dc:date>2020-09-03T21:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ArcPy Metadata</title>
      <link>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/1561401#M73228</link>
      <description>&lt;P&gt;&lt;A href="https://support.esri.com/en-us/bug/unable-to-access-or-edit-the-metadata-in-arcgis-pro-thr-bug-000129839" target="_blank" rel="noopener"&gt;https://support.esri.com/en-us/bug/unable-to-access-or-edit-the-metadata-in-arcgis-pro-thr-bug-000129839&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm using Pro v. 3.3.2. It looks to be fixed as of June 2024. I ran this on a Pro project in my code editor. The &lt;STRONG&gt;None&lt;/STRONG&gt;s you see are only because the metadata is missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
aprx = arcpy.mp.ArcGISProject(r"pathtoAPRX\COUNTY_BOARD_A.aprx")

for m in aprx.listMaps():
    for l in m.listLayers():
        layer_metadata = l.metadata
        nl = "\n"
        try:
            print(f'title: | {layer_metadata.title}')
            print(f'desc: {layer_metadata.description}')
            print(f'summary: {layer_metadata.summary}')
            print(f'tags: {layer_metadata.tags}{nl}')
        except AttributeError as e:
            print(e)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;title: | None
desc: None
summary: None
tags: None

'bool' object has no attribute 'title'
'bool' object has no attribute 'title'
'bool' object has no attribute 'title'
'bool' object has no attribute 'title'
'bool' object has no attribute 'title'
'bool' object has no attribute 'title'
title: | gisedit.DBO.Ref_County_Limits
desc: This boundary file has no other pupose than to represent Will County's limits. There are no attribute data besides Esri's internal fields.
summary: None
tags: None

title: | gisedit.DBO.Ref_Surrounding_Counties
desc: Surrounding County Boundaries. US Census data is included in the attribute table.
summary: None
tags: None

title: | Townships
desc: 
summary: None
tags: None

title: | gisedit.DBO.Street
desc: Right-of-Way (ROW) centerlines that has the street name within the segment and located within Will County. The data entered is by some type of governmental documentation (recorded plat, ordinance, plat of dedication/vacation, etc.). This layer is continually updated by the Will County 9-1-1 GIS Department. There is a ½ mile buffer of streets outside of Will County and could be incorrect.
summary: None
tags: None

title: | CountyBoard
desc: 
summary: None
tags: None&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 19:14:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/issue-with-arcpy-metadata/m-p/1561401#M73228</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2024-11-21T19:14:31Z</dc:date>
    </item>
  </channel>
</rss>

