Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

Pythonw has stopped working when running arcpy.SubsetFeatures_ga

$
0
0

I’m currently trying to subset a shapefile into training and validation files. When I run the following line of code, python crashes. I’m using ArcGIS 10.1.

arcpy.SubsetFeatures_ga(current_shapefile, current_train_points, current_test_points, percent_training, "PERCENTAGE_OF_INPUT")

In this example, current_shapefile is a string containing the path to an existing shapefile. current_train_points and current_test_points contain paths to shapefiles that do not yet exist. percent_training is 60. I’ve printed out these variables to double check, and they are indeed correct.

The code only executes for a couple of seconds before giving me the error “pythonw.exe has stopped working”, and I do not get any output.

Can anyone suggest what might be causing this?


Viewing all articles
Browse latest Browse all 767

Trending Articles