<?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: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only) in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26351#M960</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Adrian and Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've looked at this issue and it looks like a bug. It's a regression from 10.x where this behavior isn't observed. There are a few workarounds for this issue for anyone coming to this issue later:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use an in-memory workspace for the temporary results you want to store&lt;/P&gt;&lt;P&gt;2. Delete the feature class created just prior to the layer creation&lt;/P&gt;&lt;P&gt;3. Run the MakeFeatureLayer step in a &lt;A href="https://docs.python.org/3/library/subprocess.html"&gt;subprocess&lt;/A&gt;, so that it's process terminates prior to you trying to do further work in the GDB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, Shaun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jun 2017 03:46:54 GMT</pubDate>
    <dc:creator>ShaunWalbridge</dc:creator>
    <dc:date>2017-06-14T03:46:54Z</dc:date>
    <item>
      <title>Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26348#M957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having trouble removing a schema lock from a feature class in a file geodatabase after running arcpy.MakeFeatureLayer(). The typical arcpy.Delete(layer) isn't working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only experience this issue when running this with Pro's (1.4.1) version of python. It works&amp;nbsp;fine with ArcGIS Desktop. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Demo" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/356834_screencast.gif" style="width: 620px; height: 665px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a script that demonstrates the issue:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;management&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateFileGDB&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\temp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"test.gdb"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;management&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateFeatureclass&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\temp\test.gdb"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Test"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"POLYGON"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"ENABLED"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; "PROJCS&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'WGS_1984_Web_Mercator_Auxiliary_Sphere'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;GEOGCS&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'GCS_WGS_1984'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;DATUM&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'D_WGS_1984'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;SPHEROID&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'WGS_1984'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6378137.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;298.257223563&lt;/SPAN&gt;&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;PRIMEM&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Greenwich'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;UNIT&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Degree'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0174532925199433&lt;/SPAN&gt;&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;PROJECTION&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Mercator_Auxiliary_Sphere'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'False_Easting'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'False_Northing'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Central_Meridian'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Standard_Parallel_1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Auxiliary_Sphere_Type'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;UNIT&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Meter'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1.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="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;20037700&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;30241100&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#;#;0.001;#;#;IsHighPrecision", None, 0, 0, 0)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"c:\\temp\\test.gdb"&lt;/SPAN&gt;
layer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Test'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'NewTest'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'NewTest'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Layer'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; layer
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#: lock still exists&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C:\\temp\\test.gdb"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 

