<?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: Simple InsertCursor crash in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/simple-insertcursor-crash/m-p/760816#M58675</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your "row" objects should inherit all of the field names from the dataset that the cursor is traversing (&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000038000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;as described here&lt;/A&gt;&lt;SPAN&gt;). So, you would set the values as:&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;cursor = arcpy.InsertCursor("test")
row = cursor.newRow()
row.fieldname1 = "value1"
row.fieldname2 = "value2"
cursor.insertRow(row)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 08:19:20 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2021-12-12T08:19:20Z</dc:date>
    <item>
      <title>Simple InsertCursor crash</title>
      <link>https://community.esri.com/t5/python-questions/simple-insertcursor-crash/m-p/760815#M58674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First time pythoner...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to create a new empty row (from csv file) and insert in a featureclass in a file gdb.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When i do the following I crash ArcMap 10:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; cursor = arcpy.InsertCursor("test")
&amp;gt;&amp;gt;&amp;gt; row = cursor.newRow
&amp;gt;&amp;gt;&amp;gt; cursor.insertRow(row)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;test is a point featureclass with no records. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to set the field values of my rows from the csv file but my 'row' object only has im_class, im_func and im_self properties. How do i set my field values and insert my row without crashing arcmap?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 15:52:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/simple-insertcursor-crash/m-p/760815#M58674</guid>
      <dc:creator>deleted-user-VeZur_n9o0OZ</dc:creator>
      <dc:date>2011-06-03T15:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Simple InsertCursor crash</title>
      <link>https://community.esri.com/t5/python-questions/simple-insertcursor-crash/m-p/760816#M58675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your "row" objects should inherit all of the field names from the dataset that the cursor is traversing (&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000038000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;as described here&lt;/A&gt;&lt;SPAN&gt;). So, you would set the values as:&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;cursor = arcpy.InsertCursor("test")
row = cursor.newRow()
row.fieldname1 = "value1"
row.fieldname2 = "value2"
cursor.insertRow(row)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:19:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/simple-insertcursor-crash/m-p/760816#M58675</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-12T08:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Simple InsertCursor crash</title>
      <link>https://community.esri.com/t5/python-questions/simple-insertcursor-crash/m-p/760817#M58676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I cracked it in the end. I set my feature's geometry to a point i created from coords in the csv file. I had to recreate my featureclass with upper case field aliases to stop the insert crashing arcmap. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for the duplicate thread. I can't see anywhere to mark this thread as resolved like the old style forums...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jun 2011 09:29:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/simple-insertcursor-crash/m-p/760817#M58676</guid>
      <dc:creator>deleted-user-VeZur_n9o0OZ</dc:creator>
      <dc:date>2011-06-04T09:29:53Z</dc:date>
    </item>
  </channel>
</rss>

