Timeline for Why is Python Script (using XYTabletoPoint) Deleting target Feature Class? [closed]
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 21, 2018 at 22:44 | history | closed | PolyGeo♦ | Not suitable for this site | |
May 21, 2018 at 22:44 | history | edited | PolyGeo♦ | CC BY-SA 4.0 |
edited title
|
May 18, 2018 at 22:04 | comment | added | Emil Brundage |
While I don't have experience with this particular tool, never have I seen an esri tool which first deletes an output if it exists before it creates a new one. A tool will throw an output already exists error, unless you have arcpy.env.overwriteOutput set to True . I suspect the feature class got deleted by some other means.
|
|
May 18, 2018 at 1:58 | history | edited | PolyGeo♦ |
edited tags; edited tags; edited tags
|
|
May 18, 2018 at 1:46 | comment | added | PolyGeo♦ |
If you want to understand what is going astray besides using a tool that only exists in ArcGIS Pro then make it into more of a code snippet by removing if __name__ == "__main__": , and using print statements to see what the tool dialog is returning so that you can hardwire those values for testing.
|
|
May 18, 2018 at 1:43 | answer | added | PolyGeo♦ | timeline score: 1 | |
May 18, 2018 at 1:35 | history | edited | PolyGeo♦ |
edited tags
|
|
May 18, 2018 at 0:55 | comment | added | Michael Stimson | You're right waterman, it's not getting to that line... perhaps the geodatabase is bad, can you try this with a newly created file geodatabase... also check if arcpy.Exists(Target_FC): # describe else: SR = arcpy.SpatialReference(Some_default_EPSG_Code).. I'm using 10.2.1 and that tool can't be found. | |
May 18, 2018 at 0:34 | comment | added | Waterman | We're both assuming that the line that causes the deletion of the Target_FC is the final line. But if it's throwing an error at line 10 that means it hasn't even got to the last line (XYTabletoPoint) yet, doesn't it? | |
May 18, 2018 at 0:30 | history | edited | Waterman | CC BY-SA 4.0 |
added 19 characters in body; edited tags
|
May 18, 2018 at 0:29 | comment | added | Waterman | It's in ArcGIS Advanced 10.2.2. Do you think there is something wrong with the way I'm gathering the Coordinate System (the SR variable)? I just tried removing the ".Name" from the Spathal Reference method and it gave the same error. | |
May 18, 2018 at 0:08 | comment | added | Michael Stimson | Is this in ArcGIS Pro? I can't find that function in desktop. What the error message is saying is that there's likely something wrong with the spatial reference of the output, and possibly other things too, but I can't say why it's being deleted except that when you overwrite the behavior is to delete first then create a new one, so it looks like it gets through the first step but can't create a new one because the spatial reference clashes for some reason. | |
May 18, 2018 at 0:00 | history | asked | Waterman | CC BY-SA 4.0 |