I am trying to create a new attribute table and I keep getting the same error.

import os
import arcpy
import math
folderpath = 'C:\Users\Michaelf\Desktop\GEOG M173'

arcpy.env.workspace = folderpath
arcpy.env.overwriteOutput = True

input_shp = folderpath + '\lower48_county_2012_election.shp'
out_shp = folderpath + '\new_48_county.shp'

arcpy.CopyFeatures_management (input_shp, out_shp)

my error is:

ExecuteError: ERROR 000210: Cannot create output C:\Users\Michaelf\Desktop\GEOG M173new_48_county.shp
Failed to execute (CopyFeatures).

closed as off-topic by Vince, PolyGeo May 14 '16 at 0:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – Vince, PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    + r'\shapefile' should fix it. Error message answers your question – FelixIP May 13 '16 at 22:47
  • Thanks, that resolved the issue I had with that line of code! – M_2210 May 15 '16 at 1:26