AnsweredAssumed Answered

Example Python script not working from ESRI site

Question asked by gisadminsfa on Feb 19, 2016
Latest reply on Feb 19, 2016 by Dan_Patterson

Example: Check a folder for stopped services—Documentation (10.3 and 10.3.1) | ArcGIS for Server

 

I wanted to test this Script, but I always get the following error after running:

 

Processed folder information successfully. Now processing services...

 

Traceback (most recent call last):

  File "C:\Users\gisadmin\Desktop\AGSAdmin_py\CheckStopped.py", line 164, in <module>

    sys.exit(main(sys.argv[1:]))

  File "C:\Users\gisadmin\Desktop\AGSAdmin_py\CheckStopped.py", line 83, in main

    httpConn.request("POST", statusURL, params, headers)

  File "D:\Python27\ArcGISx6410.3\lib\httplib.py", line 995, in request

    self._send_request(method, url, body, headers)

  File "D:\Python27\ArcGISx6410.3\lib\httplib.py", line 1029, in _send_request

    self.endheaders(body)

  File "D:\Python27\ArcGISx6410.3\lib\httplib.py", line 991, in endheaders

    self._send_output(message_body)

  File "D:\Python27\ArcGISx6410.3\lib\httplib.py", line 844, in _send_output

    self.send(msg)

  File "D:\Python27\ArcGISx6410.3\lib\httplib.py", line 820, in send

    self.sock.sendall(data)

  File "D:\Python27\ArcGISx6410.3\lib\socket.py", line 224, in meth

    return getattr(self._sock,name)(*args)

UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 71: ordinal not in range(128)

>>>

 

Other scripts have worked fine from the examples list - why doesn´t this one work?

 

Cheers,

 

Rob

Outcomes