I've tried this with the new ArcGIS Pro 2.5 Python Notebook and the Python compiler from within Pro.
I have about 15 layers that I'm reading in from a couple different external servers. I can read in test layers from all unique servers just fine, but there are three layers that after I read them into my table of contents, they fail when using the Feature Class to Feature Class GP tool.
ExecuteError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds. ERROR: code:500, Error performing query operation, Internal server error. Failed to execute (FeatureClassToFeatureClass).
What I have in Notebook and what I've tried in the compiler:
aprx = arcpy.mp.ArcGISProject(r"C:\Project\Pro_Points2018.aprx") mapx = aprx.listMaps("Map") env.overwriteOutput = True arcpy.env.workspace = r"C:\Project\Pro_Points.gdb" out_loc = r"C:\Project\Pro_Points.gdb" mapx.addDataFromPath(r"https://gisportal.hrsa.gov/server/rest/services/Shortage/MedicallyUnderservedAreas_FS/FeatureServer/0") arcpy.conversion.FeatureClassToFeatureClass("Medically Underserved Areas /Populations – perimeter polygons", out_loc, "MUA_SHP_DET_CUR_VX", '')
Other posts point to the error being caused by import/export name being the same, but I've already verified that.
All I'm trying to do is read a FC in from someone's server (that I have access to), and save it off locally in my GDB.
FeatureClassToFeatureClass(). If I try it in the GUI it won't even let me add such a layer as the input to the tool.