Remote end closed connection without response

Sbag
Sbag edited November 2023 in Python client
Hi Developer community,

I am using the Python Kite connect API. And i am getting following error. Screenshot of the details error is attached with this massage. Along with that another three exception also raised. Please help me out with this @sujith @Sree .

raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

Thanks
  • Sbag
    Traceback (most recent call last):
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen
    httplib_response = self._make_request(
    ^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/urllib3/connectionpool.py", line 466, in _make_request
    six.raise_from(e, None)
    File "", line 3, in raise_from
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/urllib3/connectionpool.py", line 461, in _make_request
    httplib_response = conn.getresponse()
    ^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/http/client.py", line 1378, in getresponse
    response.begin()
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
    ^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
    http.client.RemoteDisconnected: Remote end closed connection without response

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
    ^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/urllib3/connectionpool.py", line 798, in urlopen
    retries = retries.increment(
    ^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen
    httplib_response = self._make_request(
    ^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/urllib3/connectionpool.py", line 466, in _make_request
    six.raise_from(e, None)
    File "", line 3, in raise_from
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/urllib3/connectionpool.py", line 461, in _make_request
    httplib_response = conn.getresponse()
    ^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/http/client.py", line 1378, in getresponse
    response.begin()
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
    ^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
    urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/soumen/Dropbox/investing/Algo_Trading/Kite_Zerodha-main/Nifty_trade_Supertrend_RSI.py", line 108, in
    data_2hr=(kite.historical_data(instrument_token, from_date, to_date, interval, False, True))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/kiteconnect/connect.py", line 632, in historical_data
    data = self._get("market.historical",
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/kiteconnect/connect.py", line 861, in _get
    return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/kiteconnect/connect.py", line 916, in _request
    raise e
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/kiteconnect/connect.py", line 904, in _request
    r = self.reqsession.request(method,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/site-packages/requests/adapters.py", line 501, in send
    raise ConnectionError(err, request=request)
    requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
  • rakeshr
    File "/home/soumen/Sodtware/miniconda3/lib/python3.11/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
    urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    Go through this thread.
Sign In or Register to comment.