How do I get to the Server Object?

937
2
Jump to solution
01-17-2018 02:51 PM
GusMartinka
Occasional Contributor

I am using the Python API version 1.3 (I double checked) and get the following error when trying to create a Server object.

import arcgis
testServer = arcgis.gis.server.Server('myserverurl', username='myusername', password='safepassword')

AttributeError: module 'arcgis.gis' has no attribute 'server'

Is this not how you are supposed to use it?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
GusMartinka
Occasional Contributor

Not sure why my original didn't work but if I call it like below it works.

from arcgis import gis

testServer = gis.server.Server(args)

View solution in original post

2 Replies
GusMartinka
Occasional Contributor

Not sure why my original didn't work but if I call it like below it works.

from arcgis import gis

testServer = gis.server.Server(args)
ChrisMathers1
Occasional Contributor II

The only way I could get it to work is below and is infuriating to me. The docs for this module are pretty sub par in light of how much esri is pushing it.

from arcgis.gis import server

site = server.Server()