<?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: Receive error 160706: Cannot acquire a lock when calculating field in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/receive-error-160706-cannot-acquire-a-lock-when/m-p/1625462#M74410</link>
    <description>&lt;P&gt;I am having this same problem.&amp;nbsp; Did you figure out a solution?&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jun 2025 19:47:24 GMT</pubDate>
    <dc:creator>PaulCone2</dc:creator>
    <dc:date>2025-06-20T19:47:24Z</dc:date>
    <item>
      <title>Receive error 160706: Cannot acquire a lock when calculating field</title>
      <link>https://community.esri.com/t5/python-questions/receive-error-160706-cannot-acquire-a-lock-when/m-p/1142090#M63690</link>
      <description>&lt;P&gt;I receive the this error when using CalculateField in a notebook run from ArcGIS Pro. My workflow is as follows: select fields based on attributes, then calculate a field of the selected features to be a null value. I have been using the following code to accomplish that:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;arcpy.management.SelectLayerByAttribute("waterbody", "NEW_SELECTION", "WBY_ALIAS1 = ' '", None)
arcpy.management.CalculateField("waterbody", "WBY_ALIAS1", "None", "PYTHON3", '', "TEXT", "NO_ENFORCE_DOMAINS")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"waterbody" is a polygon feature class saved to my project gdb and loaded into the active map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This same code is run 2 other times in my notebook for different feature classes (one is a point, one is a line), all stored in the same location and loaded into the active map.&amp;nbsp;When I run this cell on its own, I receive no errors. When I run all the cells in the notebook, I will receive the error on one of the three runs of CalculateField. Every time I run the code in the notebook a different calculate field line will receive the error message, and if I run the cells from that point on without editing anything, I don't receive an error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure what the root cause of this issue is as it seems to be somewhat random and there is limited information when looking up the error code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 14:37:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/receive-error-160706-cannot-acquire-a-lock-when/m-p/1142090#M63690</guid>
      <dc:creator>VictoriaTousaw</dc:creator>
      <dc:date>2022-02-09T14:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Receive error 160706: Cannot acquire a lock when calculating field</title>
      <link>https://community.esri.com/t5/python-questions/receive-error-160706-cannot-acquire-a-lock-when/m-p/1625462#M74410</link>
      <description>&lt;P&gt;I am having this same problem.&amp;nbsp; Did you figure out a solution?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 19:47:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/receive-error-160706-cannot-acquire-a-lock-when/m-p/1625462#M74410</guid>
      <dc:creator>PaulCone2</dc:creator>
      <dc:date>2025-06-20T19:47:24Z</dc:date>
    </item>
  </channel>
</rss>

