Sure @Moderator_2 , sharing full logs for reference
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/connection.py", line 200, in _new_conn
sock = connection.create_connection(
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen
response = self._make_request(
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request
raise new_e
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1092, in _validate_conn
conn.connect()
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/connection.py", line 604, in connect
self.sock = sock = self._new_conn()
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/connection.py", line 209, in _new_conn
raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7fc1dadd3700>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "/home/ubuntu/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/auth/angelbroking/user/v1/loginByPassword (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fc1dadd3700>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/TradingBot/AngelOneApiTrading.py", line 244, in <module>
AngelOneApi().run()
File "/home/ubuntu/TradingBot/AngelOneApiTrading.py", line 216, in run
self.login()
File "/home/ubuntu/TradingBot/AngelOneApiTrading.py", line 51, in login
data = self.smartApi.generateSession(self.client_id, self.client_pin, totp)
File "/home/ubuntu/.local/lib/python3.10/site-packages/SmartApi/smartConnect.py", line 236, in generateSession
loginResultObject=self._postRequest("api.login",params)
File "/home/ubuntu/.local/lib/python3.10/site-packages/SmartApi/smartConnect.py", line 228, in _postRequest
return self._request(route, "POST", params)
File "/home/ubuntu/.local/lib/python3.10/site-packages/SmartApi/smartConnect.py", line 188, in _request
raise e
File "/home/ubuntu/.local/lib/python3.10/site-packages/SmartApi/smartConnect.py", line 177, in _request
r = requests.request(method,
File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 507, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/auth/angelbroking/user/v1/loginByPassword (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fc1dadd3700>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))