Bug in arcgis.gis.server.Server
See original GitHub issueThere 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:
But self._catalog
is 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 None
“site-packages\arcgis\gis\server\admin\administration.py”
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
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?
example
GIS.admin.servers.list
resolved the issue