jgarzik / python-bitcoinrpc

Python interface to bitcoin's JSON-RPC API
GNU Lesser General Public License v2.1
644 stars 304 forks source link

Fix infinite recursion error under Python 3.3. #46

Closed robertsdotpm closed 9 years ago

robertsdotpm commented 9 years ago

The EncodeDecimal function is called to make the decimal.Decimal object Json serializable but the round function under Python 3.3 doesn't return a serializable object - it returns another Decimal, so essentially you end up with an infinite loop of trying to repeatedly encode that decimal object.

A simple type cast seems to fix it.

robertsdotpm commented 9 years ago

Edit: seems there's already a pull open for this exact error. I'll close this for you.