AnsweredAssumed Answered

ERROR 000840: The value is not a File. Failed to execute (PackageResult)

Question asked by don.morrison on Nov 10, 2019
Latest reply on Nov 20, 2019 by KKramer-esristaff

I'm trying to do something that looks pretty simple, but isn't working for me.  The code below is running a python tool then calling the API to package the tool.  The tool runs great and I get the result object as expected/ But the package request fails with this error: 


*** arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000800: The value is not a member of _PYTHON__RESULT__{44960780-1946-4AF7-B9FD-8AAD7585504E} | _PYTHON__RESULT__{61DCE3A6-3E2E-4AE6-8E7F-DEC9042BC235}.
ERROR 000840: The value is not a File.
Failed to execute (PackageResult).


I've tried everything I can think of to isolate the cause - but no luck. Here is the code 


import arcpy
import os


results = arcpy.sharedtools.ImportGeodatabase(

out_file = os.path.normpath('E:/ROW_as_habitat/temp/importgdb.gpkx')


arcpy.PackageResult_management(results, out_file, convert_data='PRESERVE')