Getting the following error while putting record in the aerospike database using python client

exception.ClientError: (-1, 'Unable to call dumps function', 'src/main/serializer.c', 364, False)

Is this record size related issue ? Thanks in advance

Hi Arpit_Maiya,

The error is produced during the serialization of data in the python client by the following code.

                    PyObject * py_funcname = PyString_FromString("dumps");

                    initresult = PyObject_CallMethodObjArgs(cpickle_module,
                            py_funcname, value, NULL);

                    if (!initresult) {
                        /* more error handling &c */
                        as_error_update(error_p, AEROSPIKE_ERR_CLIENT, "Unable to call dumps function");
                        goto CLEANUP;


My guess is “value” is something that the pickle module’s dumps() function can’t handle. It’s hard to tell exactly what the issue is without seeing the data that is being serialized. It could be a size issue if the data is large enough to cause pickle to run out of memory. If you can provide any more information about the python version you are on, what type of data is being serialized, and how large the records are, that might help solve the problem.

Best, Dylan.

Hi Dylan,

Thanks for the speedy response. I am using Python3.6 and the record is of size 25Kb. The type of data is stringified HTML-js.

On a lighter note, I tried to serialize/de-serialize this data using dumps()/loads() functions and its working fine.

Is there any issue with the aerospike python3 pickle module ?

Regards, Arpit

Thanks for your patience Arpit.

The python client uses the pickle module installed on the host python. I have not seen this issue arise before, but it could be the code calling the dumps function or passing it arguments. I will try to replicate the issue and take a look at the code.

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.