问题:提示ConnectionError: HTTPConnectionPool(host='.....', port=8080): Max retries exceeded with url

开发的时候遇到这个问题,是由于本机没有连接到远程的服务器,所以会提示:最大限度的尝试去连接url,但是失败了

具体报错内容:

  File "E:\python2.7\lib\site-packages\requests\api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "E:\python2.7\lib\site-packages\requests\sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "E:\python2.7\lib\site-packages\requests\sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "E:\python2.7\lib\site-packages\requests\adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='xxxxxxxxx', port=8080): Max retries exceeded with url: /activeInterface?grpid=539614&code=401¶mters=%5B%7Bids%3A%5B87107586%2C+87107587%2C+87107588%5D%2C+count%3A3%2C+cid%3A1%7D%5D (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 10060] ',))

报错的位置如下:

这个时候就把代码反到远程服务器上去运行就ok啦

你可能感兴趣的:(python项目开发)