Issue with ArcPy Metadata

714
3
06-23-2020 05:42 PM
sweston_doc
New Contributor

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.

In the documentation (Metadata—Metadata module | Documentation) there is this sample:

import arcpy

aprx = arcpy.mp.ArcGISProject(r"C:\Projects\data_management.aprx")

aprx_metadata = aprx.metadata

print(aprx_metadata.title)

print(aprx_metadata.description)

This works fine in ArcGIS Pro e.g.

But when running outside of ArcGIS Pro it is not getting the metadata e.g.

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?

0 Kudos
3 Replies
GB_MattPanunto_GISS
Occasional Contributor

I am running ArcGIS Pro v2.5.0, and have the exact same issue. Did you ever figure this out?

0 Kudos
DanPatterson
MVP Esteemed Contributor
GB_MattPanunto_GISS
Occasional Contributor

Ahh good find Dan, thanks. Here's to hoping it does indeed get resolved in v2.7

0 Kudos