<?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: Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry' in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712455#M55245</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tested your code with desktop 10.5 and could not generate an error with either a table or a feature (w/o geometry).&amp;nbsp;What&amp;nbsp; version are you running?&amp;nbsp; Is it possible the error is associated with another line in your script?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Jun 2018 01:18:45 GMT</pubDate>
    <dc:creator>RandyBurton</dc:creator>
    <dc:date>2018-06-10T01:18:45Z</dc:date>
    <item>
      <title>Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry'</title>
      <link>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712453#M55243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm having some issues with a simple script where I want to write a list of tuples to an empty table in a file geodatabase, where I get the error:&amp;nbsp;&lt;SPAN style="color: #ff0000;"&gt;RuntimeError: table has no geometry&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FGDB table is a table of seven fields (numbers and text only). The data to insert are built as a list of tuples, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[('275893399', u'4651', u'Nsb - Marienborg', u'02', u'Liten/Ingen kjent p\xe5virkning, med dagens areal/resipientbruk', u'Kommune', u'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgrunnforurensning.miljodirektoratet.no%2Ffaktaark.html%3Flok_id%3D4651" target="_blank"&gt;https://grunnforurensning.miljodirektoratet.no/faktaark.html?lok_id=4651&lt;/A&gt;&lt;SPAN&gt;'),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;('275893388', u'4651', u'Nsb - Marienborg', u'02', u'Liten/Ingen kjent p\xe5virkning, med dagens areal/resipientbruk', u'Kommune', u'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgrunnforurensning.miljodirektoratet.no%2Ffaktaark.html%3Flok_id%3D4651" target="_blank"&gt;https://grunnforurensning.miljodirektoratet.no/faktaark.html?lok_id=4651&lt;/A&gt;&lt;SPAN&gt;')]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My cursor code looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;cursor &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;InsertCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tab_eksport&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; item &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; lst&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;insertRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Won't InsertCursor work with no-geometry tables, or is this some other issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:31:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712453#M55243</guid>
      <dc:creator>HåvardMoe1</dc:creator>
      <dc:date>2021-12-12T06:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry'</title>
      <link>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712454#M55244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;they work with tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/data-access/insertcursor-class.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/data-access/insertcursor-class.htm"&gt;InsertCursor—Data Access module | ArcGIS Desktop&lt;/A&gt; &amp;nbsp; new cursors&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/functions/insertcursor.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/functions/insertcursor.htm"&gt;InsertCursor—ArcPy Functions | ArcGIS Desktop&lt;/A&gt; &amp;nbsp; old cursors&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;line 4 needs 1 more indent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have a list of 2 elements of 7 each, but you can't just whip the values in without setvalue&lt;/P&gt;&lt;P&gt;See the code samples in the link above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 16:22:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712454#M55244</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-08T16:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry'</title>
      <link>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712455#M55245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tested your code with desktop 10.5 and could not generate an error with either a table or a feature (w/o geometry).&amp;nbsp;What&amp;nbsp; version are you running?&amp;nbsp; Is it possible the error is associated with another line in your script?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Jun 2018 01:18:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712455#M55245</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2018-06-10T01:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry'</title>
      <link>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712456#M55246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! The indentation is a typo, my bad. I can't seem to edit the original post now...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the same way of "whipping" tuples into tables in another, working, part of the script, and have just reused the code from there. The same can be seen in the first code example in the first link you have, where the input is a tuple. The difference between the working code and this is that in that other case I also have geometry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 07:43:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712456#M55246</guid>
      <dc:creator>HåvardMoe1</dc:creator>
      <dc:date>2018-06-11T07:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry'</title>
      <link>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712457#M55247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running on 10.3.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error when I run the script (PyScripter) highlights the 'cursor.insertRow()' line in the script. It's possible that it's related to other parts, of course, but as for now I don't have anything to point me in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 07:47:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712457#M55247</guid>
      <dc:creator>HåvardMoe1</dc:creator>
      <dc:date>2018-06-11T07:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry'</title>
      <link>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712458#M55248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the indentation to begin with as I suggested, unless it is just a bad copy and paste on your part, the indentation is wrong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 08:00:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712458#M55248</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-11T08:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry'</title>
      <link>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712459#M55249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a bad copy/paste, as I explained above. Sorry about that...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 08:15:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712459#M55249</guid>
      <dc:creator>HåvardMoe1</dc:creator>
      <dc:date>2018-06-11T08:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry'</title>
      <link>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712460#M55250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I took another look at the script and figured out the problem (&amp;lt;insert red face here&amp;gt;)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As mentioned above (first reply to Dan), I had two cursors in the script: One writing to a feature class, the other writing to a table. The fields definition was identical, except that the feature class cursor also had geometry. I had, accidentally, used that fields definition for both cursors. When I changed to the correct cursor everything worked fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 09:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/writing-rows-to-fgdb-table-using-da-insertcursor/m-p/712460#M55250</guid>
      <dc:creator>HåvardMoe1</dc:creator>
      <dc:date>2018-06-11T09:24:08Z</dc:date>
    </item>
  </channel>
</rss>

