<?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: arcpy.TestSchemaLock misbehaving at 10.5.1? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624768#M48718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the workaround is to bracket schema lock-prone code with try: and except:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2017 13:13:40 GMT</pubDate>
    <dc:creator>CarlBeyerhelm1</dc:creator>
    <dc:date>2017-12-12T13:13:40Z</dc:date>
    <item>
      <title>arcpy.TestSchemaLock misbehaving at 10.5.1?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624764#M48714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the past, I've successfully used &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;arcpy.TestSchemaLock&lt;/SPAN&gt; prior to undertaking schema modifications within script tools.&amp;nbsp; I've recently upgraded to 10.5.1 and discovered that&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;arcpy.TestSchemaLock&lt;/SPAN&gt;&amp;nbsp;is now returning&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;False&lt;/SPAN&gt; when it should return &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;True&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example snippet below returns &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;False&lt;/SPAN&gt; in the Python window, but I can immediately add a field to the tested feature class, which indicates that it is not locked and should have returned &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;True&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did something get broken in 10.5.1 that worked in 10.4.1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;gt;&amp;gt;&amp;gt; fc = r'C:\Workspace\2017_Hyde\incident_data\2017_Hyde_AzCof331_Events.gdb\EventLine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;gt;&amp;gt;&amp;gt; canGetLock = arcpy.TestSchemaLock(fc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;gt;&amp;gt;&amp;gt; canGetLock&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;False&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 22:58:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624764#M48714</guid>
      <dc:creator>CarlBeyerhelm1</dc:creator>
      <dc:date>2017-12-11T22:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TestSchemaLock misbehaving at 10.5.1?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624765#M48715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bug&amp;nbsp;&lt;A href="http://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwNDI4NQ"&gt;http://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwNDI4NQ&lt;/A&gt;==&lt;/P&gt;&lt;P&gt;version fixed 10.6&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 23:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624765#M48715</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-12-11T23:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TestSchemaLock misbehaving at 10.5.1?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624766#M48716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; Could you re-try posting your link, please?&amp;nbsp; I'm getting a "This bug does not exist" page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 00:25:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624766#M48716</guid>
      <dc:creator>CarlBeyerhelm1</dc:creator>
      <dc:date>2017-12-12T00:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TestSchemaLock misbehaving at 10.5.1?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624767#M48717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwNDI4NQ"&gt;http://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwNDI4NQ==&lt;/A&gt; strange Jive seems to want to drop the ==&lt;/P&gt;&lt;P&gt;so just in case&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/390471_bug_example.png" style="width: 620px; height: 439px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 00:38:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624767#M48717</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-12-12T00:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TestSchemaLock misbehaving at 10.5.1?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624768#M48718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the workaround is to bracket schema lock-prone code with try: and except:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 13:13:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624768#M48718</guid>
      <dc:creator>CarlBeyerhelm1</dc:creator>
      <dc:date>2017-12-12T13:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TestSchemaLock misbehaving at 10.5.1?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624769#M48719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For info...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm in Windows 10 now (was in Win7 previously), and&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;arcpy.TestSchemaLock() now seems to be working in 10.5.1.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 17:58:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624769#M48719</guid>
      <dc:creator>CarlBeyerhelm1</dc:creator>
      <dc:date>2018-04-30T17:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TestSchemaLock misbehaving at 10.5.1?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624770#M48720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same problem in 10.5.0&lt;/P&gt;&lt;P&gt;Thinking which function&amp;nbsp;would be used without modified the dataset. Currently I get AlterField_management.&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
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;isLocked&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;dataset&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# if arcpy.TestSchemaLock(dataset):&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return False &lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# else:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return True&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AlterField_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;dataset&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"OBJECTID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt; Exception &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ex&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:37:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624770#M48720</guid>
      <dc:creator>MemoryBlue</dc:creator>
      <dc:date>2021-12-12T02:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TestSchemaLock misbehaving at 10.5.1?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624771#M48721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a perfect workaround. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 22:40:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-testschemalock-misbehaving-at-10-5-1/m-p/624771#M48721</guid>
      <dc:creator>WayneBoras</dc:creator>
      <dc:date>2019-06-10T22:40:51Z</dc:date>
    </item>
  </channel>
</rss>

