Select to view content in your preferred language

Model Builder issue - Input table being changed to model variable

999
4
Jump to solution
02-15-2024 12:49 PM
JeffGardner_Safelite
Occasional Contributor

I'm fairly new to Model Builder, so hopefully this is an easy question for someone to answer.

Brief summary: I run a monthly process using data from a CSV file that is housed in my project folder. I update the data in my CSV file and save it, then open my project so it contains the latest data. In my model, the first step is to use the XY Table to Point tool on the CSV file, then I run some additional processes that aren't pertinent to the issue I'm having.

When I first build the model, it works fine. However, if I re-open the project and validate the model, I get error 000732 on the XY Table to Point tool saying that the file does not exist or is not supported. Instead of my original file as the Input Table, it's now showing that it is trying to access a Model Variable with that name. I don't understand why the model is changing my Input Table from what I originally set. I've got screenshots showing what I mean.

Thanks in advance for any help you can provide.

0 Kudos
1 Solution

Accepted Solutions
JeffGardner_Safelite
Occasional Contributor

Robert, my original response ended up not being correct. When I ran my model later on, it no longer worked and got the same error I was originally getting.

What I ended up doing was to ensure that the column headers in my CSV file did not have any spaces in them (for example, I changed "First Name" to FirstName"). That ended up working, and now I can run the model both in model builder and as a GP tool with no issues.

Jeff

View solution in original post

4 Replies
Robert_LeClair
Esri Notable Contributor

Question for you - when you run the model, are you running it inside MB or as a "GP tool" from the toolbox?  

0 Kudos
JeffGardner_Safelite
Occasional Contributor

In model builder.

0 Kudos
Robert_LeClair
Esri Notable Contributor

Okay, can you run the model outside of ModelBuilder as a GP tool and see if the error triggers?

0 Kudos
JeffGardner_Safelite
Occasional Contributor

Robert, my original response ended up not being correct. When I ran my model later on, it no longer worked and got the same error I was originally getting.

What I ended up doing was to ensure that the column headers in my CSV file did not have any spaces in them (for example, I changed "First Name" to FirstName"). That ended up working, and now I can run the model both in model builder and as a GP tool with no issues.

Jeff