Select to view content in your preferred language

Floating point division by zero. / AfCore.dll Modul error / arcpy

2730
6
09-22-2014 04:52 AM
MarcGoetzke
Deactivated User

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

0 Kudos
6 Replies
DuncanHornby
MVP Notable Contributor

Marc,

Having looked at your code I have a few questions:

  1. Does the error occur on the initial loop, or does it actually create some tables then bomb out?
  2. Your zonal layer never changes, could you have a scenario that your zonal dataset does not intersect ANY cells in a raster?
  3. Can you have a scenario where one of your input rasters is all nodata?

Duncan

MarcGoetzke
Deactivated User

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

0 Kudos
MarcGoetzke
Deactivated User

Does somebody have an idea? I can't think any further myself

0 Kudos
DuncanHornby
MVP Notable Contributor

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.

0 Kudos
MarcGoetzke
Deactivated User

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:(

0 Kudos
MarcGoetzke
Deactivated User

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

0 Kudos