New to Python

Peter Hansen peter at engcorp.com
Tue Sep 21 22:39:55 CEST 2004


Jimmie Webb wrote:
> Yes,  They look good to me.  The nCost Value is 0022.63.
> but I still get the error ValueError: Invalid literal for float(): EATE TA.
> 
> What does the 'EATE TA' mean?

 >>> float('EATA TE')
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
ValueError: invalid literal for float(): EATA TE

 >>> float('this not a float!')
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
ValueError: invalid literal for float(): this not a float!

 >>> float ('check your data file and recheck your code')
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
ValueError: invalid literal for float(): check your data file and 
recheck your code


-Peter



More information about the Python-list mailing list