<?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: Zonal Stats as Table ERROR 010024: Error during conversion. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/zonal-stats-as-table-error-010024-error-during/m-p/439022#M34457</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for those suggestions. I tried them and it looks like ArcServer properly accounts for both spaces and long file names. It also didn't matter what format then input rasters were in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, your suggestions got me thinking a bit more about file input/output and I realized that I was setting a scratch workspace to a directory that was being used as the scratch directory for ArcServer. There seems to be a lock of sorts that causes a conflict. Setting this to a generic location fixed the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrew&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jul 2011 02:20:11 GMT</pubDate>
    <dc:creator>AndrewBlakey1</dc:creator>
    <dc:date>2011-07-05T02:20:11Z</dc:date>
    <item>
      <title>Zonal Stats as Table ERROR 010024: Error during conversion.</title>
      <link>https://community.esri.com/t5/python-questions/zonal-stats-as-table-error-010024-error-during/m-p/439020#M34455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a small script that takes in a feature set and returns a table&amp;nbsp; via. Zonal Statistics as Table.&amp;nbsp; A raster that is hardcoded is used. If I create this in model builder it works fine, but in python it returns "ERROR 010024: Error during conversion"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I spent a few hours troubleshooting and can't identify why it wouldn't work properly.&amp;nbsp; The error refers to a conversion error, but I can't seem to see what is wrong.&amp;nbsp; The Zonal Stats as Table help says it accepts a Feature Layer but not a Feature Set, however a Feature Set seems to work just fine in the Model Builder implementation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

inputFS = arcpy.GetParameterAsText(0)
tableResult = arcpy.GetParameterAsText(1)

downtown_solar3pt5_Year = "D:\\TorontoData\\ArcServer Published Data\\Map Data\\Toronto Solar Main.gdb\\downtown_solar3pt5_Year"

arcpy.gp.ZonalStatisticsAsTable_sa(inputFS, "OBJECTID", downtown_solar3pt5_Year, tableResult, "DATA", "ALL")
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The inputFS (feature set) has a schema set in both the python and model implementations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or suggestions would be appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 22:44:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-stats-as-table-error-010024-error-during/m-p/439020#M34455</guid>
      <dc:creator>AndrewBlakey1</dc:creator>
      <dc:date>2011-06-30T22:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Stats as Table ERROR 010024: Error during conversion.</title>
      <link>https://community.esri.com/t5/python-questions/zonal-stats-as-table-error-010024-error-during/m-p/439021#M34456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Andrew;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A couple of things come to mind.&amp;nbsp; First, Spatial Analyst does not like spaces in directory path.&amp;nbsp; Second, the raster is stored in a geodatabase and if I am not mistaken, Spatial Analyst converts the raster in the geodatabase to an ESRI grid format before performing the operation, Since your file name exceeds 13 characters, this may be where the error comes up.&amp;nbsp; Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 23:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-stats-as-table-error-010024-error-during/m-p/439021#M34456</guid>
      <dc:creator>JeffLee</dc:creator>
      <dc:date>2011-06-30T23:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Stats as Table ERROR 010024: Error during conversion.</title>
      <link>https://community.esri.com/t5/python-questions/zonal-stats-as-table-error-010024-error-during/m-p/439022#M34457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for those suggestions. I tried them and it looks like ArcServer properly accounts for both spaces and long file names. It also didn't matter what format then input rasters were in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, your suggestions got me thinking a bit more about file input/output and I realized that I was setting a scratch workspace to a directory that was being used as the scratch directory for ArcServer. There seems to be a lock of sorts that causes a conflict. Setting this to a generic location fixed the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrew&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 02:20:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-stats-as-table-error-010024-error-during/m-p/439022#M34457</guid>
      <dc:creator>AndrewBlakey1</dc:creator>
      <dc:date>2011-07-05T02:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Stats as Table ERROR 010024: Error during conversion.</title>
      <link>https://community.esri.com/t5/python-questions/zonal-stats-as-table-error-010024-error-during/m-p/439023#M34458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same conversion error when iterating feature classes through zonal statistics as table on a raster layer.&amp;nbsp; After a long period of troubleshooting, I determined the fix was the processing extent of the model.&amp;nbsp; It successfully ran once I set the zonal stat as table tool processing extent to the same extent as the shapefile layer that defined the zones.&amp;nbsp; I hope this helps someone out there.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 19:27:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-stats-as-table-error-010024-error-during/m-p/439023#M34458</guid>
      <dc:creator>Cameronoaki</dc:creator>
      <dc:date>2014-07-22T19:27:29Z</dc:date>
    </item>
  </channel>
</rss>

