Running ArcGIS 10.4.1 Desktop and Server: We have map services in test, once vetted, we move to production. I had been using a script to change the datasources in the test MXD document from test to production databases. But I'd like to also automatically generate a Service Definition. I don't need to publish it to production, I just want to generate the Service Definition. I can generate the .sddraft file, but running the "StageService_server" tool seems to hang in a non specific error.
The error is: ExecuteError: ERROR 001272: Analyzer errors were encountered (codes = 7, 7). Failed to execute (StageService)
I verified that the MXD does not have any errors that would prevent a service definition from being generated in ArcMap. I'll handle the warnings and errors later, I'm just attempting to generate a Service Definition from a clean MXD right now. Any ideas?
I've attached the code I've got thus far.