Hi -
My GIS Server site (non Portal) has a lot of services and folders. I am trying to generate an output listing of the server because I am migrating to a new server. This inventory will help me figure out what I need to move to the new environment.
The script came from here: Example: Write properties of all services to a CSV file—ArcGIS Server | Documentation for ArcGIS Ent...
But when it is trying to write the output to CSV, I am getting the following error message:
line 373, in main
ln = str(jsonOBJ["serviceName"]) + "," + folder + "," + str(item["type"]) + "," + jsonOBJStatus['realTimeState'] + "," + str(jsonOBJ["minInstancesPerNode"]) + "," + str(jsonOBJ["maxInstancesPerNode"]) + "," + "NA" + "," + "NA" + "," + "NA" + "," + str(jsonOBJ["properties"]["maxRecordCount"]) + "," + str(jsonOBJ["clusterName"]) + "," + "NA" + "," + "NA" + "," + str(jsonOBJ["properties"]["outputDir"]) +"\n"
KeyError: 'maxRecordCount'
It looks to me like this error is from the Service Properties for MaxRecourds, defined under the service parameters, but I am not sure. I still working on it, but if anyone has any insight that would be great.
KeyError: 'maxRecordCount'
means there is something wrong with the dictionary key maxRecordCount ... do you have a value for it?
I ran the code as is, I didn't set anything.