<?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 Flow Path Parameters from 2D Line Python Error in Water Resources Questions</title>
    <link>https://community.esri.com/t5/water-resources-questions/flow-path-parameters-from-2d-line-python-error/m-p/401961#M1932</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to run a python script in PythonWin that first creates the longest flow path for subwatersheds then computes the flow path parameters from 2D line.&amp;nbsp; I keep getting a error of "Object reference not set to an instance of an object" for the Flow Path Parameters from 2D line part of the script.&amp;nbsp; Here is my code, wondering if I'm missing something?&amp;nbsp; I'm using ArcMap 10.1 and Feb. 2014 ArcHydro release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# Import arcpy module&lt;/EM&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;import ArcHydroTools&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;arcpy.CheckOutExtension("Spatial")&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# Local variables:&lt;/EM&gt;&lt;BR /&gt;ned10m = "L:\\srbcgis\\Projects\\Cumulative_Impacts\\Data\\Availability_Data\\ned10m"&lt;BR /&gt;Wshedtest = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\Wshedtest"&lt;BR /&gt;WshedtestPt = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\WshedtestPt"&lt;BR /&gt;Catchment = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\Catchment"&lt;BR /&gt;LFPCatchment = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\LFPCatchment"&lt;BR /&gt;fdrlake = "C:\\CWUAS\\Rasters\\CWUAS\\fdrlake"&lt;BR /&gt;LongestFlowPath = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\LongestFlowPath"&lt;BR /&gt;PTSLP_GP = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\PTSLP_GP"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# Process: Longest Flow Path for Subwatersheds&lt;/EM&gt;&lt;BR /&gt;ArcHydroTools.LongestFlowPathForSubwatersheds(Wshedtest, WshedtestPt, Catchment, LFPCatchment, fdrlake, LongestFlowPath)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# Process: Flow Path Parameters from 2D Line&lt;/EM&gt;&lt;BR /&gt;ArcHydroTools.FlowPathParametersFrom2DLine(LongestFlowPath, ned10m, PTSLP_GP)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2015 16:50:42 GMT</pubDate>
    <dc:creator>JeffreyZimmerman__Jr_</dc:creator>
    <dc:date>2015-02-09T16:50:42Z</dc:date>
    <item>
      <title>Flow Path Parameters from 2D Line Python Error</title>
      <link>https://community.esri.com/t5/water-resources-questions/flow-path-parameters-from-2d-line-python-error/m-p/401961#M1932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to run a python script in PythonWin that first creates the longest flow path for subwatersheds then computes the flow path parameters from 2D line.&amp;nbsp; I keep getting a error of "Object reference not set to an instance of an object" for the Flow Path Parameters from 2D line part of the script.&amp;nbsp; Here is my code, wondering if I'm missing something?&amp;nbsp; I'm using ArcMap 10.1 and Feb. 2014 ArcHydro release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# Import arcpy module&lt;/EM&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;import ArcHydroTools&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;arcpy.CheckOutExtension("Spatial")&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# Local variables:&lt;/EM&gt;&lt;BR /&gt;ned10m = "L:\\srbcgis\\Projects\\Cumulative_Impacts\\Data\\Availability_Data\\ned10m"&lt;BR /&gt;Wshedtest = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\Wshedtest"&lt;BR /&gt;WshedtestPt = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\WshedtestPt"&lt;BR /&gt;Catchment = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\Catchment"&lt;BR /&gt;LFPCatchment = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\LFPCatchment"&lt;BR /&gt;fdrlake = "C:\\CWUAS\\Rasters\\CWUAS\\fdrlake"&lt;BR /&gt;LongestFlowPath = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\LongestFlowPath"&lt;BR /&gt;PTSLP_GP = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\PTSLP_GP"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# Process: Longest Flow Path for Subwatersheds&lt;/EM&gt;&lt;BR /&gt;ArcHydroTools.LongestFlowPathForSubwatersheds(Wshedtest, WshedtestPt, Catchment, LFPCatchment, fdrlake, LongestFlowPath)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# Process: Flow Path Parameters from 2D Line&lt;/EM&gt;&lt;BR /&gt;ArcHydroTools.FlowPathParametersFrom2DLine(LongestFlowPath, ned10m, PTSLP_GP)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 16:50:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/water-resources-questions/flow-path-parameters-from-2d-line-python-error/m-p/401961#M1932</guid>
      <dc:creator>JeffreyZimmerman__Jr_</dc:creator>
      <dc:date>2015-02-09T16:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Flow Path Parameters from 2D Line Python Error</title>
      <link>https://community.esri.com/t5/water-resources-questions/flow-path-parameters-from-2d-line-python-error/m-p/401962#M1933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is typically a COM error (might be from your ArcHydro installation). Don't think the error is caused by your python script. Could you show the complete error anyhow?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you perform this manually, with the same data, does the error still occur?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 17:10:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/water-resources-questions/flow-path-parameters-from-2d-line-python-error/m-p/401962#M1933</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-02-09T17:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Flow Path Parameters from 2D Line Python Error</title>
      <link>https://community.esri.com/t5/water-resources-questions/flow-path-parameters-from-2d-line-python-error/m-p/401963#M1934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can run the tool in ArcMap with no problems.&amp;nbsp; I also created a ModelBuilder model first and ran it successfully.&amp;nbsp; I then exported it to a python script.&amp;nbsp; When I run it from PythonWin, I get the below error.&amp;nbsp; Seems like ArcMap has something running that the tool needs, but when taken out of the ArcMap world, it errors.&amp;nbsp; I am downloading the 1/22/2015 ArcHydroTools10.1x64 version now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the complete error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "C:\Python27\ArcGIS10.1\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec codeObject in __main__.__dict__&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "L:\srbcgis\Projects\Cumulative_Impacts\Data\Availability_Data\MNSLP_GP.py", line 35, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ArcHydroTools.FlowPathParametersFrom2DLine(LongestFlowPath, ned10m, PTSLP_GP)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "C:\Program Files (x86)\ESRI\WaterUtils\ArcHydro\bin\ArcHydroTools.py", line 6668, in FlowPathParametersFrom2DLine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/P&gt;&lt;P&gt;ExecuteError: Object reference not set to an instance of an object.&lt;/P&gt;&lt;P&gt;Failed to execute (FlowPathParametersFrom2DLine).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 17:20:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/water-resources-questions/flow-path-parameters-from-2d-line-python-error/m-p/401963#M1934</guid>
      <dc:creator>JeffreyZimmerman__Jr_</dc:creator>
      <dc:date>2015-02-09T17:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Flow Path Parameters from 2D Line Python Error</title>
      <link>https://community.esri.com/t5/water-resources-questions/flow-path-parameters-from-2d-line-python-error/m-p/401964#M1935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still getting the same error after installing the 1/22/2015 ArcHydro 10.1 release.&amp;nbsp; I also added the following code to the script, but it still gives the same error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcHydroTools.SetTargetLocations("HydroConfig", "Layers", "C:\\CWUAS\\Rasters\\CWUAS", "C:\\CWUAS\\cwuas_10m.gdb")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 17:38:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/water-resources-questions/flow-path-parameters-from-2d-line-python-error/m-p/401964#M1935</guid>
      <dc:creator>JeffreyZimmerman__Jr_</dc:creator>
      <dc:date>2015-02-09T17:38:22Z</dc:date>
    </item>
  </channel>
</rss>