&lt;SPAN class="string token"&gt;"""
This throws an exception: 
arcgisscripting.ExecuteError: ERROR 000601: Cannot delete C:\Temp\test.gdb.&amp;nbsp; 
May be locked by another application.
"""&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;&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;&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 21:03:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26348#M957</guid>
      <dc:creator>ScottDavis</dc:creator>
      <dc:date>2021-12-10T21:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26349#M958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked around and did not see any solutions to this. I wonder if this is a bug and potentially fixed in ArcGIS Pro 2.0. I am tagging &lt;A href="https://community.esri.com/people/rleclair-esristaff"&gt;rleclair-esristaff&lt;/A&gt;‌ to see if he has any insight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it might help to form your discussion into a question in order to get more responses and more visibility.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 21:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26349#M958</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2017-06-13T21:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26350#M959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott - first I have to mention I'm not a Python guru but have a suggestion or two to investigate based upon my research. &amp;nbsp;First, you may want to run the "Analyze Tools for Pro" GP tool either in ArcMap or Pro. &amp;nbsp;The GP tool will test your Python script to see if it will run in Python 3.5.2 (Pro's version of Python) and write a text file out to troubleshoot. &amp;nbsp;Second, I haven't seen a bug mentioning the error codes but there was a suggestion to put a time.sleep() into your code for asynchronous processes. &amp;nbsp;Refresh the folder. &amp;nbsp;Does the LOCK remain? &amp;nbsp;Pls advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 22:15:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26350#M959</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2017-06-13T22:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26351#M960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Adrian and Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've looked at this issue and it looks like a bug. It's a regression from 10.x where this behavior isn't observed. There are a few workarounds for this issue for anyone coming to this issue later:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use an in-memory workspace for the temporary results you want to store&lt;/P&gt;&lt;P&gt;2. Delete the feature class created just prior to the layer creation&lt;/P&gt;&lt;P&gt;3. Run the MakeFeatureLayer step in a &lt;A href="https://docs.python.org/3/library/subprocess.html"&gt;subprocess&lt;/A&gt;, so that it's process terminates prior to you trying to do further work in the GDB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, Shaun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 03:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26351#M960</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2017-06-14T03:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26352#M961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/4150"&gt;Scott Davis&lt;/A&gt;&amp;nbsp;- I am experiencing the exact issue you describe, but I am using ArcMap Desktop 10.5.1 using Python 2.7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my workflow in a single script:&lt;/P&gt;&lt;P&gt;1. Create temporary gdb and feature class (on C:\temp for speed)&lt;/P&gt;&lt;P&gt;2. Create feature layer from feature class (in-memory) to perform some analysis&lt;/P&gt;&lt;P&gt;3. Output results to desired destination&lt;/P&gt;&lt;P&gt;4. Delete temporary gdb (fail)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3573"&gt;Robert LeClair&lt;/A&gt;‌ - The lock will remain for asynchronous processes until the python process has ended (and raised an error in this case), so adding time.sleep() &lt;EM&gt;during &lt;/EM&gt;the process has no impact.&amp;nbsp;I can delete the gdb in a separate process once the first process has ended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/31672"&gt;Shaun Walbridge&lt;/A&gt;‌ - 1. The lock gets added to the &lt;EM&gt;source&lt;/EM&gt; data and has no impact on the feature layer, so using&amp;nbsp;in-memory for the feature layer does not help. 2. Not sure how you can make a feature layer from a feature class that has been deleted. 3. This appears to be the only solution for now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 23:23:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26352#M961</guid>
      <dc:creator>AdamThomas3</dc:creator>
      <dc:date>2018-05-04T23:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26353#M962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is logged as BUG-000086232 here: &lt;A href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA4NjIzMg=="&gt;https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA4NjIzMg==,&lt;/A&gt; but there is currently no plan to resolve it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 17:39:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26353#M962</guid>
      <dc:creator>AdamThomas3</dc:creator>
      <dc:date>2018-05-07T17:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26354#M963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One possible solution is to use the scratch workspace instead of creating your own&amp;nbsp;temp workspace. The lock will still be created&amp;nbsp;in the scratch workspace (it only exists&amp;nbsp;while the python process is running, just like before), but the scratch workspace isn't &lt;EM&gt;intended&lt;/EM&gt; to be deleted, so you won't need to do any cleanup afterwards. Arcpy will always have access to create the same scratch workspace for each process that is created. In my case the scratch workspace is created in C:\Users\{user}\AppData\Local\Temp\scratch.gdb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the sample script from above, modified to use the scratch workspace instead:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scratchGDB
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;management&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateFeatureclass&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Test"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"POLYGON"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"ENABLED"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; "PROJCS&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'WGS_1984_Web_Mercator_Auxiliary_Sphere'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;GEOGCS&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'GCS_WGS_1984'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;DATUM&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'D_WGS_1984'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;SPHEROID&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'WGS_1984'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6378137.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;298.257223563&lt;/SPAN&gt;&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;PRIMEM&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Greenwich'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;UNIT&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Degree'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0174532925199433&lt;/SPAN&gt;&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;PROJECTION&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Mercator_Auxiliary_Sphere'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'False_Easting'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'False_Northing'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Central_Meridian'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Standard_Parallel_1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;PARAMETER&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Auxiliary_Sphere_Type'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;UNIT&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Meter'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1.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="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;20037700&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;30241100&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#;#;0.001;#;#;IsHighPrecision", None, 0, 0, 0)&lt;/SPAN&gt;
layer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Test'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'NewTest'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍

