AnsweredAssumed Answered

Writing rows to FGDB table using da.InsertCursor gives 'RuntimeError: table has no geometry'

Question asked by havard.moe_JBV on Jun 8, 2018
Latest reply on Jun 11, 2018 by havard.moe_JBV

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 = arcpy.da.InsertCursor(tab_eksport, fields)
if len(lst) > 0:
    for item in lst:
    cursor.insertRow(item)

 

Won't InsertCursor work with no-geometry tables, or is this some other issue?

Outcomes