<?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: Metadata scripting - 10.X Failure in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/metadata-scripting-10-x-failure/m-p/773674#M840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Louie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I just wanted to say that I was having this exact problem (able to run in ArcCatalog but not via a script). After running the PowerShell commands, I was able to run the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Peggy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2020 20:14:42 GMT</pubDate>
    <dc:creator>PeggyFung</dc:creator>
    <dc:date>2020-08-17T20:14:42Z</dc:date>
    <item>
      <title>Metadata scripting - 10.X Failure</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/metadata-scripting-10-x-failure/m-p/773673#M839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We found some code and modified it to go through our SDE data and remove certain information such as server names from our metadata using the arcpy.XSLTransform_conversion and&amp;nbsp;arcpy.MetadataImporter_conversion . The tools to do this process work from the application with each upgrade/new install however the scripting will fail because arcpy is looking for a couple of libraries in the GAC that are not registered.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current environments do not have the gacutility and it can be difficult to find, so I found the instructions for using Powershell.&amp;nbsp; I pass this on to all those who have a similar issue, you would think that ESRI would fix such a thing but metadata is obviously a low priority, look at how ArcGIS Pro is coming along in this area, disappointing.&lt;/P&gt;&lt;P&gt;-------&amp;nbsp; What you&amp;nbsp; need to know&lt;/P&gt;&lt;P&gt;The dlls are at YOURDDRIVE:\Program Files (x86)\ArcGIS\Desktop10.6\bin&amp;nbsp; {10.6 would be whatever version}&lt;/P&gt;&lt;P&gt;MetadataTranslator.dll,&amp;nbsp;GpMetadataFunctions.dll&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run Powershell in Admin mode and run commands, see below.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Comment:&amp;nbsp; Startup system reflection&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$publish = New-Object System.EnterpriseServices.Internal.Publish&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Comment: use reflection to install dll into GAC.&amp;nbsp;&amp;nbsp;I moved the dll to temp location but that is not neccessary, it just makes the path a little less of a problem with all the spaces in the name etc.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$publish.GacInstall("c:\temp\MetadataTranslator.dll")&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Comment: Note $publish.GacRemove should remove a library from GAC.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Verify install:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Comment: use reflection to confirm it has been added to GAC&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;([system.reflection.assembly]::loadfile("c:\temp\MetadataTranslator.dll")).FullName&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2019 16:06:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/metadata-scripting-10-x-failure/m-p/773673#M839</guid>
      <dc:creator>LouieRowley</dc:creator>
      <dc:date>2019-09-19T16:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Metadata scripting - 10.X Failure</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/metadata-scripting-10-x-failure/m-p/773674#M840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Louie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I just wanted to say that I was having this exact problem (able to run in ArcCatalog but not via a script). After running the PowerShell commands, I was able to run the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Peggy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2020 20:14:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/metadata-scripting-10-x-failure/m-p/773674#M840</guid>
      <dc:creator>PeggyFung</dc:creator>
      <dc:date>2020-08-17T20:14:42Z</dc:date>
    </item>
  </channel>
</rss>

