Python Script Output Different than Model Builder

249
3
07-15-2019 02:07 PM
AdamBakiera
Occasional Contributor

I'm running into a very strange issue where some of my outputs are different depending on if I run the model builder or the script which was created from the model builder. When I run the model builder, everything is correct. However, we have a script set up to run nightly on a task scheduler, and 3 of the 5 outputs are not correct when the script runs. DCU's and Reclosers turn out correctly from the script but Capacitors, Regulators, and Switches somehow end up being a polygon output when they're supposed to be points. I've gone through the script to try and find the problem but I'm not sure why the output is a polygon and why this is only happening for some of the shapefiles. We are running arcgis desktop 10.5.1 and are on version 2.7 for Python. 

3 Replies
forestknutsen1
MVP Regular Contributor

Model builder is not exporting the script right? What about taking the python script and running it in an IDE, like pycharm or pyscripter? Then you could set breakpoints and see where things are going bad.

ChandraWaller
New Contributor II

We have been having this issue as well...any fixes?

0 Kudos
AdamBakiera
Occasional Contributor

The only 'fix' that worked was to re-write the script.

0 Kudos