AnsweredAssumed Answered

Process finished with exit code -1073741819 (0xC0000005)  - Simple clipping tool

Question asked by hone_j on Sep 19, 2019
Latest reply on Sep 23, 2019 by hone_j

Hi,

 

Im trying to learn to make geoprocessing tools.

 

Making a simple one to clip a raster but getting an error I cant decipher, from googling it looks like some kind of access violation.

 

heres my code

 

import arcpy

# Set geoprocessing environments
arcpy.env.workspace = r"C:\Jim\BathySelect\BSelect.gdb"
arcpy.env.overwriteOutput = True

#set params
inTif = r"C:\Jim\BathySelect\Data\Bathy\Whole UK Mosaic.tif"
desc = arcpy.Describe("SelectPoly")
outTif = r"C:\Jim\output.tif"

extent = desc.extent
rectangle = arcpy.Polygon(arcpy.Array([extent.lowerLeft, extent.upperLeft, extent.upperRight, extent.lowerRight, extent.lowerLeft]), desc.spatialReference)


arcpy.Clip_management(inTif, rectangle, outTif)

 

heres my error

 

C:\Python27\ArcGIS10.6\python.exe C:/Jim/BathySelect/BathySelect.py

Process finished with exit code -1073741819 (0xC0000005)

 

I eventually want this to fire from a widget in a WAB app and return a zip file of multiple clipped images.

Outcomes