io.Bytes does not exist

changed to the BytesIO class