Error reporting: Server_Socket.sendto (bytes (s), addr)
Modify: Server_socket.sendto(bytes(s.encode(‘utf-8’)), addr) Then you can communicate successfully
in fact, it’s strange. I never reported an error before. Later, I changed the environment from Python 2.7 to Python 3.5 ~~
Similar Posts:
- python TypeError: an integer is required
- Python Error: Socket TypeError: a bytes-like object is required, not ‘str’ [How to Solve]
- python 3.6 socket tcp Connect TypeError: a bytes-like object is required, not ‘str’
- C++ Error: Run-Time Check Failure #2 – Stack around the variable ‘cc’ was corrupted.
- Programming udp sockets in python
- Error reporting and resolution of Python 3 using binascii method
- [Solved] Typeerror: incorrect padding occurred in python3 Base64 decoding
- AttributeError: ‘NoneType’ object has no attribute ‘split’ [How to Solve]
- UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-1:
- Error in import torch under linux environment