I am able to call out and update the temporal extent begin and end dates, but the Description field is also required in ArcCatalog for metadata creation. In my script, I am trying to define it as:

temporal_extent_description = metadata.temporal_extent_description
metadata.temporal_extent_description = "2012-2016"

When I run my script, I do not get any error, and from the Python module in ArcMap, I can call out the field that I inputted by:

print (metadata.temporal_extent_description)

But, if I open the metadata page in ArcCatalog, the box is blank and red indicating that I have not satisfied the required element.

Code that is being submitted in ArcMap:

import arcpy_metadata as md
metadata = md.MetadataEditor(path to fc)

title = metadata.title
metadata.title = "There are many variations of passages"

purpose = metadata.purpose
metadata.purpose = "There are many variations of passages..."

abstract = metadata.abstract
metadata.abstract = "There are many variations of passages..."

temporal_extent_description = metadata.temporal_extent_description
metadata.temporal_extent_description = "2012-2016"

temporal_extent_start = metadata.temporal_extent_start
metadata.temporal_extent_start = "20100101"

temporal_extent_end = metadata.temporal_extent_end
metadata.temporal_extent_end = "20140101"


Code that's being called upon in the arcpy_metadata library:

"temporal_extent_description": {
        "path": "dataIdInfo/dataExt/tempDesc",
        "type": "string"},
  • 1
    How are you accessing the metadata through arcpy, are you using a module you have installed? To my knowledge there is no way through the standard arcpy module to interact with specific parts of the metadata? You are not telling us the full story... – Hornbydd Jul 17 '18 at 12:02
  • Accessing the metadata through a script that I'm loading into the Python module in ArcMap 10.5 – Dave Jul 17 '18 at 12:07
  • 1
    At the moment you appear to be presenting a copy/paste of a few lines from your code rather than a code snippet that illustrates what you have tried and where you are stuck. What code creates your metadata object? – PolyGeo Jul 17 '18 at 12:23
  • 1
    Added submission code and library element code. – Dave Jul 17 '18 at 12:51
  • So this is a third-party module misbehaving and not necessarily anything you are doing wrong. Suggest you contact the author? I suspect their source code is not committing the changes you are making and would require debugging their source code and thus beyond this forum. – Hornbydd Jul 17 '18 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.