<?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: Spatial Analyst's SegmentMeanShift tool fails in standalone script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483294#M37734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so now you have narrowed down to the pycharm environment... hmmmm&amp;nbsp;&lt;/P&gt;&lt;P&gt;you keep saying the 'script'&lt;/P&gt;&lt;P&gt;do you mean you did it the same way in the arcmap python window and compared it to doing it inside of pycharm s command line? &amp;nbsp;line by line regardless of the IDE should work whether it is arcmaps' ide, pythonwin, pycharm, spyder whatever. &amp;nbsp;If everything works on a line by line basis, then that is good. unfortunately back to you running your full script&lt;/P&gt;&lt;P&gt;so try your arcpy.gp.Segm.... in pycharm after import arcpy etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Oct 2016 17:06:11 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-10-27T17:06:11Z</dc:date>
    <item>
      <title>Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483291#M37731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ArcMap 10.4, I can run the SegmentMeanShift tool (&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/segment-mean-shift.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/segment-mean-shift.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Segment Mean Shift—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;) in the Python window, or from the ArcToolbox, just fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when trying to run a standalone script incorporating the tool, I receive the ever-useful "Unexpected Error."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the standalone tool template as provided in the link above. My Spatial Analyst licenses are valid. I am not using the optional band indexes parameter.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #808080;"&gt;# Import system modules
&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;import &lt;/SPAN&gt;arcpy
&lt;SPAN style="color: #000080; font-weight: bold;"&gt;from &lt;/SPAN&gt;arcpy.sa &lt;SPAN style="color: #000080; font-weight: bold;"&gt;import &lt;/SPAN&gt;*

&lt;SPAN style="color: #808080;"&gt;# Set local variables
&lt;/SPAN&gt;inRaster = &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;r"Path:\blah\blah\master.img"
&lt;/SPAN&gt;spectral_detail = &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;"15"
&lt;/SPAN&gt;spatial_detail = &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;"15"
&lt;/SPAN&gt;min_segment_size = &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;"10"
&lt;/SPAN&gt;&lt;SPAN style="color: #658aba; font-weight: bold;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;# Check out the ArcGIS Spatial Analyst extension license
&lt;/SPAN&gt;arcpy.CheckOutExtension(&lt;SPAN style="color: #658aba; font-weight: bold;"&gt;"Spatial"&lt;/SPAN&gt;)

&lt;SPAN style="color: #808080;"&gt;# Execute
&lt;/SPAN&gt;seg_raster = SegmentMeanShift(inRaster, spectral_detail, spatial_detail, min_segment_size)

