RajatShukla / getpaid

Automatically exported from code.google.com/p/getpaid
0 stars 0 forks source link

unsupported operand type while selecting a shipping rate #214

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
While on the checkout wizard, I had to choose a shipping rate. I got the
traceback I attach.

Original issue reported on code.google.com by walteralini on 8 Sep 2008 at 7:51

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by cjj.ifpe...@gmail.com on 11 Sep 2008 at 1:37

GoogleCodeExporter commented 9 years ago
I've been unable to set up a shipping module to where I can test this, but I 
suspect
the fix may be to wrap float() around the offending Decimal:

>>> import decimal
>>> myDecimal = decimal.Decimal(5)
>>> myFloat = float(6)
>>> myFloat += myDecimal
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for +=: 'float' and 'Decimal'
>>> myFloat += float(myDecimal)
>>> myFloat
11.0

Original comment by mcgruff....@gmail.com on 11 Oct 2008 at 7:53

GoogleCodeExporter commented 9 years ago

Original comment by cjj.ifpe...@gmail.com on 11 Oct 2008 at 9:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Is there a way to get a key to test this ?

Original comment by bruno.r...@gmail.com on 11 Nov 2008 at 1:18

GoogleCodeExporter commented 9 years ago
I fixed it with r2161 in getpaid.core.

Original comment by lucielej...@gmail.com on 30 Dec 2008 at 9:37