[Tutor] regarding checksum

Clayton Kirkwood crk at godblessthe.us
Tue Oct 25 19:52:08 EDT 2016


Small problem:
Import zlib
For file in files:
    checksum = zlib.adler32(file)

traceback
    checksum = zlib.adler32(file)
TypeError: a bytes-like object is required, not 'str'

Obvious question, how do I make a bytes-like object. I've read through the
documentation and didn't find a way to do this.

Thanks,

Clayton



More information about the Tutor mailing list