<?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: Custom script not accepting lists as input features in ArcGIS Notebooks in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1465766#M83227</link>
    <description>&lt;P&gt;Hi Richard,&lt;BR /&gt;&lt;BR /&gt;Sorry, there was a mistake in the tool params, here is the corrected version -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FBM_TOOL_PARAMS.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104037iB7444468A2D2E28E/image-size/large?v=v2&amp;amp;px=999" role="button" title="FBM_TOOL_PARAMS.png" alt="FBM_TOOL_PARAMS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see I want Input features and Vegetation_Type to be fixed. Everything else is inputted as a list and buffer/outField is the output (which should produce multiple fields). I changed this yet I continued to get the same error message -&lt;/P&gt;&lt;LI-CODE lang="python"&gt;RuntimeError                              Traceback (most recent call last)
In  [29]:
Line 1:     arcpy.FBCalc_firebreak('SusBui_Point_CopyFeatures', 'SusBui_Point_VEGCODE', Classfields , SlopeTfields, SlopeVfields, FRDfields, 'outfield')

File C:\Users\Kedaravindan Bhaskar\Documents\ArcGIS\Projects\FBM_research\FBTool\firebreak.tbx, in FBCalc:
Line 40:        return

File C:\Users\Kedaravindan Bhaskar\Documents\ArcGIS\Projects\FBM_research\FBTool\firebreak.tbx, in FBCalc:
Line 37:        """Modify the values and properties of parameters before internal

File C:\Users\Kedaravindan Bhaskar\AppData\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py, in &amp;lt;lambda&amp;gt;:
Line 520:   return lambda *args: val(*gp_fixargs(args, True))

RuntimeError: Object: Error in executing tool&lt;/LI-CODE&gt;&lt;P&gt;Here is the code - (note that I also tried this code after changing buffer to a single field output in the tool parameters, but still, the same error message appears)&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.FBCalc_firebreak('SusBui_Point_CopyFeatures', 'SusBui_Point_VEGCODE', Classfields , SlopeTfields, SlopeVfields, FRDfields, 'outfield')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Hope this can clarify my issue. Thank you so much.&lt;BR /&gt;&lt;BR /&gt;Warm regards, Kedar&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2024 10:06:57 GMT</pubDate>
    <dc:creator>kedarbhaskar12</dc:creator>
    <dc:date>2024-05-14T10:06:57Z</dc:date>
    <item>
      <title>Custom script not accepting lists as input features in ArcGIS Notebooks</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1418567#M82707</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I created a custom script which I also converted into a GP tool within ArcGIS pro. When I try to feed lists into this tool as input parameters in ArcGIS Notebooks it fails and provides generic error messages. The same tool works in Notebooks if I am to use a single field rather than a field list.&lt;BR /&gt;&lt;BR /&gt;Here is my code -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;toolbox = "C:\\Users\\Kedaravindan Bhaskar\\Documents\\ArcGIS\\Projects\\FBM_research\\FBTool\\firebreak.tbx"
arcpy.ImportToolbox(toolbox, "firebreak") 

arcpy.FBCalc_firebreak('SusBui_Point_CopyFeatures', 'SusBui_Point_VEGCODE', 'DirNWL_Class_DirNWL', 'PT1_P_DirNWL_Slope_Type', 'PT1_P_DirNWL_Slope', 'DirNWL_FRD_DirNWL', 'buffer') # Here the tool runs successfuly

import arcpy

# Use arcpy.ListFields() to list fields in a feature class
Classfields = arcpy.ListFields('SusBui_Point_CopyFeatures', '*Class*', 'TEXT')

# Iterate over the fields and print their names
for field in Classfields:
    print(field.name)

# Use arcpy.ListFields() to list fields in a feature class
SlopeVfields = arcpy.ListFields('SusBui_Point_CopyFeatures', '*Slope', 'FLOAT')

# Iterate over the fields and print their names
for field in SlopeVfields:
    print(field.name)

# Use arcpy.ListFields() to list fields in a feature class
SlopeTfields = arcpy.ListFields('SusBui_Point_CopyFeatures', '*Slope_Type', 'TEXT')

# Iterate over the fields and print their names
for field in SlopeTfields:
    print(field.name)

import arcpy

# Use arcpy.ListFields() to list fields in a feature class containing 'frd'
FRDfields = arcpy.ListFields('SusBui_Point_CopyFeatures', '*FRD*')

# Iterate over the fields and print their names
for field in FRDfields:
    print(field.name)

arcpy.FBCalc_firebreak('SusBui_Point_CopyFeatures', 'SusBui_Point_VEGCODE', Classfields , SlopeTfields, SlopeVfields, FRDfields, 'buffer')

#### ERROR MESSAGE
RuntimeError                              Traceback (most recent call last)
In  [26]:
Line 1:     arcpy.FBCalc_firebreak('SusBui_Point_CopyFeatures', 'SusBui_Point_VEGCODE', Classfields , SlopeTfields, SlopeVfields, FRDfields, 'buffer')

File C:\Users\Kedaravindan Bhaskar\Documents\ArcGIS\Projects\FBM_research\FBTool\firebreak.tbx, in FBCalc:
Line 38:        validation is performed.  This method is called whenever a parameter

File C:\Users\Kedaravindan Bhaskar\Documents\ArcGIS\Projects\FBM_research\FBTool\firebreak.tbx, in FBCalc:
Line 35:    

File C:\Users\Kedaravindan Bhaskar\AppData\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py, in &amp;lt;lambda&amp;gt;:
Line 520:   return lambda *args: val(*gp_fixargs(args, True))

RuntimeError: Object: Error in executing tool&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nothing seems awry with the field names and types that are inputted into the tool so I am struggling to understand why this is happening. The error message is also quite generic.&lt;BR /&gt;&lt;BR /&gt;I will also edit the 'buffer' (which is an output param) to do some form of inline variable substitution so multiple fields are populated but that shouldn't cause the issue at hand IMO.&lt;BR /&gt;&lt;BR /&gt;My only thought is maybe I need to edit the script to accept lists??&lt;BR /&gt;&lt;BR /&gt;Any idea what might be going wrong? Your help would be greatly appreciated : )&lt;BR /&gt;&lt;BR /&gt;Please let me know if there is anything else I can do&lt;BR /&gt;&lt;BR /&gt;Warm regards, Kedar&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 07:36:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1418567#M82707</guid>
      <dc:creator>kedarbhaskar12</dc:creator>
      <dc:date>2024-05-03T07:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom script not accepting lists as input features in ArcGIS Notebooks</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1418571#M82710</link>
      <description>&lt;P&gt;Kedar,&lt;BR /&gt;&lt;BR /&gt;Is your custom GP tool set up to accept multi-value entries for the fields parameter. If it's only expecting a single entry of type "field" and you provide it with a list then it's going to get confused.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 08:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1418571#M82710</guid>
      <dc:creator>RichardHowe</dc:creator>
      <dc:date>2024-05-03T08:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom script not accepting lists as input features in ArcGIS Notebooks</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1418580#M82712</link>
      <description>&lt;P&gt;Hi Richard,&lt;BR /&gt;&lt;BR /&gt;Thanks for your response. No I hadn't done this initially but now I have by navigating to the tool &amp;gt; properties &amp;gt; parameters &amp;gt; data type &amp;gt; then checking the multiple values box (see attached photo at the end), but still the same error message is produced. I did this only for the parameters where I would feed in multi-values.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;RuntimeError                              Traceback (most recent call last)
In  [62]:
Line 1:     arcpy.FBCalc_firebreak('SusBui_Point_CopyFeatures', 'SusBui_Point_VEGCODE', Classfields , SlopeTfields, SlopeVfields, FRDfields, 'buffer')

File C:\Users\Kedaravindan Bhaskar\Documents\ArcGIS\Projects\FBM_research\FBTool\firebreak.tbx, in FBCalc:
Line 38:        validation is performed.  This method is called whenever a parameter

File C:\Users\Kedaravindan Bhaskar\Documents\ArcGIS\Projects\FBM_research\FBTool\firebreak.tbx, in FBCalc:
Line 35:    

File C:\Users\Kedaravindan Bhaskar\AppData\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py, in &amp;lt;lambda&amp;gt;:
Line 520:   return lambda *args: val(*gp_fixargs(args, True))

RuntimeError: Object: Error in executing tool&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Do I need to edit something within the script itself? Or am I missing something else?&lt;BR /&gt;&lt;BR /&gt;Warm regards, Kedar&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FBM_TOOL_PARAMS.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102970i7CAC15CF41F891A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="FBM_TOOL_PARAMS.png" alt="FBM_TOOL_PARAMS.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 09:50:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1418580#M82712</guid>
      <dc:creator>kedarbhaskar12</dc:creator>
      <dc:date>2024-05-03T09:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Custom script not accepting lists as input features in ArcGIS Notebooks</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1419754#M82874</link>
      <description>&lt;P&gt;So inputs 2,3,4 and 5 are all setup to accept multiple values now? Because even if you know your listFields action on your script will only return a single field, you are still returning it as a list so the input to the next step will need to be for multiple values.&lt;BR /&gt;&lt;BR /&gt;I think input 6 should not accept multiple values as you're only inputting 'buffer' so unless that is a list object rather than just a field name then that should just be a normal field input.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 06:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1419754#M82874</guid>
      <dc:creator>RichardHowe</dc:creator>
      <dc:date>2024-05-07T06:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Custom script not accepting lists as input features in ArcGIS Notebooks</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1465766#M83227</link>
      <description>&lt;P&gt;Hi Richard,&lt;BR /&gt;&lt;BR /&gt;Sorry, there was a mistake in the tool params, here is the corrected version -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FBM_TOOL_PARAMS.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104037iB7444468A2D2E28E/image-size/large?v=v2&amp;amp;px=999" role="button" title="FBM_TOOL_PARAMS.png" alt="FBM_TOOL_PARAMS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see I want Input features and Vegetation_Type to be fixed. Everything else is inputted as a list and buffer/outField is the output (which should produce multiple fields). I changed this yet I continued to get the same error message -&lt;/P&gt;&lt;LI-CODE lang="python"&gt;RuntimeError                              Traceback (most recent call last)
In  [29]:
Line 1:     arcpy.FBCalc_firebreak('SusBui_Point_CopyFeatures', 'SusBui_Point_VEGCODE', Classfields , SlopeTfields, SlopeVfields, FRDfields, 'outfield')

File C:\Users\Kedaravindan Bhaskar\Documents\ArcGIS\Projects\FBM_research\FBTool\firebreak.tbx, in FBCalc:
Line 40:        return

File C:\Users\Kedaravindan Bhaskar\Documents\ArcGIS\Projects\FBM_research\FBTool\firebreak.tbx, in FBCalc:
Line 37:        """Modify the values and properties of parameters before internal

