Aerospike error Exception: (-1L, 'Unable to deserialize bytes', 'src/main/serializer.c', 458)

I got the exception below when scan a set and use a results function to retrieve data and access only by first time some item in list.

Exception: (-1L, 'Unable to deserialize bytes', 'src/main/serializer.c', 458)

Follow code:

>>> c = aerospike.client({'hosts': [('localhost', 3000)], 'policies': {'timeout': 100, 'retry': 10}}).connect()
>>> query = c.scan('namespace', 'someset')
>>> results = query.results()
>>> results[0]
Exception: (-1L, 'Unable to deserialize bytes', 'src/main/serializer.c', 458)
>>> results[0]
(('namespace', 'someset', None, bytearray(b'\x06`\xda\x99\x12B\xd3\x1dsT:\x9fd+YRG\x8d\xe3\xc0')), {'gen': 1, 'ttl': 4294967295}, {'set': 'someset', 'value': {'24324': {'c': '34345345', 'home_clic': '3'}, '32350': {'c': '387473', 'home_clic': '1'}}, 'host': 1, 'key': '150b1daa-5eb9-43dc-b39d-0f0d670db5aa', 'operation': 5})

It’s really weird. Do i found a bug?

I’m using python 2.7.8, client 1.0.43, Ubuntu 14.04.

You definitely ran into a bug. Please open a new issue in the GitHub repo aerospike/aerospike-client-python - it would be helpful if you can provide an output of what AQL sees on that row:

select * from namespace.someset where PK=...

Or if you know the data you inserted into that specific row - I’d like to see if there’s more than what appears on the second call to ``results[0]```.

OK, bug opened. Follow aql output:

aql> select * from namespace.someset where PK='32e72c568da5-46413879bc75'
+----------------------------------------+------+----------------------------------------------------------------------+-----------+----------------+---------------+
| key                                    | host | value                                                                | operation | set            | timestamp     |
+----------------------------------------+------+----------------------------------------------------------------------+-----------+----------------+---------------+
| "32e72c568da5-46413879bc75'" | 1    | {"356756750":{"c":"756-35675650", "some_id":"edf6007"}} | 5         | "someset" | 1431526806822 |
+----------------------------------------+------+----------------------------------------------------------------------+-----------+----------------+---------------+

It seems OK for me.

I see Issue 55, thanks. Does this happen for you only in the CLI context, or also if you put this in a script and run it?

It’s solved. #closed

1 Like

Thanks for verifying it and reporting it in the first place, Geraldo.