1

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[0] #using a single file as an example

basename = os.path.splitext(os.path.basename(infile))[0]
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

outExpand.save(outfile)

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 23.21.13.9103. The ArcMap version i'm using is 10.6.

  • Have you tested to see whether this same code can run from IDLE on that machine? – PolyGeo Jul 15 '18 at 4:13
  • 1
    I just tested in Python IDLE. It failed too, although it didn't give me any error message this time. The shell simply just restarted as if nothing happened. – TonyC Jul 15 '18 at 5:35
  • Yes, my GPU is an NVIDIA Quadro P1000. I found these links earlier too and upgraded the driver already (to version 23.21.13.9103). But it didn't seem to help as the issue persists. – TonyC Jul 15 '18 at 6:18
  • Please add the comment information to your question body. It's not fair to those who would answer to need to mine the comments for critical information. – Vince Jul 15 '18 at 14:40
  • 1
    Just a few queries: What version of Arc are you using? Do any of the files have spaces in their names? – Keagan Allan Jul 15 '18 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.