Thanks Albin for your answer. Yes, my connection is getting closed from time to time. The error thrown is “Remote end closed connection without response”. Below one of the latest:
==============================
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 791, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 537, in _make_request
response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/urllib3/connection.py”, line 461, in getresponse
httplib_response = super().getresponse()
^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/http/client.py”, line 1428, in getresponse
response.begin()
File “/usr/lib/python3.12/http/client.py”, line 331, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/http/client.py”, line 300, 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 “/usr/lib/python3/dist-packages/requests/adapters.py”, line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 845, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/urllib3/util/retry.py”, line 472, in increment
raise reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/urllib3/util/util.py”, line 38, in reraise
raise value.with_traceback(tb)
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 791, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 537, in _make_request
response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/urllib3/connection.py”, line 461, in getresponse
httplib_response = super().getresponse()
^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/http/client.py”, line 1428, in getresponse
response.begin()
File “/usr/lib/python3.12/http/client.py”, line 331, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/http/client.py”, line 300, 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 “/var/www/html/Tradingview/usdtScanner.py”, line 613, in
balance = get_balance_usdt(myClient)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/var/www/html/Tradingview/usdtScanner.py”, line 72, in get_balance_usdt
response = clientObj.balance()
^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/dist-packages/binance/um_futures/account.py”, line 548, in balance
return self.sign_request(“GET”, url_path, {**kwargs})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/dist-packages/binance/api.py”, line 83, in sign_request
return self.send_request(http_method, url_path, payload, special)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/dist-packages/binance/api.py”, line 116, in send_request
response = self._dispatch_request(http_method)(**params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 602, in get
return self.request(“GET”, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-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’))
========================
Thanks for your time.