emile <em...@fenx.com> writes:
> *** NameError: name 'val' is not defined
> (Pdb) l
> 139         try:
> 140             val = round(float(decval),1)
> 141         except:
> 142             import pdb; pdb.set_trace()

If 'float' or 'round' throw an exception, the assignment to 'val' never
happens, so 'val' is undefined.  Try examining the value of 'decval' in
the debugger to see what is making the conversion fail.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to