Python crashes when trying to run arcpy.ListRasters

Discussion created by alext8808 on Nov 22, 2017
Latest reply on Nov 27, 2017 by alext8808

I have a Python script that I have been using for the past year but I recently updated my computer to Windows 10 and now Python is crashing when trying to run the script. I was able to isolate the crash to line 4 below where I am trying to list the rasters from my input folder. 


The inputFldr variable is a user input from a Tkinter GUI I created for this script. The only thing that happens before this section of code is receiving the various user inputs from the Tkinter GUI and assigning them to variables, as well as creating a few output folders. All of this happens with no problem and then Python crashes when trying to execute the red line. I am using Python 2.7.13 and ArcGIS Desktop 10.5.1


Anyone have an idea why this is happening? I am lost. Even did a try/except around line 4 and Python still crashed



sr = arcpy.SpatialReference(4326)
arcpy.env.workspace = inputFldr
arcpy.env.outputCoordinateSystem = sr
rasters = arcpy.ListRasters()