<?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 InsertCursor throwing &amp;quot;error return without exception set&amp;quot; in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109178#M62700</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;DIV class=""&gt;&lt;P&gt;I'm trying write data to an Enterprise geodatabase but it still throws &lt;STRONG&gt;error return without exception set&lt;/STRONG&gt; (for clarification - error throws row cursor.insertRow(data).&lt;/P&gt;&lt;P&gt;I have method:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;def&lt;/SPAN&gt; __insertDataInternal(self, table, cols, data):
    &lt;SPAN class=""&gt;with&lt;/SPAN&gt; arcpy.da.InsertCursor(table, cols) &lt;SPAN class=""&gt;as&lt;/SPAN&gt; cursor:
        cursor.insertRow(data)&lt;/PRE&gt;&lt;P&gt;which I'm using for write to local gdb and remote (sde). For local gdb is everything alright and data are inserted. But when I use this method for write to Oracle it throws error.&lt;/P&gt;&lt;P&gt;Code for calling to write to EGDB looks this:&lt;/P&gt;&lt;PRE&gt;db = r"C:\Temp\file.sde"&lt;BR /&gt;&lt;BR /&gt;edit = arcpy.da.Editor(db)
edit.startEditing(&lt;SPAN class=""&gt;False&lt;/SPAN&gt;, &lt;SPAN class=""&gt;True&lt;/SPAN&gt;)

edit.startOperation()

self.__insertDataInternal(table_path, cols, data)

edit.stopOperation()

edit.stopEditing(&lt;SPAN class=""&gt;True&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;I'm using versioned DB (Oracle) and the connection is set looking to version I need. All input data and cols are correct.&lt;/P&gt;&lt;P&gt;When I was googling so I found only solutions with errors from startOperation() or startEditing() but nowhere is error straight from insertRow().&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 20 Oct 2021 13:09:02 GMT</pubDate>
    <dc:creator>JD_1609</dc:creator>
    <dc:date>2021-10-20T13:09:02Z</dc:date>
    <item>
      <title>InsertCursor throwing "error return without exception set"</title>
      <link>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109178#M62700</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;DIV class=""&gt;&lt;P&gt;I'm trying write data to an Enterprise geodatabase but it still throws &lt;STRONG&gt;error return without exception set&lt;/STRONG&gt; (for clarification - error throws row cursor.insertRow(data).&lt;/P&gt;&lt;P&gt;I have method:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;def&lt;/SPAN&gt; __insertDataInternal(self, table, cols, data):
    &lt;SPAN class=""&gt;with&lt;/SPAN&gt; arcpy.da.InsertCursor(table, cols) &lt;SPAN class=""&gt;as&lt;/SPAN&gt; cursor:
        cursor.insertRow(data)&lt;/PRE&gt;&lt;P&gt;which I'm using for write to local gdb and remote (sde). For local gdb is everything alright and data are inserted. But when I use this method for write to Oracle it throws error.&lt;/P&gt;&lt;P&gt;Code for calling to write to EGDB looks this:&lt;/P&gt;&lt;PRE&gt;db = r"C:\Temp\file.sde"&lt;BR /&gt;&lt;BR /&gt;edit = arcpy.da.Editor(db)
edit.startEditing(&lt;SPAN class=""&gt;False&lt;/SPAN&gt;, &lt;SPAN class=""&gt;True&lt;/SPAN&gt;)

edit.startOperation()

self.__insertDataInternal(table_path, cols, data)

edit.stopOperation()

edit.stopEditing(&lt;SPAN class=""&gt;True&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;I'm using versioned DB (Oracle) and the connection is set looking to version I need. All input data and cols are correct.&lt;/P&gt;&lt;P&gt;When I was googling so I found only solutions with errors from startOperation() or startEditing() but nowhere is error straight from insertRow().&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Oct 2021 13:09:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109178#M62700</guid>
      <dc:creator>JD_1609</dc:creator>
      <dc:date>2021-10-20T13:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor throwing "error return without exception set"</title>
      <link>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109225#M62704</link>
      <description>&lt;P&gt;It's saying there is an unhandled error occurring. Wrap the process in a try/ except block to capture it and see what it is.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;try:
    edit = arcpy.da.Editor(db)
    edit.startEditing(False, True)

    edit.startOperation()

    self.__insertDataInternal(table_path, cols, data)

    edit.stopOperation()

    edit.stopEditing(True)

except Exception as ex:
    print(f'Failed: {ex}')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 14:27:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109225#M62704</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-10-20T14:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor throwing "error return without exception set"</title>
      <link>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109245#M62705</link>
      <description>&lt;P&gt;yes, I have it in try/except block and from that is "error return without exception set"... &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 15:02:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109245#M62705</guid>
      <dc:creator>JD_1609</dc:creator>
      <dc:date>2021-10-20T15:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor throwing "error return without exception set"</title>
      <link>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109274#M62707</link>
      <description>&lt;P&gt;Paste the full error message/code.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 15:36:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109274#M62707</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-10-20T15:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor throwing "error return without exception set"</title>
      <link>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109327#M62714</link>
      <description>&lt;P&gt;That's the **bleep**... This - "&lt;STRONG&gt;error return without exception set&lt;/STRONG&gt;" - is full message what I get... NOTHING else &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 16:21:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109327#M62714</guid>
      <dc:creator>JD_1609</dc:creator>
      <dc:date>2021-10-20T16:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor throwing "error return without exception set"</title>
      <link>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109359#M62717</link>
      <description>&lt;P&gt;Is the length of your fields in your 'data' longer than the length allowed in any of the fields?&lt;/P&gt;&lt;P&gt;add a print statement to your insert cursor and watch what values are being inserted and if it fails on one.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 17:53:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insertcursor-throwing-quot-error-return-without/m-p/1109359#M62717</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-10-20T17:53:21Z</dc:date>
    </item>
  </channel>
</rss>

