title: Python:Traceback (most recent call last):raise ConnectionError(e, request=request) requests.exceptions.ConnectionError:
body: <p>This is the script:</p>
  
  <pre><code>import pandas as pd
  from binance.client import Client
  from pandas import DataFrame as df
  import ta
  import time
  import math
  import urllib3
  import os, sys
  import datetime
  import requests
  import win32api
  import numpy as np
  
  startTime = datetime.datetime.now()
  request_delay = 200000
  
  
  #client = Client("","", {"verify": False, "timeout": 30000})
  
  
  
  
  gt = client.get_server_time()
  tt=time.gmtime(int((gt["serverTime"])/1000))
  win32api.SetSystemTime(tt[0],tt[1],0,tt[2],tt[3],tt[4],tt[5],0)
  
  
  urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  </code></pre>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connection.py", line 156, in _new_conn
        conn = connection.create_connection(
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\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\Administrator\AppData\Local\Programs\Python\Python38-32\lib\socket.py", line 918, in getaddrinfo
        for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
    socket.gaierror: [Errno 11001] getaddrinfo failed</p>
  </blockquote>
  
  <p>During handling of the above exception, another exception occurred:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 665, in urlopen
        httplib_response = self._make_request(
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 376, in _make_request
        self._validate_conn(conn)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 994, in _validate_conn
        conn.connect()
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connection.py", line 300, in connect
        conn = self._new_conn()
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connection.py", line 168, in _new_conn
        raise NewConnectionError(
    urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 11001] getaddrinfo failed</p>
  </blockquote>
  
  <p>During handling of the above exception, another exception occurred:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\adapters.py", line 439, in send
        resp = conn.urlopen(
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 719, in urlopen
        retries = retries.increment(
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\util\retry.py", line 436, in increment
        raise MaxRetryError(_pool, url, error or ResponseError(cause))
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /api/v1/ping (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))</p>
  </blockquote>
  
  <p>During handling of the above exception, another exception occurred:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "btc.py", line 21, in 
        client = Client("","")
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\binance\client.py", line 105, in <strong>init</strong>
        self.ping()
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\binance\client.py", line 393, in ping
        return self._get('ping')
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\binance\client.py", line 237, in _get
        return self._request_api('get', path, signed, version, **kwargs)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\binance\client.py", line 202, in _request_api
        return self._request(method, uri, signed, **kwargs)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\binance\client.py", line 196, in _request
        self.response = getattr(self.session, method)(uri, **kwargs)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 543, in get
        return self.request('GET', url, **kwargs)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 530, in request
        resp = self.send(prep, **send_kwargs)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 643, in send
        r = adapter.send(request, **kwargs)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\adapters.py", line 516, in send
        raise ConnectionError(e, request=request)
    requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /api/v1/ping (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))</p>
  </blockquote>
  
  <p>Is there any solution? Thank a lot</p>