468,241 Members | 1,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,241 developers. It's quick & easy.

Error: Cannot convert Decimal("0.0000") to Decimal

Hi

I got this wired exception periodically (Python 2.5, Django based
application)
what does it mean ?
Jun 27 '08 #1
1 2636
Vitaliy wrote:
I got this wired exception periodically (Python 2.5, Django based
application)
what does it mean ?
A reload() maybe?
>>import decimal
d = decimal.Decimal()
reload(decimal)
<module 'decimal' from '/usr/lib/python2.5/decimal.pyc'>
>>decimal.Decimal(d)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/decimal.py", line 617, in __new__
raise TypeError("Cannot convert %r to Decimal" % value)
TypeError: Cannot convert Decimal("0") to Decimal

Peter
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Stephen Briley | last post: by
5 posts views Thread by Dan C Douglas | last post: by
3 posts views Thread by duprejonathan | last post: by
5 posts views Thread by Aneesh Pulukkul[MCSD.Net] | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.