Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'none)': 0.07; 'missed': 0.09; 'friday,': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; '(error)': 0.16; 'col': 0.16; 'ian.': 0.16; 'wrote:': 0.17; 'error.': 0.21; 'help.': 0.22; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'mike': 0.27; 'file': 0.32; 'traceback': 0.33; 'agree': 0.34; 'received:google.com': 0.34; 'thanks': 0.34; 'received:209.85': 0.35; 'october': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'total': 0.65 Newsgroups: comp.lang.python Date: Fri, 5 Oct 2012 01:31:29 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=122.167.80.64; posting-account=uPFZNQoAAAAm9w7z13q1SjWNKNjztdcD References: <7c7beccb-72e4-4cfb-958d-4a7235076fb3@googlegroups.com> <307d5843-af17-4079-8a48-f8d7351a1d7b@googlegroups.com> <3e6de8b6-5ad5-4b29-92b4-9e957158ca5a@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 122.167.80.64 MIME-Version: 1.0 Subject: Re: sum function From: Ramchandra Apte To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: Python 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: , Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349425893 news.xs4all.nl 6894 [2001:888:2000:d::a6]:39512 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30793 On Friday, 5 October 2012 07:31:24 UTC+5:30, Mike wrote: > I agree with you, Ian. Thanks for all the help. Now I get the below error. > > > > File "test.py", line 17, in > > total = sum(float(col.value) for r in iter(next_r, None) for col in r[0].columns.itervalues()) > > File "test.py", line 17, in > > total = sum(float(col.value) for r in iter(next_r, None) for col in r[0].columns.itervalues()) > > > > Thanks You have missed the last line of the traceback (error)