By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,928 Members | 1,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,928 IT Pros & Developers. It's quick & easy.

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

P: n/a
Hi

I got this wired exception periodically (Python 2.5, Django based
application)
what does it mean ?
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.