TypeError: 'bytes' object is not callable error while trying to converting to bytes.

Chris Angelico rosuav at gmail.com
Tue Aug 5 01:57:32 EDT 2014


On Tue, Aug 5, 2014 at 3:47 PM, Satish ML <satishmlwizpro at gmail.com> wrote:
>>>>bytes = file.read()

You've just shadowed the built-in type 'bytes' with your own 'bytes'.
Pick a different name for this, and you'll be fine. 'data' would work.

ChrisA



More information about the Python-list mailing list