arcpy.gp.Lookup_sa and arcpy.gp.Lookup_3D output bad results when running from a stand-alone script on a file geodatabase raster dataset with a string or short as the input field in ArcMap 10.6.
Duplicate of BUG-000113470: This issue is not reproducible in 10.6.1 : when running the tool script with string/short field as the Lookup Field, the output raster in grid format is empty.
For other output formats (tif, fgdb), the issue of empty output is reproducible, which is essentially the same as BUG-000113470.
解决办法
1. Convert the short fields to long using the Field Calculator. Run Lookup on the Long fields.2. Adjust scripts to run in Python 3.6 using arcpy.ddd.Lookup_3D.