Hello everyone,
I am new to Python and ArcPy.
I am testing the script below which is running for a point feaure class, but not for a line feature class.
In the latter case, I am getting the following error message: "exceptions.SystemError: error return without exception set" for line 16.
Thank you in advance,
Panagiotis
Solved! Go to Solution.
The "SHAPE@XY" token doesn't return an ArcPy Point object, it returns "a tuple of the feature's centroid x,y coordinates." Line 15 of your code replaces a Python tuple with an ArcPy Point object, which is what I am guessing is causing the error on Line 16. Does the code work if you update Line 15 to:
row[0] = (306400, 4098400)
Ignoring the fact that you are trying to create a line from a single point (which surprisingly works), does the line feature class contain a feature at OBJECTID = 4?
Hello Darren,
I am not trying to create a line feature class, but rather shift a feature of it. Both point and line feature classes already exist. And, yes, "OBJECTID = 4" is a valid expression in both cases.
Regards,
Panagiotis
SHAPE@XY for a line feature will return the feature centroid. You will need to use SHAPE@ and then locate the vertex point on the polyline to update.
These pages have more detail:
I thought you had to do it vertex by vertex, too, but this post seems to disagree: https://arcpy.wordpress.com/2012/11/15/shifting-features/
It shifts geometry all as one.
Good catch - I hadn't seen that post.
You didn't catch it because documenting important functionality like that on a third-party blogging platform is, well, poor taste. It would be nice and a bit more enterprise-y if the ArcGIS Python development team did more blogging within an Esri domain, say GeoNet maybe.
1. Should be correct through SQL goggles.
sigh.... python googles always on