<?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: error 000861: Destination field is not valid: in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-000861-destination-field-is-not-valid/m-p/592234#M46435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

gp.CostPath_sa("samp_lyr", cd_name, bl_name, "cost_path", "BEST_SINGLE", "#")

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:26:07 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2021-12-12T01:26:07Z</dc:date>
    <item>
      <title>error 000861: Destination field is not valid:</title>
      <link>https://community.esri.com/t5/python-questions/error-000861-destination-field-is-not-valid/m-p/592233#M46434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First I would like to highlight that&amp;nbsp; I´m an absolut newby with python. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I trying to use this already created python tool but keep on receiving this error message: error 000861: Destination field is not valid: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a nested code so would be difficult to put all the different variables but the specific part of the code that is giving this problem is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
gp.CostPath_sa("samp_lyr", cd_name, bl_name, "cost_path", "BEST_SINGLE", "")
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All the input variables are fine, the only error cames from the last one (destination field) wich it´s supposed to be an optional variable. That´s why the "", because is empty.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope can understand the post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 13:26:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000861-destination-field-is-not-valid/m-p/592233#M46434</guid>
      <dc:creator>JuanSerratosa_López</dc:creator>
      <dc:date>2014-04-10T13:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: error 000861: Destination field is not valid:</title>
      <link>https://community.esri.com/t5/python-questions/error-000861-destination-field-is-not-valid/m-p/592234#M46435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

gp.CostPath_sa("samp_lyr", cd_name, bl_name, "cost_path", "BEST_SINGLE", "#")

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:26:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000861-destination-field-is-not-valid/m-p/592234#M46435</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-12T01:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: error 000861: Destination field is not valid:</title>
      <link>https://community.esri.com/t5/python-questions/error-000861-destination-field-is-not-valid/m-p/592235#M46436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;alternatively you could just leave the optional field off.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

gp.CostPath_sa("samp_lyr", cd_name, bl_name, "cost_path", "BEST_SINGLE")

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if not ArcGIS help says&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;destination_field&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(Optional) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"The field used to obtain values for the destination locations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Input feature data must contain at least one valid field."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure your input variables have a valid field.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:26:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000861-destination-field-is-not-valid/m-p/592235#M46436</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2021-12-12T01:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: error 000861: Destination field is not valid:</title>
      <link>https://community.esri.com/t5/python-questions/error-000861-destination-field-is-not-valid/m-p/592236#M46437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ian and James for your answers, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally the problem was that if you use a feature class as an input destination (not a raster) the input field is not optional. So I had to create the field and write the name in the code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 12:17:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000861-destination-field-is-not-valid/m-p/592236#M46437</guid>
      <dc:creator>JuanSerratosa_López</dc:creator>
      <dc:date>2014-04-11T12:17:15Z</dc:date>
    </item>
  </channel>
</rss>

