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


arcpy.ImportToolbox(os.path.normpath('row_toolbox/SharedTools.pyt'))


results = arcpy.sharedtools.ImportGeodatabase(
'UIC',
os.path.normpath('E:/ROW_as_habitat/temp/ROWHWG_Database.gdb'),
'https://utility.arcgis.com/usrsvcs/servers/af1446382d3f441f859c305d15601085/rest/services/ROW_testing/UIC/FeatureServer',
True)


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

 

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

Outcomes