<?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 ExtractValuesToPoints - No current record error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/extractvaluestopoints-no-current-record-error/m-p/497756#M39097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Hi:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am working at putting a script together using Pythonwin that will work with input data contained in either shapefiles or a PGDb. Script is setup to output to either a folder or a PGb. I have everything working with shapefiles... now just debugging to get working with outputting to a PGDb. Script is getting hung up on ExtractValuesToPoints (runs fine on first instance of ExtractValuesToPoints, fails on second). Running ArcGIS 10.1, SP1, advanced license over Win7. I have imported arcpy.sa and have spatial analyst checked out... script checks license level: ArcInfo. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error generated through Pythonwin:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "&amp;lt;interactive input&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\sa\Functions.py", line 1311, in ExtractValuesToPoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_attributes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\sa\Utils.py", line 47, in swapper&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = wrapper(*args, **kwargs)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\sa\Functions.py", line 1304, in wrapper&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_attributes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 498, in &amp;lt;lambda&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return lambda *args: val(*gp_fixargs(args, True))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No current record.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (ExtractValuesToPoints).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Details of success/failure in script:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Runs fine on the first instance of ExtractValuesToPoints - inputs: points from PGDb and ESRI raster in folder (floating point, 32-bit); output: PGDb&lt;/LI&gt;&lt;LI&gt;Error happens on the second instance of ExtractValuesToPoints - input: points from PGDb and IMAGINE Image in PGDb floating point, 32-bit); output: PGDb&lt;/LI&gt;&lt;LI&gt;ExtractValuesToPoints tool runs fine through ArcGIS Desktop using the using same input data and output container as described in step 2 From geoprocessing results window I copied run of ExtractValuesToPoints tool (described in bullet 3) as python snippet and ran through the script in Pythonwin - get same error&lt;OL&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Code for each instance below...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Notes:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;pthTemp is a PGDb&lt;/LI&gt;&lt;LI&gt;txtOutExt is dataset extension (".shp" for shapefile or blank if writing to fc in a PGDb)&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;First instance that runs fine:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14054324987307994" jivemacro_uid="_14054324987307994"&gt;
&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14054330681316175 jive_text_macro" jivemacro_uid="_14054330681316175"&gt;
&lt;P style="padding-left: 30px;"&gt;ExtractValuesToPoints(pthTemp + "\\paths_pours_nil" + txtOutExt, grdStrLnks, pthTemp + "\\paths_pours_nil2" + txtOutExt, "NONE", "VALUE_ONLY")&lt;/P&gt;


&lt;/PRE&gt;
&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Second instance that fails:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14054325451208112" jivemacro_uid="_14054325451208112"&gt;
&lt;P&gt;ExtractValuesToPoints(pthTemp + "\\pours_all" + txtOutExt, grdFacc1_0, pthTemp + "\\pours_all2" + txtOutExt, "NONE", "VALUE_ONLY")&lt;/P&gt;


&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Python snippet copied from ArcGIS desktop geoprocessing results window:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14054328315383896" jivemacro_uid="_14054328315383896"&gt;
&lt;P&gt;arcpy.gp.ExtractValuesToPoints_sa("pours_all","E:/a000/temp.mdb/facc1_0","E:/a000/temp.mdb/pours_all999","NONE","VALUE_ONLY")&lt;/P&gt;


&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Modified python snippet (removed ".gp") that fails in pythonwin&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14054328533876796 jive_text_macro" jivemacro_uid="_14054328533876796"&gt;
&lt;P&gt;arcpy.ExtractValuesToPoints_sa("pours_all","E:/a000/temp.mdb/facc1_0","E:/a000/temp.mdb/pours_all999","NONE","VALUE_ONLY")&lt;/P&gt;


