<?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: ExtractByAttributes() breaks in PYT, even when copied from GP Pane? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/extractbyattributes-breaks-in-pyt-even-when-copied/m-p/1634005#M74502</link>
    <description>&lt;P&gt;&lt;STRIKE&gt;Update: It looks like the issue is when it's inside a SearchCursor.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Bizarre.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;I'll write up a support ticket and update this when I have more information.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;EDIT: Actually I was just looking at the wrong lines.&lt;/P&gt;&lt;P&gt;Sorry everyone.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jul 2025 19:30:18 GMT</pubDate>
    <dc:creator>AlfredBaldenweck</dc:creator>
    <dc:date>2025-07-17T19:30:18Z</dc:date>
    <item>
      <title>ExtractByAttributes() breaks in PYT, even when copied from GP Pane?</title>
      <link>https://community.esri.com/t5/python-questions/extractbyattributes-breaks-in-pyt-even-when-copied/m-p/1634002#M74501</link>
      <description>&lt;P&gt;I'm trying to use ExtractByAttributes() in a PYT.&lt;/P&gt;&lt;P&gt;I couldn't get it to work, so I tried the GP Pane. That worked fine. So, I copy-pasted the command from GP Pane into my PYT and it still failed.&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;with arcpy.EnvManager(scratchWorkspace=r"\\...\Default.gdb"):
    out_raster = arcpy.sa.ExtractByAttributes(
        in_raster=r"\\...\Default.gdb\SurfaceDEMClip_A",
        where_clause="VALUE &amp;lt;= 2007.11"
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Errors:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;ERROR 000864:&lt;SPAN class=""&gt; Input raster: The input is not within the defined domain.&lt;/SPAN&gt;ERROR 000969:&lt;SPAN class=""&gt; The input raster is not integer type.&lt;/SPAN&gt;ERROR 000864:&lt;SPAN class=""&gt; Field: The input is not within the defined domain.&lt;/SPAN&gt;ERROR 000889:&lt;SPAN class=""&gt; Invalid field type.
Failed to execute (RasterToPolygon).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Does anyone know what's going on or how to fix it? (Or an alternative?)&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2025 18:56:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extractbyattributes-breaks-in-pyt-even-when-copied/m-p/1634002#M74501</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2025-07-17T18:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: ExtractByAttributes() breaks in PYT, even when copied from GP Pane?</title>
      <link>https://community.esri.com/t5/python-questions/extractbyattributes-breaks-in-pyt-even-when-copied/m-p/1634005#M74502</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;Update: It looks like the issue is when it's inside a SearchCursor.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Bizarre.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;I'll write up a support ticket and update this when I have more information.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;EDIT: Actually I was just looking at the wrong lines.&lt;/P&gt;&lt;P&gt;Sorry everyone.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2025 19:30:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extractbyattributes-breaks-in-pyt-even-when-copied/m-p/1634005#M74502</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2025-07-17T19:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: ExtractByAttributes() breaks in PYT, even when copied from GP Pane?</title>
      <link>https://community.esri.com/t5/python-questions/extractbyattributes-breaks-in-pyt-even-when-copied/m-p/1634899#M74506</link>
      <description>&lt;P&gt;Did your issue have something to do with how the code was copied from the GP Pane?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 11:10:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extractbyattributes-breaks-in-pyt-even-when-copied/m-p/1634899#M74506</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2025-07-22T11:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: ExtractByAttributes() breaks in PYT, even when copied from GP Pane?</title>
      <link>https://community.esri.com/t5/python-questions/extractbyattributes-breaks-in-pyt-even-when-copied/m-p/1634954#M74508</link>
      <description>&lt;P&gt;Alas, it really was I just can't read. The issue was from a few lines down where I was trying to convert a float raster to polygon and I guess I didn't notice that my line numbers didn't match. And if I had been reading carefully, I would have noticed that it even said "Raster to Polygon" in that error message I shared.&lt;/P&gt;&lt;P&gt;Embarrassing lol.&lt;/P&gt;&lt;P&gt;This project is super annoying-- I just want a polygon from the raster, but the values are close enough that doing INT() on it gets me all the same values, and if I try multiplying to remove the significant digits, I can't get calculate statistics to work on the output, so Extract() fails. Huge mess.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ended up giving up and just stopping at the Extract() step because the polygons required human checking anyway.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 14:05:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extractbyattributes-breaks-in-pyt-even-when-copied/m-p/1634954#M74508</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2025-07-22T14:05:25Z</dc:date>
    </item>
  </channel>
</rss>

