I have problem running my programm. i have wrote a Python programm to calculate Zonal Statistics for raster maps. Im receiving the following error:
Floating point division by zero.
and afterwards
Access violation at address 00007FFC90C687C1 in module 'AfCore.dll'. Read of address 0000000024FEB9E9.
I have tried several things and i have checked my paths and the whole code. I dont know where the error occurs from.
My Python code is in the appendix.
Thx for help
Marc,
Having looked at your code I have a few questions:
Duncan
Hey thx Duncan,
1. it doesnt create anything, it occurs in the loop.
2. i did the same thing in arcgis manually and it worked. i have 1 zonal dataset and 2 raster maps (grids).
3. there are no cells with nodata. because nodata has the value -9999 in my raster maps. i checked it
is is strange because sometimes my programm completly works after restarting the computer.is it possible that the error occurs from the RAM Memory?
P.S.: One Question: is it possible to put a Python script directly into the forum without appendix.
Thx
Does somebody have an idea? I can't think any further myself
You can put scripts into the text of a question by simply copying it into it! Then use the "Use advanced editor" option and use the >> button to set the correct language of the code snippet. Personally if it is a big script I would attach it as a zip as you have done.
If your code sometimes runs OK then this suggest there is something else causing a problem, so its very difficult to answer this question.
Right now it no longer runs. I checked everything and tried everything out. i had this error several times with different processes in the past. I have no clue. i wrote esri an email but they said because im student i have to ask a local competent. Is it possible to calculate Zonal Statistics over .shp Files or another data type. I think only raster are possible.i think i have to take some detours to get my results. im getting desperate:(
Okay i think i have the answer. The error occurs because i have no administration rights (Access violation). the afcore.dll file is in the windows folder and python is not able to get access to this file. I think i have to ask the administrator to run the programm with the required rights.
Thx Ducan for the suggestions