python 2 to python 3 bytes like object is required not 'str' code example Example: TypeError: a bytes-like object is required, not 'str' 'Hello World'.encode()