<?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 Appending to a layer with attachments in an unversioned sde database in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365992#M28902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m not sure what I’m doing wrong but I’m trying to use a Python script to append to a layer with attachments to an unversioned sde.&amp;nbsp; I originally got errors saying that had to be during an edit session.&amp;nbsp; So I added this code to start an edit session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&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;workspace&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="token boolean"&gt;False&lt;/SPAN&gt;&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;
 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;
 arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Append_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;srcData&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; destDataSDE&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NO_TEST"&lt;/SPAN&gt;&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;
 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;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I’m getting contradictory errors on the same attempt to run the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;Objects in this class cannot be updated outside an edit session [&amp;lt;feature class&amp;gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; This operation is not allowed while editing [sde.DEFAULT]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It "cannot be updated outside an edit session" and the "operation is not allowed while editing"?&amp;nbsp; I don’t understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has any ideas of what I might be doing wrong, I would appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:00:33 GMT</pubDate>
    <dc:creator>DanielWebb</dc:creator>
    <dc:date>2021-12-11T17:00:33Z</dc:date>
    <item>
      <title>Appending to a layer with attachments in an unversioned sde database</title>
      <link>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365992#M28902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m not sure what I’m doing wrong but I’m trying to use a Python script to append to a layer with attachments to an unversioned sde.&amp;nbsp; I originally got errors saying that had to be during an edit session.&amp;nbsp; So I added this code to start an edit session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&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;workspace&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="token boolean"&gt;False&lt;/SPAN&gt;&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;
 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;
 arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Append_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;srcData&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; destDataSDE&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NO_TEST"&lt;/SPAN&gt;&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;
 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;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I’m getting contradictory errors on the same attempt to run the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;Objects in this class cannot be updated outside an edit session [&amp;lt;feature class&amp;gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; This operation is not allowed while editing [sde.DEFAULT]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It "cannot be updated outside an edit session" and the "operation is not allowed while editing"?&amp;nbsp; I don’t understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has any ideas of what I might be doing wrong, I would appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:00:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365992#M28902</guid>
      <dc:creator>DanielWebb</dc:creator>
      <dc:date>2021-12-11T17:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Appending to a layer with attachments in an unversioned sde database</title>
      <link>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365993#M28903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you/the user running the script do what you want to in ArcMap?&amp;nbsp; Just wondering if it's a permission issue with sde.default.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2019 22:30:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365993#M28903</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-04-19T22:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Appending to a layer with attachments in an unversioned sde database</title>
      <link>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365994#M28904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe, thanks for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ArcMap, when I try to start an edit session, a popup says "Incorrect edit version type."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since it's unversioned, in the Editing Options I unchecked "Edit a version of the database with the ability to undo and redo."&amp;nbsp; Also, I'm connecting as the data owner.&amp;nbsp; Not sure if any of that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a staging database with no services published off it and it is also giving me the same errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 15:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365994#M28904</guid>
      <dc:creator>DanielWebb</dc:creator>
      <dc:date>2019-04-22T15:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Appending to a layer with attachments in an unversioned sde database</title>
      <link>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365995#M28905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think &lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff;"&gt;This operation is not allowed while editing [sde.DEFAULT]'&amp;nbsp;&lt;SPAN style="color: #000000;"&gt;is referring to the Append command; see what happens if you drop the da.Editor sequence and just append.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 16:09:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365995#M28905</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-04-22T16:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Appending to a layer with attachments in an unversioned sde database</title>
      <link>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365996#M28906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I remove the da.Editor I get this error;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;Objects in this class cannot be updated outside an edit session [&amp;lt;feature class&amp;gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;Failed to execute (Append).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's what originally got me looking into using the da.Editor. I feel like it's the attachments portion causing complexities.&amp;nbsp; We update publication data&amp;nbsp;nightly with Truncate/Appends and don't need edit sessions.&amp;nbsp; A file geodatabase feature class with attachments also doesn't need an edit session.&amp;nbsp; This is the first time I'm trying this with a feature class that has attachments so I feel like I'm missing an essential ingredient.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 17:27:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365996#M28906</guid>
      <dc:creator>DanielWebb</dc:creator>
      <dc:date>2019-04-22T17:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Appending to a layer with attachments in an unversioned sde database</title>
      <link>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365997#M28907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="background-color: #ffffff; "&gt;We update publication data&amp;nbsp;nightly with Truncate/Appends and don't need edit sessions.&amp;nbsp; &amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Which is something we do as well...&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Attachments and eGDBs....&amp;nbsp; I just don't have any experience in that particular scenario.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 17:38:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365997#M28907</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-04-22T17:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Appending to a layer with attachments in an unversioned sde database</title>
      <link>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365998#M28908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nor do I.&amp;nbsp; If you have any "ah ha!' moments, let me know.&amp;nbsp; I'll keep testing and digging.&amp;nbsp; Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 17:49:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365998#M28908</guid>
      <dc:creator>DanielWebb</dc:creator>
      <dc:date>2019-04-22T17:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Appending to a layer with attachments in an unversioned sde database</title>
      <link>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365999#M28909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you ever figure this issue out? I'm having the exact same problem trying to do a truncate and append. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2020 19:28:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/appending-to-a-layer-with-attachments-in-an/m-p/365999#M28909</guid>
      <dc:creator>AaronKoelker</dc:creator>
      <dc:date>2020-08-06T19:28:48Z</dc:date>
    </item>
  </channel>
</rss>

