ERROR

Runtime Error: Failed to save metadata of a feature class in an enterprise geodatabase

Last Published: September 4, 2025

Error Message

Saving edits made to metadata (edit metadata content or delete the geoprocessing history) using a Python script might result in the following error message: 

RuntimeError: Failed to save metadata.

Cause

This error can be attributed to different reasons (permissions, format, etc.), but in an enterprise geodatabase, the main reason why it might fail to save metadata data, especially after deleting geoprocessing history, is that the associated feature class/database object is not registered with the geodatabase.

Metadata in a geodatabase is stored in the GDB_Items table (Documentation column) as XML. Therefore, if a feature class/database object is not registered with the geodatabase, there will be no metadata associated metadata item.

Solution or Workaround

  • Register the feature class/database object with the geodatabase if need be.
  • If registering is not needed, write the script to handle the error (use try and except functions for error handling).

 

Article ID: 000035643

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options