need help with a multiloop error
jeremiah.dodds at gmail.com
Wed Apr 22 16:33:30 CEST 2009
On Wed, Apr 22, 2009 at 3:07 PM, Brian <b_glassman at hotmail.com> 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
> Traceback (most recent call last):
> File "C:\Python25\commodity\commoditytrading4.2.py <http://
> commoditytrading4.2.py> ", line 233, in <module>
> options = mp.options(all,names)
> File "C:\Python25\commodity\multipleloop.py", line 265, in options
> for name, value in zip(names, experiment)]))
> File "C:\Python25\commodity\misc.py", line 244, in str2obj
> b = str2bool(s)
> File "C:\Python25\commodity\misc.py", 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...
More information about the Python-list