&lt;SPAN style="color: #808080;"&gt;# Save the output
&lt;/SPAN&gt;seg_raster.save(&lt;SPAN style="color: #658aba; font-weight: bold;"&gt;r"Path:\blah\blah\seg_test.img"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;This is the error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\sa\Functions.py", line 7783, in SegmentMeanShift&lt;BR /&gt; band_indexes)&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\sa\Utils.py", line 53, in swapper&lt;BR /&gt; result = wrapper(*args, **kwargs)&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\sa\Functions.py", line 7776, in Wrapper&lt;BR /&gt; band_indexes)&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing\_base.py", line 506, in &amp;lt;lambda&amp;gt;&lt;BR /&gt; return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: ERROR 999998: Unexpected Error.&lt;BR /&gt;Failed to execute (SegmentMeanShift).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, it works fine within ArcMap. I should say I have gotten it to work in a standalone script before, with different spectral, spatial, and min_size parameters. If it's a problem with the inputs I don't know why it would work within ArcMap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:19:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483291#M37731</guid>
      <dc:creator>EvanBlaisdell</dc:creator>
      <dc:date>2021-12-11T21:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483292#M37732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do it within arcmap, what do the results look like in the Results window? &amp;nbsp;Export it as a python snippet from there for comparison. &amp;nbsp;The only obvious difference between your example and the help topic example is the 4th option isn't specified and you used raw formatting for the paths and they used foreward slashes. &amp;nbsp;I am assuming that Path:\blah\blah doesn't contain spaces or other evil characters in it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 20:23:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483292#M37732</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-18T20:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483293#M37733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The paths are fine, and the 4th parameter is optional, but just for giggles I tried specifying that parameter and experienced the same behavior.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how it looks in the Results window, after having run successfully within ArcMap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/252920_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It also works in the Python window within ArcMap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.gp.SegmentMeanShift_sa("D:/REDACTED/master.img", "D:/REDACTED/segments.img", "20", "15", "10", "1 2 3")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But not in a standalone script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt; File "C:\Program Files (x86)\JetBrains\PyCharm 2016.2.3\helpers\pydev\_pydevd_bundle\pydevd_exec.py", line 3, in Exec&lt;BR /&gt; exec exp in global_vars, local_vars&lt;BR /&gt; File "&amp;lt;input&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing\_base.py", line 506, in &amp;lt;lambda&amp;gt;&lt;BR /&gt; return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;ExecuteError: ERROR 999998: Unexpected Error.&lt;BR /&gt;Failed to execute (SegmentMeanShift).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried two different syntaxes in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #eeeeee; font-size: 9.0pt;"&gt;&lt;SPAN style="color: #808080;"&gt;segments = SegmentMeanShift(in_raster, 20.0, 15, 10, '1 2 3')&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #eeeeee; font-size: 9.0pt;"&gt;arcpy.gp.SegmentMeanShift_sa(in_raster, segments, 20.0, &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;15&lt;/SPAN&gt;, &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;10&lt;/SPAN&gt;, &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;"1 2 3"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 16:42:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483293#M37733</guid>
      <dc:creator>EvanBlaisdell</dc:creator>
      <dc:date>2016-10-27T16:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483294#M37734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so now you have narrowed down to the pycharm environment... hmmmm&amp;nbsp;&lt;/P&gt;&lt;P&gt;you keep saying the 'script'&lt;/P&gt;&lt;P&gt;do you mean you did it the same way in the arcmap python window and compared it to doing it inside of pycharm s command line? &amp;nbsp;line by line regardless of the IDE should work whether it is arcmaps' ide, pythonwin, pycharm, spyder whatever. &amp;nbsp;If everything works on a line by line basis, then that is good. unfortunately back to you running your full script&lt;/P&gt;&lt;P&gt;so try your arcpy.gp.Segm.... in pycharm after import arcpy etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 17:06:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483294#M37734</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-27T17:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483295#M37735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, new wrinkle. I adjusted the parameters and it works for some combinations but not others. It seems that spectral_detail is the culprit, with the tool failing for anything 18.0 or higher. The supposed maximum is 20.0. Of course, still, when I run it in ArcMap it works fine. Whether this is a problem with my particular data or a bug in the tool is a mystery to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 18:03:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483295#M37735</guid>
      <dc:creator>EvanBlaisdell</dc:creator>
      <dc:date>2016-10-27T18:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483296#M37736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That would require testing with a different set of data... but that is pretty well it, since I see nothing on the bug list&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://support.esri.com/Search-Results#search?q=SegmentMeanShift&amp;amp;content-type=Bugs" title="http://support.esri.com/Search-Results#search?q=SegmentMeanShift&amp;amp;content-type=Bugs"&gt;Esri Support Search-Results&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you remove the 'bug' filter... you get to see your post plus some help file topics and other posts&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://support.esri.com/Search-Results#search?q=SegmentMeanShift" title="http://support.esri.com/Search-Results#search?q=SegmentMeanShift"&gt;Esri Support Search-Results&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 18:25:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483296#M37736</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-27T18:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483297#M37737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Similar behavior with a different dataset, but the maximum functioning value of the spectral_detail parameter was a bit different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps more importantly, I tried my script on a machine that was still on 10.3, and it works fine. Same script on 10.4, no dice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 19:59:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483297#M37737</guid>
      <dc:creator>EvanBlaisdell</dc:creator>
      <dc:date>2016-10-27T19:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483298#M37738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then time to pass it up the food chain to tech support.. it could be a bug. &amp;nbsp;I don't imagine that there is a whole crowd using that tool in the world so it may have gone largely unnoticed, especially since you indicate it only fails in a standalone script and/or a non-arcmap python IDE. &amp;nbsp;Worth a shot... anyone can file a bug in Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 20:10:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483298#M37738</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-27T20:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483299#M37739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE style="color: #000000; background-color: #eeeeee; font-size: 9.0pt;"&gt;arcpy.gp.SegmentMeanShift_sa(in_raster,&lt;SPAN style="color: #658aba; font-weight: bold;"&gt;r"C:\test\seg_test.img"&lt;/SPAN&gt;, 20.0, &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;15&lt;/SPAN&gt;, &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;10&lt;/SPAN&gt;, &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;"1 2 3"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;Can you try this again?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 22:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483299#M37739</guid>
      <dc:creator>YiZou1</dc:creator>
      <dc:date>2016-10-27T22:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483301#M37741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it takes 5... at least in the newer software versions, check your version help if arcmap 10.6 and Pro 2.1 isn't being used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;SegmentMeanShift (in_raster, {spectral_detail}, {spatial_detail}, {min_segment_size}, {band_indexes})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/spatial-analyst/segment-mean-shift.htm"&gt;http://pro.arcgis.com/en/pro-app/tool-reference/spatial-analyst/segment-mean-shift.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;from the help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; line-height: 23.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; word-wrap: normal;"&gt;seg_raster = SegmentMeanShift(&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"c:/test/moncton.tif"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; line-height: 23.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; word-wrap: normal;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"15"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; line-height: 23.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; word-wrap: normal;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"10"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; line-height: 23.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; word-wrap: normal;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"20"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; line-height: 23.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; word-wrap: normal;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"4 3 2"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; line-height: 23.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; word-wrap: normal;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 21:34:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483301#M37741</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-01-17T21:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483302#M37742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes that's what the error says, it takes only 5 arguments. I had tried it since &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-userid="171221" data-username="YZou-esristaff" href="https://community.esri.com/people/YZou-esristaff"&gt;Yi Zou&lt;/A&gt; (ESRI employee?) &lt;/SPAN&gt;had suggested it. &lt;/P&gt;&lt;P&gt;Were you able to resolve your issue? I have problems running &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; line-height: 23.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; word-wrap: normal;"&gt;SegmentMeanShift &lt;/SPAN&gt;&lt;/SPAN&gt;within a python IDE as well.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; line-height: 23.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; word-wrap: normal;"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 21:59:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483302#M37742</guid>
      <dc:creator>NilsRatnaweera1</dc:creator>
      <dc:date>2018-01-17T21:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483303#M37743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am just a humble observer and I didn't have the problem, I am pointing out the current requirements... if the software was an older version or from a different package, the parameters might differ.&amp;nbsp; It is obvious in your case that Yi's solution doesn't apply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 23:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483303#M37743</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-01-17T23:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Analyst's SegmentMeanShift tool fails in standalone script</title>
      <link>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483300#M37740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm experiancing the same problem as described by &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-userid="3116" data-username="Dan_Patterson" href="https://community.esri.com/people/Dan_Patterson" target="_blank"&gt;Dan Patterso &lt;/A&gt;&lt;/SPAN&gt;but I can't solve it by reducing spectral detail.&lt;/P&gt;&lt;P&gt;Your suggestion&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.gp.SegmentMeanShift_sa(in_raster,&lt;SPAN style="color: #658aba; font-weight: bold;"&gt;r"C:\test\seg_test.img"&lt;/SPAN&gt;, 20.0, &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;15&lt;/SPAN&gt;, &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;10&lt;/SPAN&gt;, &lt;SPAN style="color: #658aba; font-weight: bold;"&gt;"1 2 3"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;returns this error:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Traceback &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;most recent call last&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"&amp;lt;input&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;module&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
TypeError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; SegmentMeanShift&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; takes at most &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; arguments &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt; given&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-analyst-s-segmentmeanshift-tool-fails-in/m-p/483300#M37740</guid>
      <dc:creator>NilsRatnaweera1</dc:creator>
      <dc:date>2021-12-11T21:19:24Z</dc:date>
    </item>
  </channel>
</rss>

