<?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: PointDensity Tool will not run in script in v10 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19396#M1483</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found it!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok I had to check the box in the tool "Run Python script in process" or it will not work.&amp;nbsp; I wanted the command window to show so the user could see error messages.&amp;nbsp; But I guess you can't do that.&amp;nbsp; Wow that took a long time to find.&amp;nbsp; I call this a BUG!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 May 2011 14:31:38 GMT</pubDate>
    <dc:creator>DougBrowning</dc:creator>
    <dc:date>2011-05-21T14:31:38Z</dc:date>
    <item>
      <title>PointDensity Tool will not run in script in v10</title>
      <link>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19391#M1478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So i am updating a python script i wrote in 9.3 to v10.&amp;nbsp; For some reason it keeps giving me a 582 error - which means the parameters are not valid.&amp;nbsp; The parameters did change a lot in v10 (why I do not know) including not taking the output raster name as a parameter (weird).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I made the appropriate changes with no luck.&amp;nbsp; I even took out ALL parameters but the two required ones and it still will not run.&amp;nbsp; I have tried everything.&amp;nbsp; It is not a extension problem as I tested that and it gives a different error.&amp;nbsp; i already tried _sa, etc with no luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here is the simplified call&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, sys, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy.sa import *&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Merge_management(fileList, mergeName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Check out ArcGIS Spatial Analyst extension license - need for v10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CheckOutExtension("Spatial")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "here1"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Run density tool with given params&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "here2"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myNbrCircle = NbrCircle(int(radiusSize), "MAP")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "here25"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tmpRast = PointDensity(mergeName, "NONE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "here3"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It prints here25 but not here3.&amp;nbsp; i know in other scripts it was an issue with having to use make feature layer first for some reason but I tried that with no luck.&amp;nbsp; I dont have that script to check the exact steps.&amp;nbsp; there is nothing in the help about feature layer versus feature class which was the issue before.&amp;nbsp; Esri sure likes the word feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated.&amp;nbsp; I just want get it to run simple then I will add in the new Nbr and such.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the 9.3 call that worked just fine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.PointDensity_sa(mergeName, "NONE", rasterName, int(cellSize), "Circle " + str(radiusSize) + " Map", "ACRES")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 18:22:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19391#M1478</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2011-05-13T18:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: PointDensity Tool will not run in script in v10</title>
      <link>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19392#M1479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tmpRast = gp.PointDensity_sa(mergeName, "NONE")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 May 2011 00:03:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19392#M1479</guid>
      <dc:creator>CathyWilford</dc:creator>
      <dc:date>2011-05-15T00:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: PointDensity Tool will not run in script in v10</title>
      <link>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19393#M1480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&amp;nbsp; The parameters did change a lot in v10 (why I do not know) including not taking the output raster name as a parameter (weird).&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The parameters have changed a lot to support the new map algebra approach which is fully integrated with Python. Once you get the hang of it I hope you find it is worth it. This is all well-discussed in the What's New in Spatial Analyst help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_s_new_in_ArcGIS_Spatial_Analyst/00qp0000001n000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_s_new_in_ArcGIS_Spatial_Analyst/00qp0000001n000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think your syntax issue may be because you are specifying a string (path) instead of the expected raster object. Here's how you convert your path into a raster object in the new pythonized Map Algebra:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tmpRast = PointDensity(Raster(mergeName), "NONE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 May 2011 18:54:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19393#M1480</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2011-05-15T18:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: PointDensity Tool will not run in script in v10</title>
      <link>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19394#M1481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The PointDensity tools takes a feature layer in not a raster - a raster is the output.&amp;nbsp; So not sure what you are saying here.&amp;nbsp; This same error came up with the join tool so i had to use a MakeFeatureLayer first then it worked.&amp;nbsp; But for PointDensity it did not work.&amp;nbsp; I have spent 8+ hours on this trying all kinds of paths, different test files, hardcoding everything, a geodatabase, you name it.&amp;nbsp; It just keeps giving the 582 data type error.&amp;nbsp; I dont know what it wants.&amp;nbsp; I can run it on the same files in arcmap using the point density tool directly but in script it dies on those exact same files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no idea what else to try.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 May 2011 13:31:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19394#M1481</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2011-05-21T13:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: PointDensity Tool will not run in script in v10</title>
      <link>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19395#M1482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok i just tried and i can run a simple script with PointDensity in PythonWin itself. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CheckOutExtension("Spatial")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "here25"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tmpRast = arcpy.sa.PointDensity("C:/temp/test2.shp","NONE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "here3"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I try to call this simple script from ArcMap in a toolbox it does not work.&amp;nbsp; So there is something wrong with using PointDensity in a script called from a toolbox I guess??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 May 2011 13:54:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19395#M1482</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2011-05-21T13:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: PointDensity Tool will not run in script in v10</title>
      <link>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19396#M1483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found it!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok I had to check the box in the tool "Run Python script in process" or it will not work.&amp;nbsp; I wanted the command window to show so the user could see error messages.&amp;nbsp; But I guess you can't do that.&amp;nbsp; Wow that took a long time to find.&amp;nbsp; I call this a BUG!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 May 2011 14:31:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19396#M1483</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2011-05-21T14:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: PointDensity Tool will not run in script in v10</title>
      <link>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19397#M1484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you ever report this as a bug?&amp;nbsp; I think I'm having similar issues, except I have to run the script out of process because I'm using Multiprocessing.&amp;nbsp; The tool crashes on Reclassify.&amp;nbsp; The statement works when I run it in process but not out of process.&amp;nbsp; I think it has something to do with the spatial analyst, raster objects, and temporary rasters. Have you learned anything else about this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 16:41:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointdensity-tool-will-not-run-in-script-in-v10/m-p/19397#M1484</guid>
      <dc:creator>NilsBabel</dc:creator>
      <dc:date>2012-10-23T16:41:02Z</dc:date>
    </item>
  </channel>
</rss>

