I have created 2 geometric trace models for a project, one to pick a spot on the network and run an isolation, and the other to choose from a list of buildings, then then run a trace to find features to isolate that building. Both models use a python script at the end to combine all outputs from multiple group layers into one out feature class for each participating feature class in the network. Also, both models reference the same MXD file in order to used some arcpy.mapping functions.
I published the network iso model on the server and it runs just fine with no errors both on ArcMap and the WebApp I made on ArcGIS online. When i publish the building iso model, it fails with a "invalid MXD Filename" error. The whole output can be seen below.
Both models uses the exact same script, yet it only fails on the building iso model and not the network iso model. I even tried saving a copy of the MXD as a different name, but still received the same error. the part of the script that is failing can be seen below.
The filepath does not have any special characters in it, and again, works just fine in the other model. Has anyone ran into this problem before? I have been looking around blogs and ESRI resource sites but haven't found anything to help. One odd thing i did notice is that the line the log reports the error occurring on is not the same line number as it is in the original script, but i'm not sure if that means anything.
@KHibma provided help. I found out the script is not copying the MXD file to the server, even though it say it is when publishing. Also, it does not seem to be setting the variables correctly on the server. in the picture below, the script on the left is the network iso, and the right is the building iso.
Why isn't the publishing tools correctly formatting the script from the building iso model?
All the parameters are set the same as in the network iso model.