I'm running spatial analysis using ArcPy in PyCharm (Windows 10 64bit environment) failed with error code 1073740791 (0xC0000409). Specifically, i'm trying to run Expand within the spatial analysis module. My code is as followed:
import arcpy import glob import os from arcpy.sa import * arcpy.CheckOutExtension('Spatial') inpath=r'D:\Work\NBR\\' outpath=r'D:\Work\NBR\expanded\\' infilelist = glob.glob(inpath+'*.dat') infile=infilelist #using a single file as an example basename = os.path.splitext(os.path.basename(infile)) outfile=outpath+basename+'_expanded.tif' if os.path.isfile(outfile) == False: zone_values = [-2500] outExpand = Expand(infile, 5, zone_values) outExpand.save(outfile) print outfile + ' is done!' arcpy.CheckInExtension('Spatial')
I tested this script in the debug mode and it seems that every time when
is run, the program aborts and gives me a message:
Process finished with exit code -1073740791 (0xC0000409)
No other error messages are given.
Can someone help me find out why this happens?
For your information, this same code can be run on my other machine without issues. I'm trying to get it to run on my newly-purchased Windows laptop. My GPU is an NVIDIA Quadro P1000. Its driver has been upgraded to the latest version 22.214.171.12403. The ArcMap version i'm using is 10.6.