I get an error if I want to write on my udp socket like this. According to the docu there shouldn't be a problem. I don't understand why bind() works well in the same way but sendto() fails.
udp_port = 14550
udp_server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
udp_server.bind(('127.0.0.1', udp_port))
udp_clients = {}
Error:
udp_server.sendto('', ('192.0.0.1', 14550) )
socket.error: [Errno 22] Invalid argument