<?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: SetNull() fails after a number of loops in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288938#M22409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;10.5 is now using .tifs for temporary data. Your issue may be related to that. Definitely report to Esri!&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/get-started/introduction/whats-new-in-arcgis.htm#ESRI_SECTION1_C1F40A5EB59B4406B2858BFA09954A35" title="http://desktop.arcgis.com/en/arcmap/latest/get-started/introduction/whats-new-in-arcgis.htm#ESRI_SECTION1_C1F40A5EB59B4406B2858BFA09954A35" rel="nofollow noopener noreferrer" target="_blank"&gt;What's new in ArcMap—ArcGIS Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note - it is not good practice to set arcpy.env.workspace to in_memory. &amp;nbsp;This is because&amp;nbsp;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/the-in-memory-workspace.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;as the help warns&lt;/A&gt; you really don't want to fill up in_memory, which would be very easy to do if everything default is written there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am doing heavy map algebra, to make temp raster handling efficient, I set the workspace and scratch to the same writable system folder -- for example:&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;from&lt;/SPAN&gt; arcpy &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; env
env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scratchFolder
env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scratchWorkspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are having issues with the map algebra and&amp;nbsp;temporary rasters, you can do a direct run of raster tools&amp;nbsp;(bypassing map algebra) like this. If you are running through 5000 rasters this may be more efficient, bypassing saving a temp raster in .tif format:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; gif &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; gifs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SetNull_sa&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gif&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; gif&lt;SPAN class="punctuation 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;destination&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; gif&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"VALUE = 0"&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;To get usage on how to run the tool directly (not always obvious)&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Usage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"SetNull_sa"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'SetNull_sa(in_conditional_raster, in_false_raster_or_constant, out_raster, {where_clause})'&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/curtvprice/blog/2017/03/03/temporary-rasters-in-arcpy?sr=search&amp;amp;searchId=3b056986-622d-4dde-93c6-be82414a196a&amp;amp;searchIndex=0" target="_blank"&gt;https://community.esri.com/people/curtvprice/blog/2017/03/03/temporary-rasters-in-arcpy?sr=search&amp;amp;searchId=3b056986-622d-4dde-93c6-be82414a196a&amp;amp;searchIndex=0&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:57:39 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2021-12-11T13:57:39Z</dc:date>
    <item>
      <title>SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288929#M22400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a script that used to work finely under ArcGIS 10.3.1 and Windows 7. Thar script performed a SetNull on a number of rasters and then mosaic them. This workflow has to be repeated more than 5000 times. Now I have ArcGIS 10.5 and Windows 10 and the script fails around the 180 loop and always on the SetNull function. I had many different types of errors, like ‘out of memory’ or ‘the raster can’t be open’. I guess it is a problem related with the virtual memory, but I could not solve it. The script includes an error handling to trace errors, delete workspace, scratchFolder, gc.collect(), but always fails around the same loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I checked what happened with a simple script that tries to Set Null a large number of rasters in a folder (5900) and save the result in another folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-centered j-img-original" src="https://community.esri.com/legacyfs/online/358521_Code.jpg" style="height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, SetNull() fails after near 1500 loops, whatever the modification I tried, and the error is saving the result (ERROR: 010240). However the same script works fine in Windows 7 and with ArcGIS 10.3.1. I think this is not an issue exclusive of SetNull(), and can occur with other functions that creates temporary data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know if arcpy changed its performance in Windows 10 or ArcGIS 10.5? Is there something I have to change in the computer settings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jun 2017 16:16:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288929#M22400</guid>
      <dc:creator>AlfonsoYañez_Morillo</dc:creator>
      <dc:date>2017-06-24T16:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288930#M22401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your in_memory workspace gets deleted in the first loop ... is that an indentation error in the code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jun 2017 19:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288930#M22401</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-06-24T19:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288931#M22402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this is the exact same code using the exact same data, and it works in 10.3.1 and doesn't in 10.5, I would go through your organization's channels to open a case with Esri Support.&amp;nbsp; It isn't unheard of that bugs are introduced in existing functionality when new versions are released.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jun 2017 13:13:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288931#M22402</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-06-25T13:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288932#M22403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, it’s not. I’m trying to clean the ‘in_memory’ workspace after each loop to be sure there is no memory issues. Actually, that command is not necessary, because the temporary result from SetNull is deleted automatically after be saved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 13:00:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288932#M22403</guid>
      <dc:creator>AlfonsoYañez_Morillo</dc:creator>
      <dc:date>2017-06-26T13:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288933#M22404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This issue has appeared before and it has something to do with the issue of the raster saving not working as planned.&amp;nbsp; One report suggested using a physical folder location instead of in_memory... in their case, it worked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is worth a shot&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/thread/77918"&gt;https://community.esri.com/thread/77918&lt;/A&gt;&lt;/P&gt;&lt;P&gt;That error message is typically vague, so adding print/addmessage statements would be your only option along with check using 'exists' to see if the files are actually getting deleted or just quietly failing.&lt;/P&gt;&lt;P&gt;In any event, the current saving location isn't working for whatever reason, so trying something new might just work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 13:17:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288933#M22404</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-06-26T13:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288934#M22405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already did what that report says, placing the workspace in an alternative physical folder and then save it in the definitive one. After that I delete the temp file. It is the same, It fails after 1000 – 1500 rounds. The weird thing is that this script works fine in ArcGIS 10.3.1 with Windows 7 and not with ArcGIS 10.5 with Windows 10.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 15:13:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288934#M22405</guid>
      <dc:creator>AlfonsoYañez_Morillo</dc:creator>
      <dc:date>2017-06-26T15:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288935#M22406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will go back to my original comment, if the same code and same data works in a previous version and fails in 10.5, you should contact Esri Support.&amp;nbsp; At best, all someone here could do is provide a workaround, and any potential bug can't get fixed until it is logged.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 15:30:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288935#M22406</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-06-26T15:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288936#M22407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do what Joshua says... or do it in batches.&amp;nbsp; I suspect you would be done by now if you had batched it... but I would report it in any event&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 15:39:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288936#M22407</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-06-26T15:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288937#M22408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE&gt;&lt;TBODY data-addlink-disabled="false" data-canpost="true" data-cansee="false" data-comments-unavailable="false" data-remaining-comments-count="0"&gt;&lt;TR class=""&gt;&lt;TD class=""&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;TD class=""&gt;&lt;DIV class="" style="display: block;"&gt;&lt;SPAN class=""&gt;I checked the script using .tif rasters in stead of .gif as originals and the script worked fine. I also used the gifs but CopyRaster_management in stead of SetNull and it worked too. Apparently, it is something related with the GIF format and processes that generate intermediate results&lt;/SPAN&gt;. I'll sent a report to Esri.&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 16:48:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288937#M22408</guid>
      <dc:creator>AlfonsoYañez_Morillo</dc:creator>
      <dc:date>2017-06-26T16:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: SetNull() fails after a number of loops</title>
      <link>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288938#M22409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;10.5 is now using .tifs for temporary data. Your issue may be related to that. Definitely report to Esri!&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/get-started/introduction/whats-new-in-arcgis.htm#ESRI_SECTION1_C1F40A5EB59B4406B2858BFA09954A35" title="http://desktop.arcgis.com/en/arcmap/latest/get-started/introduction/whats-new-in-arcgis.htm#ESRI_SECTION1_C1F40A5EB59B4406B2858BFA09954A35" rel="nofollow noopener noreferrer" target="_blank"&gt;What's new in ArcMap—ArcGIS Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note - it is not good practice to set arcpy.env.workspace to in_memory. &amp;nbsp;This is because&amp;nbsp;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/the-in-memory-workspace.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;as the help warns&lt;/A&gt; you really don't want to fill up in_memory, which would be very easy to do if everything default is written there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am doing heavy map algebra, to make temp raster handling efficient, I set the workspace and scratch to the same writable system folder -- for example:&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;from&lt;/SPAN&gt; arcpy &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; env
