Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Detailed error: Traceback (most recent call last): File "<pyshell#58>", line 19, in <module> mycalc = r1 * r2 File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\sa\Functions.py", line 4298, in Times in_raster_or_constant2) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\sa\Utils.py", line 47, in swapper result = wrapper(*args, **kwargs) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\sa\Functions.py", line 4295, in Wrapper ["Times", in_raster_or_constant1, in_raster_or_constant2]) RuntimeError: ERROR 000824: The tool is not licensed.
See previous comment: it returns available. Running the for loop piece by piece shows that the problem is probably in the Times part, because the conversion into rasters goes fine.
I have the Spatial Analyst extension (arcpy.CheckExtension("Spatial") returns u'Available'). I added arcpy.sa to all the raster commands (I also tried mycalc = arcpy.sa.Times(r1, r2)). Still the license error pops up... Any other ideas?
edit: if I run the code in Python IDLE, I get the license error, but when I try to run the code in the python window within ArcGIS, it keeps on crashing...
Thank you Aaron for your help! Running the 'Times' tool, I do get an error however RuntimeError: ERROR 000824: The tool is not licensed. Any idea how to fix this? Following this thread I tried importing arcinfo, but that does not solve the problem. Secondly, if outws is just the same gdb as the inws, can I save the results to the gdb with the same .save command, but then just excluding the ".tif" extension?