Skip to main content

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

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


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.


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.

Reply