informatica21

Arcgis online sign in box prevents from publishing service using ArcPy

Discussion created by informatica21 on May 28, 2014
Latest reply on Nov 5, 2014 by amarinelliesri-ca-esridist
I am publishing a local ArcGIS Server Map service using ArcPy script (script follows below) (running on that very server).
Every time I call arcpy.UploadServiceDefinition_server() arcgis online sign in dialog box pops up and execution is paused until I reject to sign in.
While acceptable in interactive mode, this totally prohibits running the script in unattended mode.
How can I disable the dialog and why does it pop up at all?

Server version 10.2.2, layers in the mxd have a registered connection to SQL geodatabase. Publishing from ArcMap works OK with no errors or warnings.

arcpy.mapping.CreateGISServerConnectionFile("PUBLISH_GIS_SERVICES",
                                            outDir,
                                            outName,
                                            serverUrl,
                                            "ARCGIS_SERVER",
                                            False,
                                            outDir,
                                            usr,
                                            pwd,
                                            "SAVE_USERNAME")

arcpy.mapping.CreateMapSDDraft(mapDoc, sddraft, service, 'ARCGIS_SERVER', outName, False, None, 'summary', 'tags')
arcpy.StageService_server(sddraft, sd)
arcpy.UploadServiceDefinition_server(sd, outName)


[ATTACH=CONFIG]34171[/ATTACH]

Attachments

Outcomes