Hi NishalS,
I am Aster, an Independent Advisor and I'm here to help you with your problem.
Can you try changing the host IP address to '0.0.0.0' in your python code? The error means that there was nothing listening at the IP:port that you were trying to connect to. If it still does not work after changing, it could be that the client's IP address or port is incorrect.
The last resort would be to turn off your firewall so that it does not block the connection.
Hope this helps, thank you.