Hi all,
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: RuntimeError: table has no geometry
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:
[('275893399', u'4651', u'Nsb - Marienborg', u'02', u'Liten/Ingen kjent p\xe5virkning, med dagens areal/resipientbruk', u'Kommune', u'https://grunnforurensning.miljodirektoratet.no/faktaark.html?lok_id=4651'),
('275893388', u'4651', u'Nsb - Marienborg', u'02', u'Liten/Ingen kjent p\xe5virkning, med dagens areal/resipientbruk', u'Kommune', u'https://grunnforurensning.miljodirektoratet.no/faktaark.html?lok_id=4651')]
My cursor code looks like this:
cursor <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>InsertCursor<SPAN class="punctuation token">(</SPAN>tab_eksport<SPAN class="punctuation token">,</SPAN> fields<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">if</SPAN> len<SPAN class="punctuation token">(</SPAN>lst<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">></SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">for</SPAN> item <SPAN class="keyword token">in</SPAN> lst<SPAN class="punctuation token">:</SPAN>
cursor<SPAN class="punctuation token">.</SPAN>insertRow<SPAN class="punctuation token">(</SPAN>item<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Won't InsertCursor work with no-geometry tables, or is this some other issue?