<?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: SystemError: error return without exception set ; arcpy.da.Editor in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/systemerror-error-return-without-exception-set/m-p/57854#M4568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EDIT: It seems this did not resolve my problem entirely as it still seems to randomly lock the version. Here is the interesting part, if I use Reconcile Versions using the Database Connection point to the Version that did the edits and will be Reconciled and Posted, it may lock the version, and block entering an edit session with that version. If I do not use a Database Connection that points to that Version, it may still lock the version, but I will be able to enter an Edit Session using the Editor Toolbar, and then use the Versioning toolbar to Reconcile and Post, and it will remove the lock. Like I mentioned originally, it is absolutely bizarre to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You made a good point, so I decided to test out a number of cases to determine what would cause the error and resulting version lock.&lt;/P&gt;&lt;P&gt;There is some difference on how the arcpy.da.Editor editing session works / ends and how ArcMap's Editor Toolbar &amp;gt; Versioning Toolbar (GUI Session) works in the end.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The way I have avoided this error was to &lt;STRONG&gt;only use the Data Management Reconcile Versions&lt;/STRONG&gt; geoprocessing tool. By reconciling and posting with that, I could continue using my tool without the error arising. The error seemed to occur when I would run my tool successfully, enter an edit session using the Editor Toolbar and Reconciling and Posting, then running my tool again wherein it would fail before the arcpy.da.Editor Session could begin.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The testing process was as follows:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;UL&gt;&lt;LI&gt;All cases of running my tool were outside of an ArcMap Editor Toolbar editing session.&lt;/LI&gt;&lt;LI&gt;Case 1 (FAIL):&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="text-decoration: underline;"&gt;Run tool many times and reconcile and post using Editor Toolbar and Versioning Toolbar.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;I ran my tool using a database connection that was pointed to a specific version numerous times without reconciling and posting. I then entered an edit session using the Editing Toolbar and using the Versioning Toolbar to reconcile and post. I ran my tool again, and it failed with the &lt;STRONG&gt;SystemError: error return without exception set&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;I closed ArcMap and killed it's process. I ran the tool again numerous times, and followed the above bullet, failing again.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Case 2 (SUCCESS):&lt;UL&gt;&lt;LI&gt;Restart ArcMap, run tool, use Reconcile Versions geoprocessing tool to Reconcile and Post on my version.&lt;/LI&gt;&lt;LI&gt;Ran tool again, and it successfully runs.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Case 3 (FAIL):&lt;UL&gt;&lt;LI&gt;Consider possibility of there being a hidden lock after ArcMap GUI Reconcile and Post&lt;/LI&gt;&lt;LI&gt;Ran my tool, use ArcMap GUI, and wait some arbitrary time (~5 Minutes)&lt;/LI&gt;&lt;LI&gt;Ran my tool again, &lt;STRONG&gt;SystemError: error return without exception set&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Case 4 (SUCCESS):&lt;UL&gt;&lt;LI&gt;Test to see if ArcMap GUI works after Reconcile Versions geoprocessing tool&lt;/LI&gt;&lt;LI&gt;Ran my tool successfully, run Reconcile Versions geoprocessing tool&lt;/LI&gt;&lt;LI&gt;Enter ArcMap GUI editing session and reconcile and post&lt;/LI&gt;&lt;LI&gt;Run my tool again after successfully.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This might resolve my immediate issue, but I still hesitate to consider this solved without there being further discussion on the differences between the ArcObjects/Arcpy editing versus the toolbars in ArcMap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Oct 2019 20:17:49 GMT</pubDate>
    <dc:creator>PaulPanehal</dc:creator>
    <dc:date>2019-10-09T20:17:49Z</dc:date>
    <item>
      <title>SystemError: error return without exception set ; arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/python-questions/systemerror-error-return-without-exception-set/m-p/57852#M4566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have had this never-ending question regarding how to run a Python Script to make updates to Versioned data.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;How can I enter an Edit Session, on a pre-existing version, complete the edit session, review the changes, then reconcile and post WITHOUT causing a schema lock.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;For some background, the below script is not in it's entirety:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have created a database connection that is pointing to the intended, pre-existing version. The update cursor reads and updates a feature class using the above database connection. The update cursor completes successfully, updating correctly.&lt;/P&gt;&lt;P&gt;It is intended that the user will then manually review the changes, if the changes are good, reconcile and post. If bad, delete the version (&lt;EM&gt;I need a better process for this as well&lt;/EM&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;If the user enters an ArcMap Editor Toolbar Edit Session post update, checks everything, reconciles and posts. It works, no locks. Then, if you run the tool again, &lt;STRONG&gt;SystemError: error return without exception set&lt;/STRONG&gt;. If I go to the Version Manager to view current locks, there is a lock on that version even after successful rec/post.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;How does one prevent this lock from occurring. The python editing process is not documented in depth enough, and does not touch on how the delta tables are affected (I have tried to research the ArcObjects docs, which are mostly copied and pasted into arcpy). Why would I have schema locks if I am editing in one toolset vs. the other, but they're taking place after operations? I have tried many workarounds, numerous times, yet I am clearly missing something.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;## Editor Class&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;"""
