[Baypiggies] scientific notation: string to int

Jimmy Retzlaff jimmy at retzlaff.com
Thu Dec 9 23:56:37 CET 2010


On Thu, Dec 9, 2010 at 1:18 PM, Bryce Verdier <bryceverdier at gmail.com> wrote:
> I knew it was to easy to be true. Help?!?!
>
> Traceback (most recent call last):
>  File "./space_report.py", line 58, in <module>
>    file1_class_clients.append(client(x,v))
>  File "./space_report.py", line 10, in __init__
>    self.size = float(size)
> ValueError: could not convert string to float: Commercial Max Space Used

The string after the colon ("Commercial Max Space Used") is what was
passed to float. Try float("asdf") to see this in action. So it's
likely a problem with the data or how it's being processed.

Jimmy


More information about the Baypiggies mailing list