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?
I am running ArcGIS Pro v2.5.0, and have the exact same issue. Did you ever figure this out?
BUG-000129978: In Arcpy Metadata, the metadata stays empty (NULL) o..
BUG-000129839: Unable to access or edit the metadata in ArcGIS Pro ..
could be the issue
Ahh good find Dan, thanks. Here's to hoping it does indeed get resolved in v2.7