<?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: Script tool works in folder but not in P.Geodatabase in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/script-tool-works-in-folder-but-not-in-p/m-p/29809#M2319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For God it worked. How did you know that with the File? What's the difference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Feb 2016 16:31:32 GMT</pubDate>
    <dc:creator>KONPETROV</dc:creator>
    <dc:date>2016-02-01T16:31:32Z</dc:date>
    <item>
      <title>Script tool works in folder but not in P.Geodatabase</title>
      <link>https://community.esri.com/t5/python-questions/script-tool-works-in-folder-but-not-in-p/m-p/29807#M2317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello I have written a script that runs excellent at a folder but when I try it at a Geodatabase it crashes, due to the reason that it has to run a reclassification of two classes my values are 0 and 1 I checked it, and it keeps showing me a message &lt;STRONG&gt;ERROR 045037. Raster has values outside range [0;1]&lt;/STRONG&gt; . Why is that happening?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code for reclass&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# This function takes the maximum and minimum value of DEM
demMAXResult = arcpy.GetRasterProperties_management(demodel, "MAXIMUM")
demMINResult = arcpy.GetRasterProperties_management(demodel, "MINIMUM")
demMAX = demMAXResult.getOutput(0)
demMIN = demMINResult.getOutput(0)
LIMIT = float(demMAX) - height



outReclass = Reclassify(demodel, "Value", RemapRange([[float(demMIN),LIMIT,0],[LIMIT,demMAX,1]]), "NODATA")
outReclass.save(os.path.join(env.workspace, "rcls"))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is the part of the code that crashes when uses the reclassified raster&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.CreateSpatiallyBalancedPoints_ga(os.path.join(env.workspace, "rcls"), 1, os.path.join(env.workspace, "point" + str(n)))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help? Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-tool-works-in-folder-but-not-in-p/m-p/29807#M2317</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2021-12-10T21:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Script tool works in folder but not in P.Geodatabase</title>
      <link>https://community.esri.com/t5/python-questions/script-tool-works-in-folder-but-not-in-p/m-p/29808#M2318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this runs excellent within a folder and not in a personal geodatabase, have you tried a file geodatabase? Is it possible that your geodatabase is locked (have you tried restarting your PC and trying again)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 15:42:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-tool-works-in-folder-but-not-in-p/m-p/29808#M2318</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2016-02-01T15:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Script tool works in folder but not in P.Geodatabase</title>
      <link>https://community.esri.com/t5/python-questions/script-tool-works-in-folder-but-not-in-p/m-p/29809#M2319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For God it worked. How did you know that with the File? What's the difference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 16:31:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-tool-works-in-folder-but-not-in-p/m-p/29809#M2319</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2016-02-01T16:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script tool works in folder but not in P.Geodatabase</title>
      <link>https://community.esri.com/t5/python-questions/script-tool-works-in-folder-but-not-in-p/m-p/29810#M2320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good question. I am sure there is an actual answer out there but I honestly do not know. I just know that it is usually better to use the file geodatabase versus the personal geodatabase these days. Just a good rule of thumb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am glad it is working for you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 16:44:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-tool-works-in-folder-but-not-in-p/m-p/29810#M2320</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2016-02-01T16:44:26Z</dc:date>
    </item>
  </channel>
</rss>