&lt;SPAN class="comment token"&gt;# No cleanup required here.&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# The scratch workspace is recreated every time it is used.&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Pretend it never existed!‍‍‍‍‍&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;&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 21:03:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26354#M963</guid>
      <dc:creator>AdamThomas3</dc:creator>
      <dc:date>2021-12-10T21:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26355#M964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/4150"&gt;Scott Davis&lt;/A&gt;‌ &lt;A href="https://community.esri.com/migrated-users/133589"&gt;Adam Thomas&lt;/A&gt; This issue has been resolved in Pro 2.3. Thanks for bringing it up, and if you see something similar once you have Pro 2.3, let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Shaun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CC &lt;A href="https://community.esri.com/migrated-users/45316"&gt;Kory Kramer&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2019 20:37:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26355#M964</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2019-01-17T20:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26356#M965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/31672"&gt;Shaun Walbridge&lt;/A&gt;‌ &lt;A href="https://community.esri.com/migrated-users/4150"&gt;Scott Davis&lt;/A&gt; Using Jupyter with ArcGIS Pro open, seems also is occurring , i.e. :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ArcGIS Pro v2.4.1 is open: arcpy.env.workspace =&amp;nbsp;'D:\\some_projects\\cogubem\\scratch.gdb'&lt;/P&gt;&lt;P&gt;No locks in here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: var(--jp-content-font-color1); border: none; font-size: var(--jp-code-font-size);"&gt;Jupyter Nb is open: arcpy.env.workspace = 'C:\\%users%\\AppData\\Local\\Temp\\scratch.gdb'&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;ExecuteError&lt;/SPAN&gt;: ERROR 000464: Cannot get exclusive schema lock. Either being edited or in use by another application or service. Failed to execute (Delete).&lt;/P&gt;&lt;P&gt;And Jupyter Nb is running a cloned conda environment of arcpy accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Found way of sorting it although is for case here so i would like to know if in your case this also works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:49:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26356#M965</guid>
      <dc:creator>FranciscoCosta1</dc:creator>
      <dc:date>2019-09-04T14:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26357#M966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Francisco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case you describe I think the error is accurate, since there are two separate processes trying to access the workspace simultaneously. You could do something like create a temporary workspace for each process, and then write to the shared workspace only at the end to avoid having this overlap, or if your data is small enough, use in memory workspaces in each process till the final write step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Shaun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2019 02:30:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26357#M966</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2019-11-15T02:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26358#M967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, at version ArcGIS Pro 2.4.2, I have very, if not the same, behavior:&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;I cannot delete layer, because of&amp;nbsp;&amp;nbsp;ERROR 000464: Cannot get exclusive schema lock.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Workflow of Script:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;my script is accessing one&amp;nbsp; feature class in fgdb stored on &lt;STRONG&gt;NAS &lt;/STRONG&gt;--&amp;gt; meaning &lt;STRONG&gt;read only&lt;/STRONG&gt; files&lt;/LI&gt;&lt;LI&gt;next it create layers (in &lt;STRONG&gt;local&lt;/STRONG&gt; fgdb ), do some intersection within my zone (AOI) and export to local&amp;nbsp;feature class&lt;/LI&gt;&lt;LI&gt;when trying to delete the layer, the scripts fails due to the above error.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here are my observation:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Executing script standalone and using python 3x and based on fgdb stored on NAS (read only files) --&amp;gt;&lt;SPAN style="color: #ff0000;"&gt; it fails&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Executing script in Pyton 2.7 --&amp;gt;&lt;SPAN style="color: #008000;"&gt; it works!&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Executing script through toolbox in ArcGIS Pro --&amp;gt; &lt;SPAN style="color: #008000;"&gt;it works!&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Executing script standalone and using python 3.x and based on fgdb stored locally (so no attributes of read only) --&amp;gt; &lt;SPAN style="color: #008000;"&gt;it works!&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am attaching zip file with script, and 2 fgdb:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;one fgdb which is created normally (access&amp;nbsp; read/write)&lt;/LI&gt;&lt;LI&gt;the second fgdb where after creation, I've changed read/write rights within windows explorer&amp;nbsp;and properties of folder.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;As said above if executing script with "read only" fgdb by:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"c:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3" test.py - &lt;SPAN style="color: #ff0000;"&gt;it fails&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;"C:\Python27\ArcGISx6410.6\python.exe" test.py &lt;SPAN style="color: #008000;"&gt;-it works&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As said above if&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;executing script with "read/write" fgdb by:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"c:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3" test.py -&amp;nbsp;&lt;SPAN style="color: #008000;"&gt;it works&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;"C:\Python27\ArcGISx6410.6\python.exe" test.py -i&lt;SPAN style="color: #008000;"&gt;t work&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;A href="https://www.dropbox.com/sh/wv5q8ecgihurdvm/AADkwybNn5LHpE2NqEY-d296a?dl=0"&gt;link to dropox with zip file of script and data&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What is the problem? Anyone ?&lt;/P&gt;&lt;P&gt;Thank you, Tomasz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screenshot of script" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/474391_screenshot_script.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2019 13:35:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26358#M967</guid>
      <dc:creator>TomaszTARCHALSKI1</dc:creator>
      <dc:date>2019-11-22T13:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26359#M968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you &lt;A href="https://community.esri.com/migrated-users/44931"&gt;Tomasz TARCHALSKI&lt;/A&gt;‌ for documenting this bug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am running version ArcGIS Pro 2.4.3 and have the same issue, but on a ShapeFile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My workaround is to duplicate the data set to avoid this, not very ideal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any update to his &lt;A href="https://community.esri.com/migrated-users/31672"&gt;Shaun Walbridge&lt;/A&gt;‌ ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2020 14:08:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26359#M968</guid>
      <dc:creator>ThomasL</dc:creator>
      <dc:date>2020-01-10T14:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26360#M969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working with tech support&amp;nbsp;&lt;SPAN style="font-size: 11.0pt;"&gt;&lt;STRONG&gt;BUG-000129022&lt;/STRONG&gt; was logged. In my case, updating FC attributes in a scratch&amp;nbsp;FGDB with update cursors caused locks which prevented deletion of the scratch FGDB. Substituting calculate field for the update cursors is a viable option in this case as the FC in question only contains a few thousand features.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Specifically:&amp;nbsp;arcgisscripting.ExecuteError: ERROR 000601: Cannot delete C:\TEMP\ESRI_Case_geodatabase_locks\proc.gdb. May be locked by another application.&lt;BR /&gt;Failed to execute (Delete).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;In theory creating the cursors using the following construct&amp;nbsp;should release locks after the cursor executes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;&lt;STRONG&gt;with arcpy.da.UpdateCursor(fc, [columns], where clause) as cursor:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for row in cursor:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do some calculation&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cursor.updateRow(row)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2020 14:52:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26360#M969</guid>
      <dc:creator>RobertHolliday</dc:creator>
      <dc:date>2020-02-28T14:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26361#M970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm still having this challenge. To summarize the code below:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;From a point feature class I'm making a point feature layer (if the point feature layer already exists I specify to delete and overwrite it)--see line 7 in code sample&lt;/LI&gt;&lt;LI&gt;Do stuff with the point feature layer (lines 9-55)&lt;/LI&gt;&lt;LI&gt;Once done doing stuff with the point feature layer, I specify to try and delete it (line 59). But I cannot delete it because it has a schema lock on it.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More info:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The issue does not affect when I run in a desktop environment. It only comes up once I publish the tool using the code to my agency's Portal hosted on ArcServer&lt;/LI&gt;&lt;LI&gt;This creates problems because there are various points in my script where the same process is re-run on the same feature class, so the feature layers for&lt;/LI&gt;&lt;LI&gt;The problem is intermittent (but happens more than half the time I run the tool), and I can't pin down the exact conditions that trigger it.&lt;/LI&gt;&lt;LI&gt;I've tried the following with no success:&lt;UL&gt;&lt;LI&gt;Putting feature layer in "in-memory"&lt;/LI&gt;&lt;LI&gt;Making copy of source feature class in scratch GDB&lt;/LI&gt;&lt;LI&gt;adding a time.clock() suffix to the feature class name so that every time it is created it has a unique name.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to know:&lt;/P&gt;&lt;P&gt;Is there anything I can do to "release" the feature layer so that it can be deleted?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is the right thread to post this on. Any help much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;intersection_density&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc_project&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fc_intersxns&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; project_type&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;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Calculating intersection density..."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    
    fl_project &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'fl_project'&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#weirdly, the project line feature class has no problems&lt;/SPAN&gt;

    &lt;SPAN class="comment token"&gt;# the intersections fl is what's problematic. Trying to create in temp memory workspace&lt;/SPAN&gt;
    fl_intersxns &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'memory'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'fl_intersxns'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

    extest &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Exists&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_intersxns&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;"Does intersection fl exist? {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extest&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Exists&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_project&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;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_project&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc_project&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fl_project&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        
        &lt;SPAN class="comment token"&gt;# the first time through, it seems fine and creates the intersections feature layer without problems&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Exists&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_intersxns&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;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_intersxns&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;    
        arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc_intersxns&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fl_intersxns&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;


        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; project_type &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; params&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ptype_area_agg&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            fc_buff &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fc_project
        &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            params&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;intersxn_dens_buff
            fc_buff &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"memory\temp_buff_qmi"&lt;/SPAN&gt;
            arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Buffer_analysis&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_project&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fc_buff&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; params&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;intersxn_dens_buff&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        fl_buff &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"fl_buff"&lt;/SPAN&gt;
    
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Exists&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_buff&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;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_buff&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc_buff&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fl_buff&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        buff_acres &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; get_poly_area&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_buff&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByLocation_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_intersxns&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"INTERSECT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fl_buff&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="string token"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        intsxn_34 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
        col_link_cnt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"LINKS"&lt;/SPAN&gt;

        &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_intersxns&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;col_link_cnt&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cur&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; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;if&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;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                    intsxn_34 &lt;SPAN class="operator token"&gt;+=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;

        intersxns_per_acre &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; intsxn_34 &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; buff_acres &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; buff_acres &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&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;"Successfully calculated intersections per acre."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Intersxn_34_per_acre"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; intersxns_per_acre&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        

    &lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        msg &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;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetMessages&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; trace&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;
        arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddWarning&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;finally&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Exists&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_intersxns&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; 
            &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                &lt;SPAN class="comment token"&gt;#HERE IS WHERE IT THROWS ERROR 000464: cannot delete because of schema lock. Why is it still locked?&lt;/SPAN&gt;
                arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl_intersxns&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                msg &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"trying arcpy.Delete_management: {}, {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetMessages&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; trace&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;
                arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddWarning&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        n &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;collect&lt;SPAN class="punctuation token"&gt;(&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;&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;&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;&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;&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;&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;&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;&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;&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;&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 21:03:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/26361#M970</guid>
      <dc:creator>DarrenConly</dc:creator>
      <dc:date>2021-12-10T21:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Removing Schema Lock After arcpy.MakeFeatureLayer (Pro Only)</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/1285221#M68719</link>
      <description>&lt;P&gt;My situation is that my python notebook script in my ArcGIS Pro project needs to read a *.shp as input and drop bunch of files in my default geodatabase. After the script finishes, there is always a lock to that input shapefile unless I closed the ArcGIS project. Ideally, I'd like to have that lock release after Python script finishes running.&lt;/P&gt;&lt;P&gt;I am looking for a solution (maybe a line of python script in the end) that the scheme lock of that input shapefile can be released after script completes execution without me closing ArcGIS Pro project.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 15:40:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-removing-schema-lock-after-arcpy/m-p/1285221#M68719</guid>
      <dc:creator>HanZheng</dc:creator>
      <dc:date>2023-05-03T15:40:46Z</dc:date>
    </item>
  </channel>
</rss>

