0

I'm a CS student learning network programming. I'm using python to develop a chat application using the server-client network functions like socket function, bind function, receive function and etc. But I encounter this problem in the server code which I don't understand since I have never learnt python programming language before. Could you help me?

The error occurs at print(f'Received encrypted message from {user["data"].decode("utf-8")}: {encMsg["data"].decode("utf-8")}')

            # Get user by notified socket, so we will know who sent the message
            user = clients[notified_socket]

            print(f'Received encrypted message from {user["data"].decode("utf-8")}: {encMsg["data"].decode("utf-8")}')

            # Iterate over connected clients and broadcast message
            for client_socket in clients:

                # But don't sent it to sender
                if client_socket != notified_socket:

             

  • Does this answer your question? ['utf-8' codec can't decode byte 0x92 in position 18: invalid start byte](https://stackoverflow.com/questions/46000191/utf-8-codec-cant-decode-byte-0x92-in-position-18-invalid-start-byte) – Chintan Rajvir May 26 '21 at 04:21
  • I think it somehow solved the error. Thank you so much for helping. – Wong Seng Kuan May 26 '21 at 07:02

0 Answers0