I'm setting up a simple Python3.X server, but there is a TypeError that I can't solve.
I've tried this type of server on a Ubuntu Desktop machine, but on a Raspberry Pi Zero W, it does not seem to work.
def main(): socket.bind(('', 8000)) socket.listen(5) while True: connection, address = socket.accept() data = connection.recv(1024) data = data.decode() data_bak = data
It should be working, but this error shows up:
TypeError: a bytes-like object is required, not 'tuple'
I verified, but there is no 'tuple' in my code