File C:\Users\Kedaravindan Bhaskar\AppData\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py, in &amp;lt;lambda&amp;gt;:
Line 520:   return lambda *args: val(*gp_fixargs(args, True))

RuntimeError: Object: Error in executing tool&lt;/LI-CODE&gt;&lt;P&gt;Here is the code - (note that I also tried this code after changing buffer to a single field output in the tool parameters, but still, the same error message appears)&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.FBCalc_firebreak('SusBui_Point_CopyFeatures', 'SusBui_Point_VEGCODE', Classfields , SlopeTfields, SlopeVfields, FRDfields, 'outfield')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Hope this can clarify my issue. Thank you so much.&lt;BR /&gt;&lt;BR /&gt;Warm regards, Kedar&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 10:06:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1465766#M83227</guid>
      <dc:creator>kedarbhaskar12</dc:creator>
      <dc:date>2024-05-14T10:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Custom script not accepting lists as input features in ArcGIS Notebooks</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1473669#M83354</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm still not able to get the tool working with lists. Any update would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Warm regards, Kedar&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 10:02:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1473669#M83354</guid>
      <dc:creator>kedarbhaskar12</dc:creator>
      <dc:date>2024-05-16T10:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom script not accepting lists as input features in ArcGIS Notebooks</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1474380#M83425</link>
      <description>&lt;P&gt;Kedar,&lt;BR /&gt;&lt;BR /&gt;Short of playing with the actual tool and script I'm not sure I can debug it much further. If you're willing to share it and a data sample I can have a look&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 08:07:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1474380#M83425</guid>
      <dc:creator>RichardHowe</dc:creator>
      <dc:date>2024-05-17T08:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom script not accepting lists as input features in ArcGIS Notebooks</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1479972#M83906</link>
      <description>&lt;P&gt;Hi Richard,&lt;BR /&gt;&lt;BR /&gt;Thank you for your response and sorry that I am late in responding.&lt;BR /&gt;&lt;BR /&gt;Unfortunately we plan to publish this project so I can't share the data. Thank you so much for your help till now. I will post the solution when we figure it out.&lt;BR /&gt;&lt;BR /&gt;Regards, Kedar&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 06:09:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-script-not-accepting-lists-as-input/m-p/1479972#M83906</guid>
      <dc:creator>kedarbhaskar12</dc:creator>
      <dc:date>2024-05-29T06:09:37Z</dc:date>
    </item>
  </channel>
</rss>

