need help with a multiloop error
delco27 at gmail.com
delco27 at gmail.com
Wed Apr 22 20:54:44 EDT 2009
Here is a little more of the code? Does this help at all?
try:
b = str2bool(s)
return b
except ValueError, e:
# s is not a boolean value, try eval(s):
try:
b = eval(s, globals, locals)
return b
except Exception, e:
if debug:
print
On Apr 22, 10:30 am, MRAB <goo... at mrabarnett.plus.com> wrote:
> Brian 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\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
>
> What is str2bool? Having the code would definitely help!- Hide quoted text -
>
> - Show quoted text -
More information about the Python-list
mailing list