I am sorry, but I am having an hard time understanding you.
All I am understanding is that I have to decode all the bytestring,
that's why I am using the command .decode()
just like it was done for the client.
But I am not sure of what else I need to do.
Now I added this line
I replaced those lines with
All I am understanding is that I have to decode all the bytestring,
that's why I am using the command .decode()
just like it was done for the client.
But I am not sure of what else I need to do.
Now I added this line
user_response=user_response.decode()right before the comparison, but still, it doesn't work.
I replaced those lines with
user_response = sock.recv(1024) user_response=user_response.decode() if user_response.startswith('OK'): with open(filename, 'rb') as f:but why doesn't it still work ?