Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Arcgis online sign in box prevents from publishing service using ArcPy

$
0
0
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.

Code:

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)

Attachment 34171
Attached Thumbnails
Click image for larger version

Name:	signin.png‎
Views:	N/A
Size:	14.8 KB
ID:	34171  

Viewing all articles
Browse latest Browse all 2485

Trending Articles