xy table to point doesn't work

8571
11
Jump to solution
02-07-2020 10:42 AM
RichardMarountas
New Contributor

After running the most recent update (2.5) I've had a couple of issues, such as taking a long time to load and save.  The biggest problem seems to be that data I was able to plot with lat longs only yesterday.  Same table, same type of data, and I now get the error below:

Running script XY Table To Point...
Failed script XY Table To Point...
Traceback (most recent call last):   File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\XYTableToPoint.py", line 183, in <module>     xy_table_to_points(in_table, output_fc, x_field, y_field, z_field, coordinate_system)   File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\XYTableToPoint.py", line 120, in xy_table_to_points     table_empty = arcpy.management.CreateTable(r"memory", "table_empty_{}".format(ts), in_table)   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 19745, in CreateTable     raise e   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 19742, in CreateTable     retval = convertArcObjectToPythonObject(gp.CreateTable_management(*gp_fixargs((out_path, out_name, template, config_keyword), True)))   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 511, in <lambda>     return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.ERROR 000732: Template Table Name: Dataset deaths$ does not exist or is not supported Failed to execute (CreateTable).
Failed to execute (XYTableToPoint).

Any help greatly appreciated.  

0 Kudos
11 Replies
PhilCrossley1
New Contributor III

I'm having the same problem: a new feature class is generated but no point records included in the feature class. If I run the tool with the same csv table within Pro (v. 2.8) it works perfectly; but if I try to run the tool within an arcpy script, it generates an 'invalid geometry' error.  Am attaching the test csv file that fails..Will greatly appreciate any help!

This is my script:

import arcpy
from arcpy import env
env.workspace = r"E:\advAppScripting\testing\hawaii"
env.overwriteOutput = True
infile = r"E:\advAppScripting\testing\hawaii\testpoints3.csv"

try:
arcpy.CreateFileGDB_management(r"E:\advAppScripting\testing\hawaii", "testing")
# had originaly tried to just create a .shp file, but after it failed, changed to creating a featureclass
# hence the need to create a new gdb first
arcpy.XYTableToPoint_management(infile, r"E:\advAppScripting\testing\hawaii\testing.gdb\myNEWpoints",
"EASTING", "NORTHING")
# the tool help claims you can specify the spatial ref. as a tool parameter, but when I do, script fails with
# 'not a field' error meesage, so switched to definine projection as a separate step
arcpy.DefineProjection_management(r"E:\advAppScripting\testing\hawaii\testing.gdb\myNEWpoints",
arcpy.SpatialReference(26904))
# this script creates a new gdb and a new feature class with the correct spatail ref. BUT no points are included
# and a 'invalid geometry error is generated
0 Kudos
salah_aj
New Contributor

Any updates about this error? I am also getting an error message as below

Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\XYTableToPoint.py", line 276, in <module>
", ".join(empty_out_bounds)))
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\XYTableToPoint.py", line 262, in xy_table_to_points
arcpy.AddIDMessage("WARNING", 1086, str(e).split("[")[1][:-1])
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4693, in CopyFeatures
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4690, in CopyFeatures
retval = convertArcObjectToPythonObject(gp.CopyFeatures_management(*gp_fixargs((in_features, out_feature_class, config_keyword, spatial_grid_1, spatial_grid_2, spatial_grid_3), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 000210: Cannot create output C:\Brown\pop exposure\GIS\SSLS1.shp
Failed to execute (CopyFeatures).


Failed script XY Table To Point...
Failed to execute (XYTableToPoint).

 

0 Kudos