<?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: Issues Accessing Pro Metadata with Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/issues-accessing-pro-metadata-with-python/m-p/1272885#M67281</link>
    <description>&lt;P&gt;Can you show the earlier part of your code where you access the input feature class? Are you able to view the metadata successfully from within Pro? As a cross-check, you could &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/metadata/export-metadata-to-a-standard-format.htm" target="_self"&gt;export the metadata&lt;/A&gt; to another format and confirm the contents are present in that XML. It should be possible to use &lt;FONT face="terminal,monaco" size="2"&gt;arcpy.metadata&lt;/FONT&gt;, but failing that the &lt;FONT face="terminal,monaco" size="2"&gt;lxml&lt;/FONT&gt; package can be used to extract information from any XML file.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 02:13:47 GMT</pubDate>
    <dc:creator>ShaunWalbridge</dc:creator>
    <dc:date>2023-03-29T02:13:47Z</dc:date>
    <item>
      <title>Issues Accessing Pro Metadata with Python</title>
      <link>https://community.esri.com/t5/python-questions/issues-accessing-pro-metadata-with-python/m-p/1271990#M67237</link>
      <description>&lt;P&gt;Hi I've been unable to access ArcGIS Pro metadata with Python and was wondering if anyone could help. I've been trying to use the documentation's (&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/metadata/metadata-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/metadata/metadata-class.htm&lt;/A&gt;) last example screenshotted below but when I run item_md.title with my item's metadata object, it outputs None.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Victoria_1-1679932556832.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66353i97E188542FD97E6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Victoria_1-1679932556832.png" alt="Victoria_1-1679932556832.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To test, this is what I outputted:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(item_metadata) # prints &amp;lt;arcpy.metadata.Metadata object at [address]&amp;gt;
print(item_metadata.title) # prints None
print(type(item_metadata.title)) # prints &amp;lt;class 'NoneType'&amp;gt;
print(item_metadata.description) # prints None
print(type(item_metadata.description)) # prints &amp;lt;class 'NoneType'&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;I found some similar forum posts from 2019 and 2020 without solutions but I was hoping that there'd be some updates by now. My arcgispro and arcpy python packages are both version 2.7.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Victoria_0-1679932328188.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66352i81817E17D92F082C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Victoria_0-1679932328188.png" alt="Victoria_0-1679932328188.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 16:06:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/issues-accessing-pro-metadata-with-python/m-p/1271990#M67237</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-03-27T16:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Accessing Pro Metadata with Python</title>
      <link>https://community.esri.com/t5/python-questions/issues-accessing-pro-metadata-with-python/m-p/1272885#M67281</link>
      <description>&lt;P&gt;Can you show the earlier part of your code where you access the input feature class? Are you able to view the metadata successfully from within Pro? As a cross-check, you could &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/metadata/export-metadata-to-a-standard-format.htm" target="_self"&gt;export the metadata&lt;/A&gt; to another format and confirm the contents are present in that XML. It should be possible to use &lt;FONT face="terminal,monaco" size="2"&gt;arcpy.metadata&lt;/FONT&gt;, but failing that the &lt;FONT face="terminal,monaco" size="2"&gt;lxml&lt;/FONT&gt; package can be used to extract information from any XML file.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 02:13:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/issues-accessing-pro-metadata-with-python/m-p/1272885#M67281</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2023-03-29T02:13:47Z</dc:date>
    </item>
  </channel>
</rss>

