AnsweredAssumed Answered

Pythonw.exe Error

Question asked by jbrengel on May 3, 2018
Latest reply on May 4, 2018 by jbrengel



I keep getting the following error when I run my script in IDLE:



While I believe it is hard to isolate the specific error that causes Python to crash like this (any tips doing that are appreciated!), I've isolated the line of code where the Python crash seems to happen:




I cannot share the entire code.  The inputs are masked rasters representing elevation data with "sqr_mask" purposely having very large data values.  Also, they are raster objects which have been saved to disk.  All other input parameters seemingly line up with the input rasters' properties.


The funny thing is I've run other similar datasets from different geographic areas/extents and the code completes without any errors.  When I try running the datasets that caused Python to crash in ArcMap instead, sometimes the Mosaic to New Raster tool just stops working and doesn't progress/freezes.  It causes me to restart ArcMap.  Once I restart, I try the tool again using the same rasters and it will complete successfully.


I've tried the following in my script and in ArcMap to avoid getting the script error or tool freezing to no avail:

1) Using Int on the input rasters to reduce potential memory issues

2) Adjusting input parameters- especially mosaic type and pixel type

3) Making the extent of one of the input rasters the extent of the mosaic to new raster tool in the environment settings in script.

4) Switching the order of the input rasters.

5) Restarting and shutting down my machine.


My thinking is there may be a more significant issue with my Python installation.  Maybe some .dll file not installed properly or a path variable that is missing/included that's causing the crash.


As this has been extremely frustrating, any help or pointing in the right direction would be very much appreciated.


- Josh