--- c:/Python37/Lib/codecs.py 2019-07-08 19:24:18.000000000 -0400 +++ codecs.py 2019-10-15 04:01:25.880518400 -0400 @@ -235,7 +235,10 @@ def encode(self, input, final=False): # encode input (taking the buffer into account) - data = self.buffer + input + if isinstance(input, int): + data = self.buffer + bytes((input,)) + else: + data = self.buffer + input (result, consumed) = self._buffer_encode(data, self.errors, final) # keep unencoded input until the next call self.buffer = data[consumed:]