Spatial Analyst, Lookup, Beta 2 - ERROR 010067: Error in executing grid expression

2563
2
02-16-2010 11:23 PM
StefanOffermann
Occasional Contributor II
Hi,

the last days I tried to convert a python script from 9.3.1 to ArcGIS 10 Beta 2. Most of the conversion works fine as it is as simple as changing captalization of field.type or row.GetValue. The nice thing is the availablility to iterate over a cursor with a for-loop, instead of calling cursor.Next().

But:
The final lines of my script execute a Lookup, which is not working. It produces some errors, but I am not able to detect the reason. Lets see my code:

import arcpy as gp

combined = r'C:\data.gdb\combined'
betaField = 'Beta_final'
betaMap = r'C:\data.gdb\BetaMap'

print 'Spatial Analyst: %s' % gp.CheckExtension("Spatial")
print ' License: %s' % gp.CheckOutExtension("Spatial")
print 'Lookup'
raster = gp.sa.Lookup(combined, betaField)
print 'Save'
raster.save(betaMap)
print 'Done'

The line with gp.sa.Lookup(...) fails:

Traceback (most recent call last):
File "C:\Scripts\test\TestLookup.py", line 14, in <module>
raster = gp.sa.Lookup(combined, betaField)
File "C:\Program Files\ArcGIS\Desktop9.4\arcpy\arcpy\sa\Functions.py", line 5708, in Lookup
lookup_field)
File "C:\Program Files\ArcGIS\Desktop9.4\arcpy\arcpy\sa\Utils.py", line 67, in swapper
result = wrapper(*args, **kwargs)
File "C:\Program Files\ArcGIS\Desktop9.4\arcpy\arcpy\sa\Functions.py", line 5702, in wrapper
out_raster)
File "C:\Program Files\ArcGIS\Desktop9.4\arcpy\arcpy\geoprocessing\_base.py", line 438, in <lambda>
return lambda *args: val(*gp_fixargs(args))
arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
The table was not found. [VAT_Lookup_combi6]
The item was not found. [RelationshipType (origin/destination typeIDs): {F3783E6F-65CA-4514-8315-CE3985DAD3B1}, {D4912162-3413-476E-9DA4-2AEFBBC16939}]
The item was not found. [RelationshipType (origin/destination typeIDs): {F3783E6F-65CA-4514-8315-CE3985DAD3B1}, {5ED667A3-9CA9-44A2-8029-D95BF23704B9}]
No spatial reference exists.
ERROR 010067: Error in executing grid expression.
Failed to execute (Lookup).

Any hints why Lookup does not work?
What do the GUIDs mean?
I dont have a clue what "No spatial reference exists" means. The raster has a spatial reference, namely WGS_1984_UTM_Zone_37S
0 Kudos
2 Replies
StefanOffermann
Occasional Contributor II
combined = r'C:\data.gdb\combined'


Seems the File Geodatabase is the root of the error. When I export the raster with raster attribute table as C:\combined.img the Lookup works! Is it a bug in the geodatabase?
0 Kudos
curtvprice
MVP Esteemed Contributor
Any map algebra expression with a dot in my experience is problematic. It's possible you may have better luck if you use Gp.Workspace so you don't need to put the ".gdb" in the path to the raster.
0 Kudos