<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Odd Error in Metadata Script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/odd-error-in-metadata-script/m-p/463433#M36328</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to resolve the error by using the ESRI Metadata Translator utility instead of the export metadata. If anyone receives this error in the future, you may want to try the translator as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2015 04:59:28 GMT</pubDate>
    <dc:creator>benberman</dc:creator>
    <dc:date>2015-03-13T04:59:28Z</dc:date>
    <item>
      <title>Odd Error in Metadata Script</title>
      <link>https://community.esri.com/t5/python-questions/odd-error-in-metadata-script/m-p/463432#M36327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone point out what's going on here? Error code is&lt;/P&gt;&lt;P&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\conversion.py", line 624, in ExportMetadata&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/P&gt;&lt;P&gt;ExecuteError: ERROR 000582: Error occurred during execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;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"):
&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename in filenames:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print filename
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; translator = r'C:\Program Files (x86)\ArcGIS\Desktop10.2\Metadata\Translator\ARCGIS2FGDC.xml'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ExportMetadata_conversion(os.path.join(dirpath,filename),translator,os.path.join(metadataout,str(filename).split(".")[0]+'.xml'))&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:35:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/odd-error-in-metadata-script/m-p/463432#M36327</guid>
      <dc:creator>benberman</dc:creator>
      <dc:date>2021-12-11T20:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Error in Metadata Script</title>
      <link>https://community.esri.com/t5/python-questions/odd-error-in-metadata-script/m-p/463433#M36328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to resolve the error by using the ESRI Metadata Translator utility instead of the export metadata. If anyone receives this error in the future, you may want to try the translator as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 04:59:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/odd-error-in-metadata-script/m-p/463433#M36328</guid>
      <dc:creator>benberman</dc:creator>
      <dc:date>2015-03-13T04:59:28Z</dc:date>
    </item>
  </channel>
</rss>

