websocket not working on another computer

I got a new computer to run code so I moved the program to 2nd computer and it does not work. I found that the websocket was causing the problem. used await socket.recv() and it blocks the code. it works in spot but not in futures. why is it not working

async def main():
    print('Start')
    #async with ws.connect('wss://fstream.binance.com/stream?streams=btcusdt@kline_1m') as socket:
    async with ws.connect('wss://stream.binance.com:9443/stream?streams=btcusdt@kline_1m') as socket:
        response = await socket.recv()
        print(response)

code looks like this

Hi. Can you also provide the error log? Also, what is the difference between your two computers, are the OS version the same?

there is nothing to log. it shows no error just stuck at the line
response = await socket.recv()
and os version is both ubuntu 20.04

As this program can run successfully without any issue in one laptop, it’s not an issue on the program itself. Besides, I assume your two devices are tested in the same environment, that is they may share the same network and IP address. So the possible root cause is at the local side. Here are some points that may help you resolve it:

  1. Enable or find out error logs.
  2. Check the local network settings, including firewall, socket permission, etc.
  3. Check if all the necessary certificates are up-to-date.