Unable to load pickle data

You have to use pickle.loads, not pickle.load, to read from a pybytes object. pickle.load only takes an I/O stream.