Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:error': 0.03; 'subject:not': 0.03; "subject:' ": 0.07; 'subject:trying': 0.09; 'subject:while': 0.09; 'cc:addr:python-list': 0.11; "'data'": 0.16; 'file.read()': 0.16; 'fine.': 0.16; 'introduces': 0.16; 'python4': 0.16; 'subject:object': 0.16; 'wrote:': 0.18; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'bytes': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'work.': 0.31; 'received:google.com': 0.35; 'in.': 0.36; 'charset:us-ascii': 0.36; 'received:10': 0.37; 'message-id:@gmail.com': 0.38; 'pm,': 0.38; "you'll": 0.62; "you've": 0.63; 'header:Message-Id:1': 0.63; 'name': 0.63; 'pick': 0.64; 'different': 0.65; 'to:addr:gmail.com': 0.65; '2014,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=UVKweDC5sTrme1Lpw/YWxiJcnv38o1h+Rq6vRRYyya8=; b=tFcsphzOGOGyvTxRgNbBUjRFrc4QvKJLpzTaiw+QuRDFYXE42aijg3vFN6psm3448+ 7nWRgIbrNPhg6Z4hfrJ+Sn4LKnYu6DndkNrnXU0WVJeRHhdWZnq3dRvLw0HxKWIXTu0h SZWRAPdlVf1NWjw+RJZB4RC7pDHqPnmQEEAPRD9Gu+GE4A5Y6tPw5UBUROLQvYw0ceHz wrbjCI8PdYN26yUqVerhfkgnI9bC7uNo1Na2ia5reYSVrwuVUvkM4sDl/SiCVMc1Mrta INfl7z58vp9n6qyoUeFJmx/IH3KDPmz93MQpOqp3hrVnU17BDvXUwOH9fx4Vcj+nTF+a 8nGg== X-Received: by 10.70.133.167 with SMTP id pd7mr9222950pdb.31.1407303120344; Tue, 05 Aug 2014 22:32:00 -0700 (PDT) References: <02baad14-39b1-41a0-a47d-28772c97ea54@googlegroups.com> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (11D257) From: Travis Griggs Subject: Re: TypeError: 'bytes' object is not callable error while trying to converting to bytes. Date: Tue, 5 Aug 2014 22:31:58 -0700 To: Chris Angelico Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1407303124 news.xs4all.nl 2937 [2001:888:2000:d::a6]:45073 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75778 > On Aug 4, 2014, at 22:57, Chris Angelico wrote: > > On Tue, Aug 5, 2014 at 3:47 PM, Satish ML 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. Until python4 introduces the 'data' built in. :)