1

So I developed a script that traverses through a root directory, and any subdirectories and catalogs layers files. Then exports these layer files' FGDC metadata and outputs them to a folder. The code at this point is hit/miss sometimes completes and sometimes processes "most" of the input and errors out close to being done.

Can anyone point out what's going on here? Error code is:

File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\conversion.py", line 624, in ExportMetadata raise e

ExecuteError: ERROR 000582: Error occurred during execution.

import arcpy,os 
arcpy.env.overwriteOutput=True 
metadataout=r'C:\tmp\out' 
for dirpath,dirnames,filenames in arcpy.da.Walk(r'C:\folder\files',datatype="Layer"): 
 for filename in filenames: 
 print filename 
 translator = r'C:\Program Files (x86)\ArcGIS\Desktop10.2\Metadata\Translator\ARCGIS2FGDC.xml' 
 arcpy.ExportMetadata_conversion(os.path.join(dirpath,filename),translator,os.path.join(metadataout,str(filename).split(".")[0]+'.xml')) 
PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Mar 11, 2015 at 22:28

1 Answer 1

0

The python code for the ESRI Metadata Translator instead of the export command seemed to solve the issue.

answered Apr 24, 2015 at 17:58
1
  • Somehow this answer automatically got downvoted by the "Community" bot because it is so short. I apologize for that. Commented Apr 24, 2015 at 18:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.