https://gis.stackexchange.com/a/158627
"""&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;find_ws&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; ws_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"""finds a valid workspace path for an arcpy.da.Editor() Session

    Required:
        path -- path to features or workspace

    Optional:
        ws_type -- option to find specific workspace type (FileSystem|LocalDatabase|RemoteDatabase)

    """&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;# try original path first&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sep &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; path&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        path &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;catalogPath
    desc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; hasattr&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;desc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'workspaceType'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; ws_type &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; ws_type &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; desc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspaceType&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; path
        &lt;SPAN class="keyword token"&gt;elif&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; ws_type&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; path

    &lt;SPAN class="comment token"&gt;# search until finding a valid workspace&lt;/SPAN&gt;
    SPLIT &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; filter&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sep&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startswith&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'\\\\'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        SPLIT&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'\\{0}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SPLIT&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

    &lt;SPAN class="comment token"&gt;# find valid workspace&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; xrange&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SPLIT&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        sub_dir &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sep&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SPLIT&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        desc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sub_dir&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; hasattr&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;desc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'workspaceType'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; ws_type &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; ws_type &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; desc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspaceType&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; sub_dir
            &lt;SPAN class="keyword token"&gt;elif&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; ws_type&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; sub_dir


&lt;SPAN class="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;EditorUpdateCursor&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;object&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"""Wrapper class for arcpy.da.UpdateCursor to automatically
    implement editing (required for versioned data, and data with
    geometric networks, topologies, network datasets, and relationship
    classes"""&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;__init__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;**&lt;/SPAN&gt;kwargs&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;"""init wrapper class for update cursor Supported args:
            in_table, field_names, where_clause=None, spatial_reference=None
            explode_to_points=False, sql_clause=(None, None)"""&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;args &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; args
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;kwargs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; kwargs
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; None

    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;__enter__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        ws &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; None
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            ws &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; find_ws&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;elif&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'in_table'&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;kwargs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            ws &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; find_ws&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;kwargs&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'in_table'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit &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;Editor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ws&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;**&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;kwargs&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;__exit__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; type&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; value&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; traceback&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; traceback &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;stopOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;stopEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; None
        &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;abortOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;stopEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; None

&lt;SPAN class="comment token"&gt;## Update Logic&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; updatedStructuresCount &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;
            arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'\nPole Numbers are being updated...'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

            &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; structure &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; structureDict&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                where &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"""GLOBALID = '{}'"""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;structure&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; editUpdCursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;EditorUpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;strPath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'POLENUMBER'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; where&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                        newPoleNum &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; structureDict&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;structure&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                        row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; newPoleNum
                        cursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Pole Numbers update complete...'&lt;/SPAN&gt;&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&l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t;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:11:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/systemerror-error-return-without-exception-set/m-p/57852#M4566</guid>
      <dc:creator>PaulPanehal</dc:creator>
      <dc:date>2021-12-10T22:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: SystemError: error return without exception set ; arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/python-questions/systemerror-error-return-without-exception-set/m-p/57853#M4567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you run the tool once, rec/post and then exit out of ArcMap, does running the tool a second time work in a clean ArcMap session?&amp;nbsp; I ask because this seems to be the ArcMap GUI session holding the lock, not ArcPy, so it might be a GUI workflow change that is needed and not changes to ArcPy code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2019 15:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/systemerror-error-return-without-exception-set/m-p/57853#M4567</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-10-09T15:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: SystemError: error return without exception set ; arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/python-questions/systemerror-error-return-without-exception-set/m-p/57854#M4568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EDIT: It seems this did not resolve my problem entirely as it still seems to randomly lock the version. Here is the interesting part, if I use Reconcile Versions using the Database Connection point to the Version that did the edits and will be Reconciled and Posted, it may lock the version, and block entering an edit session with that version. If I do not use a Database Connection that points to that Version, it may still lock the version, but I will be able to enter an Edit Session using the Editor Toolbar, and then use the Versioning toolbar to Reconcile and Post, and it will remove the lock. Like I mentioned originally, it is absolutely bizarre to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You made a good point, so I decided to test out a number of cases to determine what would cause the error and resulting version lock.&lt;/P&gt;&lt;P&gt;There is some difference on how the arcpy.da.Editor editing session works / ends and how ArcMap's Editor Toolbar &amp;gt; Versioning Toolbar (GUI Session) works in the end.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The way I have avoided this error was to &lt;STRONG&gt;only use the Data Management Reconcile Versions&lt;/STRONG&gt; geoprocessing tool. By reconciling and posting with that, I could continue using my tool without the error arising. The error seemed to occur when I would run my tool successfully, enter an edit session using the Editor Toolbar and Reconciling and Posting, then running my tool again wherein it would fail before the arcpy.da.Editor Session could begin.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The testing process was as follows:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;UL&gt;&lt;LI&gt;All cases of running my tool were outside of an ArcMap Editor Toolbar editing session.&lt;/LI&gt;&lt;LI&gt;Case 1 (FAIL):&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="text-decoration: underline;"&gt;Run tool many times and reconcile and post using Editor Toolbar and Versioning Toolbar.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;I ran my tool using a database connection that was pointed to a specific version numerous times without reconciling and posting. I then entered an edit session using the Editing Toolbar and using the Versioning Toolbar to reconcile and post. I ran my tool again, and it failed with the &lt;STRONG&gt;SystemError: error return without exception set&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;I closed ArcMap and killed it's process. I ran the tool again numerous times, and followed the above bullet, failing again.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Case 2 (SUCCESS):&lt;UL&gt;&lt;LI&gt;Restart ArcMap, run tool, use Reconcile Versions geoprocessing tool to Reconcile and Post on my version.&lt;/LI&gt;&lt;LI&gt;Ran tool again, and it successfully runs.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Case 3 (FAIL):&lt;UL&gt;&lt;LI&gt;Consider possibility of there being a hidden lock after ArcMap GUI Reconcile and Post&lt;/LI&gt;&lt;LI&gt;Ran my tool, use ArcMap GUI, and wait some arbitrary time (~5 Minutes)&lt;/LI&gt;&lt;LI&gt;Ran my tool again, &lt;STRONG&gt;SystemError: error return without exception set&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Case 4 (SUCCESS):&lt;UL&gt;&lt;LI&gt;Test to see if ArcMap GUI works after Reconcile Versions geoprocessing tool&lt;/LI&gt;&lt;LI&gt;Ran my tool successfully, run Reconcile Versions geoprocessing tool&lt;/LI&gt;&lt;LI&gt;Enter ArcMap GUI editing session and reconcile and post&lt;/LI&gt;&lt;LI&gt;Run my tool again after successfully.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This might resolve my immediate issue, but I still hesitate to consider this solved without there being further discussion on the differences between the ArcObjects/Arcpy editing versus the toolbars in ArcMap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2019 20:17:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/systemerror-error-return-without-exception-set/m-p/57854#M4568</guid>
      <dc:creator>PaulPanehal</dc:creator>
      <dc:date>2019-10-09T20:17:49Z</dc:date>
    </item>
  </channel>
</rss>