&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't figure out why the ExtractValuesToPoints process will run in ArcGIS desktop, but not through Pythonwin when using the same data and outputting to the same container?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help will be much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 May 2014 17:18:00 GMT</pubDate>
    <dc:creator>DarrenMcCormick</dc:creator>
    <dc:date>2014-05-29T17:18:00Z</dc:date>
    <item>
      <title>ExtractValuesToPoints - No current record error</title>
      <link>https://community.esri.com/t5/python-questions/extractvaluestopoints-no-current-record-error/m-p/497756#M39097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Hi:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am working at putting a script together using Pythonwin that will work with input data contained in either shapefiles or a PGDb. Script is setup to output to either a folder or a PGb. I have everything working with shapefiles... now just debugging to get working with outputting to a PGDb. Script is getting hung up on ExtractValuesToPoints (runs fine on first instance of ExtractValuesToPoints, fails on second). Running ArcGIS 10.1, SP1, advanced license over Win7. I have imported arcpy.sa and have spatial analyst checked out... script checks license level: ArcInfo. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error generated through Pythonwin:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "&amp;lt;interactive input&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\sa\Functions.py", line 1311, in ExtractValuesToPoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_attributes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\sa\Utils.py", line 47, in swapper&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = wrapper(*args, **kwargs)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\sa\Functions.py", line 1304, in wrapper&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_attributes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 498, in &amp;lt;lambda&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return lambda *args: val(*gp_fixargs(args, True))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No current record.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (ExtractValuesToPoints).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Details of success/failure in script:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Runs fine on the first instance of ExtractValuesToPoints - inputs: points from PGDb and ESRI raster in folder (floating point, 32-bit); output: PGDb&lt;/LI&gt;&lt;LI&gt;Error happens on the second instance of ExtractValuesToPoints - input: points from PGDb and IMAGINE Image in PGDb floating point, 32-bit); output: PGDb&lt;/LI&gt;&lt;LI&gt;ExtractValuesToPoints tool runs fine through ArcGIS Desktop using the using same input data and output container as described in step 2 From geoprocessing results window I copied run of ExtractValuesToPoints tool (described in bullet 3) as python snippet and ran through the script in Pythonwin - get same error&lt;OL&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Code for each instance below...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Notes:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;pthTemp is a PGDb&lt;/LI&gt;&lt;LI&gt;txtOutExt is dataset extension (".shp" for shapefile or blank if writing to fc in a PGDb)&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;First instance that runs fine:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14054324987307994" jivemacro_uid="_14054324987307994"&gt;
&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14054330681316175 jive_text_macro" jivemacro_uid="_14054330681316175"&gt;
&lt;P style="padding-left: 30px;"&gt;ExtractValuesToPoints(pthTemp + "\\paths_pours_nil" + txtOutExt, grdStrLnks, pthTemp + "\\paths_pours_nil2" + txtOutExt, "NONE", "VALUE_ONLY")&lt;/P&gt;


&lt;/PRE&gt;
&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Second instance that fails:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14054325451208112" jivemacro_uid="_14054325451208112"&gt;
&lt;P&gt;ExtractValuesToPoints(pthTemp + "\\pours_all" + txtOutExt, grdFacc1_0, pthTemp + "\\pours_all2" + txtOutExt, "NONE", "VALUE_ONLY")&lt;/P&gt;


&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Python snippet copied from ArcGIS desktop geoprocessing results window:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14054328315383896" jivemacro_uid="_14054328315383896"&gt;
&lt;P&gt;arcpy.gp.ExtractValuesToPoints_sa("pours_all","E:/a000/temp.mdb/facc1_0","E:/a000/temp.mdb/pours_all999","NONE","VALUE_ONLY")&lt;/P&gt;


&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Modified python snippet (removed ".gp") that fails in pythonwin&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14054328533876796 jive_text_macro" jivemacro_uid="_14054328533876796"&gt;
&lt;P&gt;arcpy.ExtractValuesToPoints_sa("pours_all","E:/a000/temp.mdb/facc1_0","E:/a000/temp.mdb/pours_all999","NONE","VALUE_ONLY")&lt;/P&gt;


&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't figure out why the ExtractValuesToPoints process will run in ArcGIS desktop, but not through Pythonwin when using the same data and outputting to the same container?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help will be much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 17:18:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extractvaluestopoints-no-current-record-error/m-p/497756#M39097</guid>
      <dc:creator>DarrenMcCormick</dc:creator>
      <dc:date>2014-05-29T17:18:00Z</dc:date>
    </item>
  </channel>
</rss>

