Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'string': 0.09; 'literal': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:using': 0.09; 'valueerror:': 0.09; 'posted': 0.15; '(pdb)': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'repr.': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'string,': 0.24; 'looks': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply- To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'you?': 0.31; 'running': 0.33; 'ago': 0.33; 'something': 0.35; '14,': 0.36; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'tell': 0.60; 'minutes': 0.67; 'mar': 0.68; 'invalid': 0.68; '10:': 0.84; '2015': 0.84; 'received:pacbell.net': 0.84; '***': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: emile Subject: Re: Odd ValueError using float Date: Fri, 13 Mar 2015 15:44:22 -0700 References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-69-226-129-65.dsl.pltn13.pacbell.net User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1426286670 news.xs4all.nl 2860 [2001:888:2000:d::a6]:40993 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:87392 On 03/13/2015 03:14 PM, Chris Angelico wrote: > On Sat, Mar 14, 2015 at 9:10 AM, emile wrote: >> (Pdb) decval >> '4' >> (Pdb) len(decval) >> 1 >> (Pdb) int(decval) >> *** ValueError: invalid literal for int() with base 10: '41.700000000000003' >> (Pdb) >> >> >> Any ideas? > > What's type(decval) tell you? I suspect you may have something other > than a string, even though it looks like a string in its repr. >sigh< Now it's running again. Up to 20 minutes ago when I posted it continually. Is-it-time-to-go-pick-grapes-yet?-ly y'rs, Emile