<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28290#M2158</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dan,&lt;/P&gt;&lt;P&gt;Yes, it is a point feature class with about 5,600 features.&amp;nbsp; I should also mention that for this test I used a&amp;nbsp;feature class with less points in it, otherwise it is identical to the original, just a different name.&lt;/P&gt;&lt;P&gt;Here is a picture of the results window after running it from the tool box.&amp;nbsp; I didn't check any of the optional boxes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="498071" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/498071_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This time none of the fields were created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jun 2020 20:17:45 GMT</pubDate>
    <dc:creator>EvanMyers1</dc:creator>
    <dc:date>2020-06-26T20:17:45Z</dc:date>
    <item>
      <title>Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28286#M2154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I am having an issue where my code was working yesterday but today it isn't.&amp;nbsp; I've restarted my machine just in case but didn't help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Input &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'wMeterGPS'&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddGeometryAttributes_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Input&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"POINT_X_Y_Z_M"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The Error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start Time: Fri Jun 26 11:57:32 2020&lt;BR /&gt;Running script AddGeometryAttributes...&lt;BR /&gt;WARNING 001097: POINT_X already exists -- overwriting.&lt;BR /&gt;WARNING 001097: POINT_Y already exists -- overwriting.&lt;BR /&gt;Failed script AddGeometryAttributes...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;File "c:\program files (x86)\arcgis\desktop10.7\ArcToolbox\Scripts\AddGeometryAttributes.py", line 292, in &amp;lt;module&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddGeometryAttributes(fc, geomProperties, lUnit, aUnit, cs)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;File "c:\program files (x86)\arcgis\desktop10.7\ArcToolbox\Scripts\AddGeometryAttributes.py", line 56, in AddGeometryAttributes&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;with arcpy.da.UpdateCursor(fc,fields + ["SHAPE@"],"",cs) as ucur:&lt;BR /&gt;TypeError: object() takes no parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Failed to execute (AddGeometryAttributes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tool adds the "POINT_X" and "POINT_Y" fields but it doesn't calculate the field.&amp;nbsp; I have deleted the fields after it creates them to try the tool again (I know it overwrites but its worth a try) but that doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:08:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28286#M2154</guid>
      <dc:creator>EvanMyers1</dc:creator>
      <dc:date>2021-12-10T21:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28287#M2155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/328967"&gt;Evan Myers&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your data spatially defined (or projected)?&lt;/P&gt;&lt;P&gt;Is it possible to share your script?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;It looks like you're getting an error in this line too:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;fields &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"SHAPE@"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;cs&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ucur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2020 16:44:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28287#M2155</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2020-06-26T16:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28288#M2156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mehdi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for taking a look at my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Projected Coordinate System: NAD_1983_StatePlane_Florida_East_FIPS_0901_Feet&lt;BR /&gt;Projection: Transverse_Mercator&lt;BR /&gt;False_Easting: 656166.66666667&lt;BR /&gt;False_Northing: 0.00000000&lt;BR /&gt;Central_Meridian: -81.00000000&lt;BR /&gt;Scale_Factor: 0.99994118&lt;BR /&gt;Latitude_Of_Origin: 24.33333333&lt;BR /&gt;Linear Unit: Foot_US&lt;/P&gt;&lt;P&gt;Geographic Coordinate System: GCS_North_American_1983&lt;BR /&gt;Datum: D_North_American_1983&lt;BR /&gt;Prime Meridian: Greenwich&lt;BR /&gt;Angular Unit: Degree&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those two lines of code I posted in my original post is all that my script contains.&amp;nbsp; I wanted to use&amp;nbsp;them at the beginning of a script I am working on but now I can't really begin because I cant test the rest of it without it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The line of code you highlighted is part of the error message I am getting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2020 17:12:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28288#M2156</guid>
      <dc:creator>EvanMyers1</dc:creator>
      <dc:date>2020-06-26T17:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28289#M2157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Evan, is it a point featureclass?&lt;/P&gt;&lt;P&gt;Does the tool work within ArcToolbox? (ie.&amp;nbsp; skip the script to test the principle)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2020 20:09:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28289#M2157</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-06-26T20:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28290#M2158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dan,&lt;/P&gt;&lt;P&gt;Yes, it is a point feature class with about 5,600 features.&amp;nbsp; I should also mention that for this test I used a&amp;nbsp;feature class with less points in it, otherwise it is identical to the original, just a different name.&lt;/P&gt;&lt;P&gt;Here is a picture of the results window after running it from the tool box.&amp;nbsp; I didn't check any of the optional boxes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="498071" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/498071_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This time none of the fields were created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2020 20:17:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28290#M2158</guid>
      <dc:creator>EvanMyers1</dc:creator>
      <dc:date>2020-06-26T20:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28291#M2159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Evan, just try the&amp;nbsp;Centroid option.&amp;nbsp; It will give X and Y&lt;/P&gt;&lt;P&gt;Also... try another file&lt;/P&gt;&lt;P&gt;Try to rule out the gdb, file and tool option&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2020 20:55:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28291#M2159</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-06-26T20:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28292#M2160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made several attempts to generate an error similar to yours, but the tool seemed to handle a variety of situations quite well.&amp;nbsp; For example, I tried the "POINT_X_Y_Z_M" option with polygon and line features, and the tool responded with appropriate error messages.&amp;nbsp; Since the error message is coming from inside the &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/add-geometry-attributes.htm"&gt;AddGeometryAttributes&lt;/A&gt; tool, I would suspect the issue is with your wHydrantValveGPS feature layer - perhaps bad geometry, or some other corruption.&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the feature load properly in Desktop?&amp;nbsp; Have you tried the actual tool in Desktop? The tool's dialog box may provide some additional error messages as the tool validator script will be invoked as the parameters are checked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2020 23:46:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28292#M2160</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2020-06-26T23:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28293#M2161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I select a new Point feature class or a shape file (both features I haven't tested before and are saved in different locations) I don't get a Centroid option.&amp;nbsp; When testing with a line feature, I get the centroid option,&amp;nbsp; but the tool still fails and reports the same problem. Is there something I'm missing that this tool requires?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="498219" class="image-1 jive-image" height="310" src="https://community.esri.com/legacyfs/online/498219_pastedImage_1.png" width="710" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2020 12:50:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28293#M2161</guid>
      <dc:creator>EvanMyers1</dc:creator>
      <dc:date>2020-06-29T12:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28294#M2162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Desktop 10.7 is what I have been using and there's been no issues&amp;nbsp;or errors loading data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2020 13:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28294#M2162</guid>
      <dc:creator>EvanMyers1</dc:creator>
      <dc:date>2020-06-29T13:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute (AddGeometryAttributes) TypeError: object() takes no parameters</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28295#M2163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So after several failed attempts at getting the tool to work correctly I decided to do a full re-installation of ArcMap along with its python package.&amp;nbsp; Once I did that and restarted my machine, the tools appear to be behaving properly now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes the most complex issues are solved the simplest ways.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2020 15:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-addgeometryattributes-typeerror/m-p/28295#M2163</guid>
      <dc:creator>EvanMyers1</dc:creator>
      <dc:date>2020-06-29T15:10:34Z</dc:date>
    </item>
  </channel>
</rss>

