cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
544
Views
0
Helpful
0
Replies

AXL application using python and connect to CUCM

eliegerges
Level 1
Level 1

devDears,

 

I am hitting this error when trying to run a python script and connect to CUCM to add a phone, a line and an end user :

 

$ python axlzeep.py


Traceback (most recent call last):
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line Developer General Discussions156, in _new_conn
conn = connection.create_connection(
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 994, in _validate_conn
conn.connect()
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 300, in connect
conn = self._new_conn()
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 168, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x00000141AF4504C0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='none', port=8443): Max retries exceeded with url: /axl/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000141AF4504C0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "axlzeep.py", line 113, in <module>
line_resp = service.addLine(**line_data)
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\zeep\proxy.py", line 40, in __call__
return self._proxy._binding.send(
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\zeep\wsdl\bindings\soap.py", line 122, in send
response = client.transport.post_xml(options["address"], envelope, http_headers)
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\zeep\transports.py", line 95, in post_xml
return self.post(address, message, headers)
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\zeep\transports.py", line 61, in post
response = self.session.post(
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 578, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "C:\Users\elie.gerges\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='none', port=8443): Max retries exceeded with url: /axl/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000141AF4504C0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

 

 

I uploaded the python script (axlzeep.py)

 

Thank you,

Elie

0 Replies 0