> Because the marshaling is happening in the guts of xmlrpc.
Okay, I misunderstood your original message. You used the word
"marshal" (and the xmlrpc error did as well). I thought you were
referring to the marshal module. I didn't understand (and ignored) the
references to the xmlrpc module. In Py
On 11/27/20 4:05 PM, Skip Montanaro wrote:
I am getting this error.
I assume you mean the email subject. It doesn't work in 3.8 either:
Yes I do and that's too bad.
but that's not surprising to me. The marshal module is more-or-less
meant to serialize Python byte code. Pickle is more genera
> I am getting this error.
I assume you mean the email subject. It doesn't work in 3.8 either:
>>> import decimal
>>> d = decimal.Decimal(3.5)
>>> d
Decimal('3.5')
>>> import marshal
>>> marshal.dumps(d)
Traceback (most recent call last):
File "", line 1, in
ValueError: unmarshallable object
I am getting this error. I found this recipe to fix it:
from xmlrpclib import Marshaller
from decimal import Decimal
def dump_decimal(self, value, write):
write("")
write(str(value))
write("\n")
Marshaller.dispatch[Decimal] = dump_decimal
That seems to be for Python 2. I am ru