What does the message "Item not found in this collection." mean?

3698
13
01-07-2019 06:24 AM
StephenTucker
New Contributor

A model provokes the message "Item not found in this collection." while running the Make Feature Layer tool. What does this message mean? What might be wrong?

0 Kudos
13 Replies
StephenTucker
New Contributor

Thanks for this, Martyn. The missing link was that I had not been introduced to the Geoprocessing - Results window. Now a question arises from this. I see that my Results window lists the outcomes of various runs of scripts and tools, but it doesn't show the outcomes of any runs that ended in failure. Am I right in thinking that the Results window only ever shows outcomes for runs that end successfully?

0 Kudos
MartynTattersall
New Contributor II

It should show all tool/script runs whether they succeeded or failed. Really useful thing to have open when testing scripts as when it fails it tells you the error code, a brief (sometimes unhelpful) description and which line to find it on in your script. Not sure why yours wouldn't show it but here is the documentation on it below.

http://desktop.arcgis.com/en/arcmap/10.3/analyze/executing-tools/using-the-results-window.htm

Martyn

0 Kudos
StephenTucker
New Contributor

Martyn,

Thanks again for this - I will check the link you sent in due course. In the meanwhile...

(a) I have exported the-model-whose-invokation-of-the-Make-Feature-Layer-tool-was-provoking-the-strange-message as a Python Script; (b) In the model that calls it, I then replaced the invokation of the model with an invokation of the exported Python script of the model; (c) I then ran the calling model.

The exported Python script version of the called model ran successfully.

Later in the same calling model, I invoke another submodel that in turn invokes the Make Feature Layer tool.

When the calling model made that invokation, the called model attempted to invoke the Make Feature Layer tool.

The attempt failed, provoking the same strange error message as I had received before.

Ideally, I'd like to get to the bottom of the strange message. Unfortunately, I don't have the time to do that.

Being pragmatic about all this, I will now be replacing all the models that call the Make Feature Layer tool with their Python script alternatives in the hope that this workaround continues to deliver satisfactory results and successful runs.

Now to reply to your last post.

The run log that my ArcMap produces when a Python script fails gives me all the information you describe.

Thanks again for your input.

0 Kudos
StephenTucker
New Contributor

Well, I'm eating some humble pie. I have rebooted my computer and rerun the top-level model of this system.

No error messages were provoked.

Sorry for wasting your time, one and all - your companionship and suggestions were appreciated and valuable to me in any event.

Stephen.

0 Kudos