Skip to main content
Question

Unable to run Python Script for metadata functions of arcpy

  • June 1, 2016
  • 3 replies
  • 21 views

Forum|alt.badge.img+1

I am getting the error when running the metadata function of arcpy function:

arcpy.MetadataImporter_conversion (MetadataFile, TargetGenESISData)

FME API version of module 'PythonFactory' matches current internal version (3.8 20151127)

The user-specified Python interpreter `C:\\Windows\\System32\\python27.dll' is version 2.7

Python version 2.7 loaded successfully

FME API version of module 'PythonFactory' matches current internal version (3.8 20151127)

FME API version of module 'PythonFactory' matches current internal version (3.8 20151127)

Emptying factory pipeline

Unhandled Exception:

System.IO.FileNotFoundException: Could not load file or assembly 'GpMetadataFunctions, Version=10.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The system cannot find the file specified.

File name: 'GpMetadataFunctions, Version=10.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86'

at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.Load(String assemblyString)

at GetManagedType(Char* _assembly, Char* _path, Char* _className)

Please let me know what to do

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • June 2, 2016

Hi

That looks like an ArcGIS error message.

This was my first hit using Google: https://geonet.esri.com/thread/61030

Could you try the solution listed there and tell us if it resolves the problem?

David


Forum|alt.badge.img+1
  • Author
  • May 24, 2017

Hello Everyone,

The above solution posted by david_r and specified in GeoNet definitely works and you would need to do the GAC adding after each upgrade of ArcGIS from 10.x and higher.

Getting gacutil.exe required another google search. For Windows 7,go to link Code Project Link and run cmd.exe in command line with administrative privileges and run command as "GACutilLocation\\gacutil.exe" /i "C:\\Program Files (x86)\\ArcGIS\\Desktop10.0\\Bin\\GpMetadataFunctions.dll"

I hope the above helps.


david_r
Celebrity
  • May 25, 2017

Hello Everyone,

The above solution posted by david_r and specified in GeoNet definitely works and you would need to do the GAC adding after each upgrade of ArcGIS from 10.x and higher.

Getting gacutil.exe required another google search. For Windows 7,go to link Code Project Link and run cmd.exe in command line with administrative privileges and run command as "GACutilLocation\\gacutil.exe" /i "C:\\Program Files (x86)\\ArcGIS\\Desktop10.0\\Bin\\GpMetadataFunctions.dll"

I hope the above helps.

Great to hear that you found a solution and thanks for sharing it here.