Bug in arcgis.gis.server.ServerSee original GitHub issue
There appears to be a dodgy code that is error prone depending on how the Server class and publish_sd method is used.
If you initiate the Server class and proceed to publish_sd right away:
server = Server( url=args.server_url, username=args.ags_admin, password=args.ags_pass ) server.publish_sd(sd_file=args.sdfile)
Then in the publish_sd method there is an attempt to extract
catalog = self._catalog if 'System' not in catalog.folders:
None in this scenario, hence attempt to read
catalog.folder crashes the API.
As such i think there should be a call to
self.content which assures all is initiated as it should and prevents returning
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
I’ve gone through your workflow and tested it, and at the latest release I cannot reproduce this error.
Instead of accessing the Server directly, have you tried accessing it through the portal’s admin?
gis = GIS(mysite creds)
server = gis.admin.servers.list()
Same problem for me however achapkowski’s suggestion of acessing the server via
GIS.admin.servers.list resolved the issue