env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scratchFolder
env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scratchWorkspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are having issues with the map algebra and&amp;nbsp;temporary rasters, you can do a direct run of raster tools&amp;nbsp;(bypassing map algebra) like this. If you are running through 5000 rasters this may be more efficient, bypassing saving a temp raster in .tif format:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; gif &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; gifs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SetNull_sa&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gif&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; gif&lt;SPAN class="punctuation 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;destination&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; gif&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"VALUE = 0"&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;To get usage on how to run the tool directly (not always obvious)&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Usage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"SetNull_sa"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'SetNull_sa(in_conditional_raster, in_false_raster_or_constant, out_raster, {where_clause})'&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/curtvprice/blog/2017/03/03/temporary-rasters-in-arcpy?sr=search&amp;amp;searchId=3b056986-622d-4dde-93c6-be82414a196a&amp;amp;searchIndex=0" target="_blank"&gt;https://community.esri.com/people/curtvprice/blog/2017/03/03/temporary-rasters-in-arcpy?sr=search&amp;amp;searchId=3b056986-622d-4dde-93c6-be82414a196a&amp;amp;searchIndex=0&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:57:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setnull-fails-after-a-number-of-loops/m-p/288938#M22409</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T13:57:39Z</dc:date>
    </item>
  </channel>
</rss>

