just use the connection, adress = accept() instead of the conn,address = accept() , because it makes deference in python3 also the conn.send(b'"hey"); use connection.send(b'"hey")