title: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5000): Max retries exceeded with url: /blockchain (Caused by NewConnect
body: <p><a href="https://i.stack.imgur.com/a4KbL.png" rel="nofollow noreferrer">enter image description here</a><a href="https://i.stack.imgur.com/EfqJo.png" rel="nofollow noreferrer">this is my code where i get stuck</a></p>
  <p>Traceback (most recent call last):
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connection.py&quot;, line 159, in _new_conn
  conn = connection.create_connection(
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\util\connection.py&quot;, line 84, in create_connection
  raise err
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\util\connection.py&quot;, line 74, in create_connection
  sock.connect(sa)
  ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it</p>
  <p>During handling of the above exception, another exception occurred:</p>
  <p>Traceback (most recent call last):
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py&quot;, line 670, in urlopen
  httplib_response = self._make_request(
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py&quot;, line 392, in _make_request
  conn.request(method, url, **httplib_request_kw)
  File &quot;C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\http\client.py&quot;, line 1282, in request
  self._send_request(method, url, body, headers, encode_chunked)
  File &quot;C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\http\client.py&quot;, line 1328, in _send_request
  self.endheaders(body, encode_chunked=encode_chunked)
  File &quot;C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\http\client.py&quot;, line 1277, in endheaders
  self._send_output(message_body, encode_chunked=encode_chunked)
  File &quot;C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\http\client.py&quot;, line 1037, in _send_output
  self.send(msg)
  File &quot;C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\http\client.py&quot;, line 975, in send
  self.connect()
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connection.py&quot;, line 187, in connect
  conn = self._new_conn()
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connection.py&quot;, line 171, in _new_conn
  raise NewConnectionError(
  urllib3.exceptions.NewConnectionError: &lt;urllib3.connection.HTTPConnection object at 0x000001AD66840430&gt;: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it</p>
  <p>During handling of the above exception, another exception occurred:</p>
  <p>Traceback (most recent call last):
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\adapters.py&quot;, line 439, in send
  resp = conn.urlopen(
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py&quot;, line 726, in urlopen
  retries = retries.increment(
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\util\retry.py&quot;, line 446, in increment
  raise MaxRetryError(_pool, url, error or ResponseError(cause))
  urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=5000): Max retries exceeded with url: /blockchain (Caused by NewConnectionError('&lt;urllib3.connection.HTTPConnection object at 0x000001AD66840430&gt;: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))</p>
  <p>During handling of the above exception, another exception occurred:</p>
  <p>Traceback (most recent call last):
  File &quot;C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\runpy.py&quot;, line 187, in _run_module_as_main
  mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File &quot;C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\runpy.py&quot;, line 146, in _get_module_details
  return _get_module_details(pkg_main_name, error)
  File &quot;C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\runpy.py&quot;, line 110, in <em>get_module_details
  <strong>import</strong>(pkg_name)
  File &quot;C:\Users\annun\python-blockchain\backend\app_<em>init</em></em>.py&quot;, line 82, in 
  result = requests.get(f'http://localhost:{ROOT_PORT}/blockchain')
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\api.py&quot;, line 75, in get
  return request('get', url, params=params, **kwargs)
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\api.py&quot;, line 60, in request
  return session.request(method=method, url=url, **kwargs)
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py&quot;, line 533, in request
  resp = self.send(prep, **send_kwargs)
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py&quot;, line 646, in send
  r = adapter.send(request, **kwargs)
  File &quot;C:\Users\annun\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\adapters.py&quot;, line 516, in send
  raise ConnectionError(e, request=request)
  requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5000): Max retries exceeded with url: /blockchain (Caused by NewConnectionError('&lt;urllib3.connection.HTTPConnection object at 0x000001AD66840430&gt;: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))</p>