I'm making a LAN multiplayer word/trivia game for a computing project. I'm trying to code a module network.py, the aim of which is to broadcast messages, wait for a response, and if there are no responses, become the host, so when more computers run the code, they join the host and are able to transmit messages afterwards. I don't have much coding experience, and I've encountered an issue which I don't know how to overcome. Whenever a second player tries to join the host there is an error. I've attached screenshots of the code and output. I'm not sure how to fix and any help would be greatly appreciated.