Model Builder Error 999999

647
7
10-13-2017 08:38 PM
RebeccaLeach
New Contributor III

I have to build a model for my class midterm which requires us to take a .csv file and convert it to a table, then take the table and create an XY event layer which will be used to create a new feature class.  From that new feature class, I am to break the trees into separate feature classes by tree species which will be placed into a feature dataset.  When I run the model as built with the first .csv file for Lake Shore Trees, it runs as it should and I get exactly what I was expecting.  The problem I keep running into is when I go to run the model again and this time change the allowable parameters for the next .csv file to be run, I keep getting "Error 999999" and the only other additional information is "failed to execute Feature Class to Feature Class."  When I look in my catalog tab, I see that the model has added only one feature to the feature NorthPark dataset, when there should be a total of three features in the dataset.  Now if I build a completely new model and use NorthPark as my initial input .csv file for the model, it runs as expected and all features are added to the dataset, but I get the same error again when I go and change the input parameters for the LakeShore .csv file.  Anyone have an explanation as to why this might be happening?

Model

Input Parameters

Model Error#

0 Kudos
7 Replies
DanPatterson_Retired
MVP Esteemed Contributor

It is a bit hard to figure out the required order of the parameters in the model and in the dialog... can you check and confirm whether the dialog is showing the parameters in the right order or not in this help topic

0 Kudos
RebeccaLeach
New Contributor III

I did go back in and correct the parameter order per your advice.  I'm still getting the same error code when I run the model and change the allowable parameters from the original LakeShorePark.csv file to the NorthPark.csv file.  It's odd to me, because if I build the exact same model and use the NorthPark.csv file as the original input file the model does exactly what it is supposed to do.  But like I said previously when I go to run that model again and put the LakeShorePark.csv file in as the new parameter, I get the same error code.

0 Kudos
JoeBorgione
MVP Esteemed Contributor

Seems like something might be up with the LakeShore.csv.  Take a look at how it's structured; are the fields defined as they should be?  Any missing delimeters?  Special characters or spaces in field names?

can't wait to retire....
0 Kudos
RebeccaLeach
New Contributor III

I checked both .csv files and they are both fine.  No issues found.  I just rebuilt the whole model from my school remote server to see if the issue was on my end, but I still get the same error code.  What I did notice this time and think may be the overall issue, is that the model is failing when it gets to the "Oak" and "Maple" tree feature classes.  I think from what I can understand is that is due to those two feature classes already existing in my NorthPark dataset.  Is there a way to work around that issue?  Perhaps I need to use an elif statement?

0 Kudos
curtvprice
MVP Esteemed Contributor

I think the issue is your field map. The field map is not getting auto-updated when you change the inputs. You may have better luck if you use the Copy Rows and Copy Features tools instead of Table to Table and Feature Class To Feature Class

RebeccaLeach
New Contributor III

Thanks Curtis!  Through another forum a user pointed out that the issue with my model was that I was trying to use the same name for a feature class in one dataset that already existed in another dataset within the same geodatabase.  Once I corrected that, then the model ran as expected.

curtvprice
MVP Esteemed Contributor

Ah, should have noticed that. Any time you try to do a system operation (like open a file for writing) and the system refuses because the pathname is funny or you are writing to your input, disk can't be written etc you are likely to get the nasty ERROR 999999.

0 Kudos