ArcGIS has a beautiful way with words Error 999999 is my particular favourite message from ArcGIS:
This is a generic error for which the cause does not have a specific error ID.
However a recent error when running a script to import Metadata got me stumped, below is a brief description of the problem and the steps that seem to have fixed it.
Running the Metadata Importer got me this message:
Executing: MetadataImporter “LOCATION\FILE.MXD” “LOCATION\FILE.MXD”
Start Time: Wed Sep 11 14:49:37 2013
Unable to obtain IMetadata from: LOCATION\FILE.MXD ; Invalid character in the given encoding. Line 1, position 1.
Unable to obtain IMetadata from: LOCATION\FILE.MXD
Failed to execute (MetadataImporter).
Failed at Wed Sep 11 14:49:37 2013 (Elapsed Time: 0.00 seconds)
I couldn’t figure it out as I could see no other posts on the ArcGIS forums that described this problem. Plenty of posts of the same message but no fixes other than through coding. Some of the solutions talked about UNICODE issues, so I typed in “unicode and arcgis”, one of the links brought me to this post and this image caught my eye:
What I did was change in ArcCatalog the table font to “Arial Unicode MS”.
I then went and selected the MXD with metadata I wanted to change and deleted the title and re-typed any text of a small length.
Then I ran the script again and it worked, no error messages and the metadat has now been imported.
Thoughts: Is this a text formatting issue? I haven’t time to muck about looking into this but my hunch is that the metadata editor allows html formatting and somehow some hidden text formatting got in. This would make sense as deleting the old title and retyping it again worked… hmmm