Select to view content in your preferred language

Python / ArcMap 9.3.1: "Error in getting parameter as text"

1514
1
10-02-2010 07:48 AM
JPGlutting
Emerging Contributor
Hello All,

I am getting an error that I can't understand, when trying to run a Python script (my first with ArcMap).

<type 'exceptions.RuntimeError'>: Object: Error in getting parameter as text
Failed to execute (Boolean).

I can't find this error anywhere, Google returns no hits at all for "Error in getting parameter as text", which is somewhat disturbing, maybe it will now). The ESRI error page: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?topicname=tool_errors_and_warnings:576-600 has this "000580: Error getting parameter information". The solution is: "This error is only likely to occur in a custom tool. Please contact the tool's developer for more assistance."

That would be me.

I can run the tool perfectly fine by taking the arguments from the error message and running it from the command line (using a batch file), but I can't get the toolbox interface to execute a full set of parameters (it will execute some parameters - I have the tool set up so you can give it a configuration file instead of pointing and clicking, and that works, but it stops reading the parameters once it has the configuration file and output format).

I am sending a series of paths to raster files, and some arguments are multiple files (separated by semicolons). Still, the command line argument generated by

Has anyone seen this before? Is there a way around it? Any clues about what is causing it?

I might try using sys.argv, maybe that will give me more information...

Thanks for your help!
0 Kudos
1 Reply
JPGlutting
Emerging Contributor
As usual, the solution occurred to me right after I posted - this is from calling an index value with GetParameterAsText() beyond the length of the arguments. I have three tools calling the same script with different parameters.

Now on to other errors :-).

Cheers,
JP
0 Kudos