0

I am building a tool in ArcGIS Pro Modelbuilder (Pro version 2.2.1) that includes making a drop down list for user input based on the information contained in a domain of a feature class. The three steps are GetWorkspace, Domain to Table, and Choose Peril, as shown here:

portion of Modelbuilder tool showing Get Workspace, Domain to Table, and Choose Peril tools

GetWorkspace is a brief python script tool consisting of the following lines of code:

# Import system modules
import arcpy

# Set the parameters
InputFeatureClass = arcpy.GetParameterAsText(0)

# Get the full path of the feature class and extract the workspace
fullpath = arcpy.Describe(InputFeatureClass).path
workspace = fullpath.split(".sde")[0] + ".sde"

# set the output variable to be the workspace name
arcpy.SetParameter(1, workspace)

Domain to Table is a standard ArcPro tool, and Choose Peril is the example script described in this post on how to generate a choice list from a field. I have this same tool running elsewhere in the model with no issues, although in that location it does take a feature class instead of table for the table view input parameter.

When I run each step manually one at a time in Modelbuilder everything works perfectly, including all later steps in the model. However when I try to validate or run the entire model with none of the intermediary files created (which are created when I run the steps individually) I encounter an error saying that the table output in Domain to Table does not exist, even though it should exist once Domain to Table runs. The full error is as follows:

ERROR 032659 updateParameters Execution Error: Traceback (most recent call last):
  File "C:\Users\myname\Documents\ArcGIS\Projects\ProjectName\ProjectToolbox.tbx#ChoosePeril_CatEvents.UpdateParameters.py", line 4, in <module>
  File "C:\Users\myname\Documents\ArcGIS\Projects\ProjectName\ProjectToolbox.tbx#ChoosePeril_CatEvents.UpdateParameters.py", line 31, in updateParameters
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1798, in Frequency
    raise e
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1795, in Frequency
    retval = convertArcObjectToPythonObject(gp.Frequency_analysis(*gp_fixargs((in_table, out_table, frequency_fields, summary_fields), True)))
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 496, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Table: Dataset C:\Users\myname\Documents\ArcGIS\Projects\ProjectName\ProjectGDB.gdb\PerilTypes_DomainToTable does not exist or is not supportedFailed to execute (Frequency).

From what I can find online Error 032659 just means there's an issue that was found in the validation code, and that Error 000732 is more of the issue.

I've found a number of pages with potential answers to Error 000732, but so far none of them have solved my problem. Things I have tried include the following:

  1. Running Table To Table and Make Table View as intermediate steps between Domain to Table Choose Peril.
  2. Checking permissions to the write location by trying to write the table to both the default geodatabase and in_memory.
  3. A number of articles (ESRI technical article 10149, GIS SE 79718, GIS SE 209358, GIS SE 319053) recommend checking path names for poor use of spaces, special characters, and backslashes. My workspace name is a little weird, but I'm not sure how this could be the problem since I'm able to manually run this step successfully. The workspace in question is: "C:\Users\myname\Documents\ArcGIS\Projects\ProjectName\CR41459-PD.prodlb.company.net,41459(1).sde"
  4. And of course, the good old, try reloading the tool, try restarting ArcPro, and try restarting the computer.

Has anyone else encountered this kind of error before, or have any suggestions of next steps to try?

0

Without seeing the full model (if there are submodels, etc.), it is going to be a guess. I think there is a logical mistake here. If you want to show the dropdown before running the tool to set a parameter, they should all be resolved in the validation step, not in runtime. What I am trying to say is that, GetWorkspace and DomainToTable should be in the validation script not in the model.

Say, the user picks the feature class (first parameter) and a field in it (second parameter dependent to the first) and then the validation checks/processes these inputs (get workspace, find the domains, if exist, save them as a table, and then populate filter.list via a cursor, which is your third parameter >>> self.params[2] in the linked blog waiting user to pick a value, i.e., Choose Peril). Once all input parameters are in place, the model can run.

As far as I know (from ArcGIS Desktop), you cannot partially run a model, halt for user to input a parameter and the carry on running.

  • Thanks for the feedback, and I'll look into adjusting the validation script. The updateParameters() validation function takes care of updating the fields and value options after selecting a feature class, so this all happens as part of selecting initial input parameters, not as some intermediary step half way through. My issue is that for some reason the script does not recognize that the input table exists to start this process of selecting a field and a value. – ycartwhelen Aug 1 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.