Import Meta Data fail

882
3
Jump to solution
04-25-2018 07:12 AM
JoeBorgione
MVP Emeritus

I have a script that runs a a scheduled task: it first deletes features in a target feature class and then appends features to that target from a source.  That part of the script works fine.  However, the last part of the script attempts to import meta data from the source to the target and fails with a generic error of "Object: Error in executing tool".  I can run import metadata from an arc catalog python without a problem.  Not sure what I should be looking for....

    try:
        arcpy.MetadataImporter_conversion(SourceFeatureClass,TargetFeatureClass)
        print 'Successfully Imported Metadata From {} To {}'.format(SourceFeatureClass,TargetFeatureClass)
    except Exception as err:
        print err
        sendEmail(err)
That should just about do it....
0 Kudos
1 Solution

Accepted Solutions
JoeBorgione
MVP Emeritus

ESRI tech support has suggested that the issue is due to a 64 bit install of python.exe and a 32 bit import metadata conversion tool.  The computer that runs the scheduled task has two python installs:

C:\Python27\ArcGIS10.5

and

C:\Python27\ArcGISx6410.5

He would like me to 'point' the scheduled task script to the 32 bit exe, but doesn't offer a suggestion as to how to do it.  Any suggestions?

eta:  I went to the script in question, and with a right click chose 'Open With' and selected the 32bit python.exe.

That should just about do it....

View solution in original post

3 Replies
JoeBorgione
MVP Emeritus

ESRI tech support has suggested that the issue is due to a 64 bit install of python.exe and a 32 bit import metadata conversion tool.  The computer that runs the scheduled task has two python installs:

C:\Python27\ArcGIS10.5

and

C:\Python27\ArcGISx6410.5

He would like me to 'point' the scheduled task script to the 32 bit exe, but doesn't offer a suggestion as to how to do it.  Any suggestions?

eta:  I went to the script in question, and with a right click chose 'Open With' and selected the 32bit python.exe.

That should just about do it....
DanPatterson_Retired
MVP Emeritus

remove 64-bit python 2.7 would be my suggestion... you can use ArcGIS Pro your 64-bit needs.

0 Kudos
JoeBorgione
MVP Emeritus

This particular machine does not have pro on it: it's a server.  I think I have it figured out though, as some of the other guys have had the same problem.  In the task scheduler, you mojo around with the settings and point the trigger to the 32 bit python.exe and add the script name as an argument....

That should just about do it....
0 Kudos