AnsweredAssumed Answered

Feature Class to Feature Class in ArcGIS Pro

Question asked by hnavarro23 on Feb 11, 2019
Latest reply on Feb 20, 2019 by hnavarro23

Good day everyone.  I am running this code in ArcPro and receive the following error:

It tells me that my input feature does not exist or is not supported.  I have ran this script in python 2.7 and it all works fine.  Thank all of you in advance.

#Import ArcPy modules
import arcpy
from arcpy import env

# Set the workspace
arcpy.env.workspace = "Database Connections/ADMIN Edit.sde/CustomerServiceFeatures"
ArcSDE = arcpy.env.workspace
env.overwriteOutput = True

# Set local variables
inFeatures = "GPS_Meter_CustomerServiceFieldCrew"
outputLocation = "X:/Planning/GIS/Meter GPS/GPS Meter Collection/Customer Service/GPS CC&B Joins"
outputFolderName = "00_00_19"
outputFolderLocation = "X:/Planning/GIS/Meter GPS/GPS Meter Collection/Customer Service/GPS CC&B Joins/00_00_19"
outputDatabase = "CC&B iPad Meters.gdb"
outputDatabaseLocation = "X:/Planning/GIS/Meter GPS/GPS Meter Collection/Customer Service/GPS CC&B Joins/00_00_19/CC&B iPad Meters.gdb"
outputFeatureClass = "GPS_Meter_CS"
expression = "SERVICEPOINTID IS NULL"

# Create folder
## UPDATE outputFolderName, outputFolderLocation, AND outputDatabaseLocation
##    VARIABLE EVERYTIME THIS PROCESS RUNS WITH CURRENT DATE (MM_DD_YY).
print("Creating folder.")
arcpy.CreateFolder_management(outputLocation, outputFolderName)

# Create new .gdb
print("Creating geodatabase.")
arcpy.CreateFileGDB_management(outputFolderLocation, outputDatabase)

# Allow database to accept attachments.
print('Allowing attachments')
arcpy.env.maintainAttachments = True

# Export feature class geodatabase
print("Exporting feature class to feature class")
arcpy.FeatureClassToFeatureClass_conversion(inFeatures, outputDatabaseLocation, outputFeatureClass, expression)

# Finish
print("Done")

Outcomes