%b requires bytes, or an object that implements __bytes__, not 'str' code example Example: TypeError: a bytes-like object is required, not 'str' 'Hello World'.encode()