I always get this Error when i do simple raster calculations with arcpy. i use PyScripter 2.7.5 and ArcGIS 10.2.1 :
Invalid floating point operation
Exception class: EInvalidOp
Exception message: Invalid floating point operation.
Exception address: 00007FF93BB646BE
------------------------------------------------------------------------------
PyScripter version : 2.5.3.0 x64
Python DLL : python27.dll
Python Engine : peInternal
I think its an ArcSDE only memory/cache problem. I tried things like arcpy.ClearWorkspaceCache_management() but it didnt help.
Any suggestions?
Thx
My Program:
#simple raster calculation of a list of rasters
outRas = Int(Raster('test1') + Raster('test2'))
outRas.save(destination + '/' + 'test3')
My program works for "n" but not for "nh4" and "no3", i always get the Invalid floating point operation Error. When i do the calculation in ArcGIS manually it works fine. I dont have many files but i get this error from time to time in different programs and sometimes this error appears and sometimes not in the same program
@Xander: Thx for the help. i tried your optimized program but i get the same error. i forgot to mention that two errors alternate. The floating point error and this one:
Access violation at address 00007FF959AF8AB3 in module 'ntdll.dll'. Read of address 0000000000000029.
Someone gave me the advice that it could really be a memory/ram problem. Hmmm
Okay i think i solved the problem. I simply put "arcpy.ClearWorkspaceCache_management()" at the beginning of the program so the arcpy work cache cant overflow. If you have many calculation steps put it in between. The access violation problem occures because arcpy has a limited work cache space assigned.
Thx for the help everyone
Please indicate in your original post that this error applies ArcSDE only