need help with a multiloop error

Jeremiah Dodds jeremiah.dodds at
Wed Apr 22 16:33:30 CEST 2009

On Wed, Apr 22, 2009 at 3:07 PM, Brian <b_glassman at> wrote:

> I'm trying to run a python program with a multiloop and I am getting
> this error message.  I was wondering if anyone could tell from this
> message what I'm doing wrong or where I've made a mistake.  Let me
> know if you need some of the code for this to make more sense.  Thanks
> a lot.
> How much labor time does each individual have?8
> 1331
> Traceback (most recent call last):
>  File "C:\Python25\commodity\ <http://
>> ", line 233, in <module>
>    options = mp.options(all,names)
>  File "C:\Python25\commodity\", line 265, in options
>    for name, value in zip(names, experiment)]))
>  File "C:\Python25\commodity\", line 244, in str2obj
>    b = str2bool(s)
>  File "C:\Python25\commodity\", line 155, in str2bool
>    (s, type(s))
> TypeError: 0.0 <type 'float'> cannot be converted to bool
> --

I think we'd have to see your str2* functions. I'm a bit confused as to why
they exist anyhow, as the normal "if foo" tends to work in most situations.

What are you trying to do? Why do you need str2obj, and str2bool? I'm
betting that there's a much better way to solve what you're trying to, but
we're going to need some more info (and code) to help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list