The python tool Command-Line Utility (cli) can not get the complex type record?

request
feature

#1

I write a test record and I can read it using the ascli tool , the record as below:

('test', 'orm-test', None, bytearray(b'\x06\x99\xb0\xba\x8f\x94l\xf0\x01\x9ft\x00\xbaI\xd5\xe6\x11\xe3\x06\xb4')) {'gen': 1, 'ttl': 2561000} {'ORM_String': '44', 'ORM_Inner': {'Inner_float64': 4593556327767445235, 'Inner_int': 11, 'Inner_string': '11'}, 'ORM_Bytes': [54, 54], 'ORM_Map': {'k2': 2, 'k1': 1}, 'ORM_Int': 33, 'aliasField': '55', 'ORM_List': ['l1', 'l2'], 'ORM_Float64': 4607738388174016296, 'ORM_Bool': 1}

But with the Command-Line Utility (cli), I got error:

Transaction did not complete for some reason:  unpack_from requires a buffer of at least 151 bytes
Marking bad:  BB998DEDB722AB8   ('127.0.0.1', 3000)
cluster says: no good hosts, really
 failing request because no good hosts
no data retrieved
0
testobj
Namespace(bin='', digest_base16=False, digest_base64=False, host='127.0.0.1', integer_key=False, key='testobj', namespace='test', operand='get', password=None, port=3000, recordttl=None, set='orm-test', target='127.0.0.1:3000', user=None, value=None, verbose=False)

Any fix on this?


#2

Just to confirm, do you have the tools package which matches your server version? Your cli is complaining about not being able to connect to the server. The data in your record isn’t the issue.

Is your server running on 127.0.0.1:3000 ?


#3

Yes,it is deployed on the local. Another tool ascli can get without problem. I tried again, the result as below:

$ ascli get test go-orm-test testobj
{"ORM_Map": { "k1": 1, "k2": 2 }, "ORM_List": [ "l1", "l2" ], "ORM_Inner": { "Inner_int": 11, "Inner_float64": 4593556327767445235, "Inner_string": "11" }, "ORM_String": "44", "ORM_Bool": 1, "ORM_Float64": 4607738388174016296, "aliasField": "55", "ORM_Int": 33, "ORM_Bytes": [ 54, 54 ]}

with cli:

    $ ./cli --verbose -o get -n test -s go-orm-test -k testobj
transmitting get request for  0  bins
transmit get buffer:
my hexlify: length  68
02  03  00  00  00  00  00  3c  :  16  03  00  00  00  00  00  00
00  00  00  00  00  00  00  00  :  00  00  00  03  00  00  00  00
00  05  00  74  65  73  74  00  :  00  00  0c  01  67  6f  2d  6f
72  6d  2d  74  65  73  74  00  :  00  00  09  02  03  74  65  73
74  6f  62  6a
parse header: received header:
my hexlify: length  30
02  03  00  00  00  00  01  17  :  16  00  00  00  00  00  00  00
00  01  0a  e4  a1  f4  00  00  :  00  00  00  00  00  09
read body:
my hexlify: length  257
00  00  00  16  01  13  00  07  :  4f  52  4d  5f  4d  61  70  82
a3  03  6b  31  01  a3  03  6b  :  32  02  00  00  00  15  01  14
00  08  4f  52  4d  5f  4c  69  :  73  74  92  a3  03  6c  31  a3
03  6c  32  00  00  00  44  01  :  13  00  09  4f  52  4d  5f  49
6e  6e  65  72  83  aa  03  49  :  6e  6e  65  72  5f  69  6e  74
0b  ad  03  49  6e  6e  65  72  :  5f  73  74  72  69  6e  67  a3
03  31  31  ae  03  49  6e  6e  :  65  72  5f  66  6c  6f  61  74
36  34  d3  3f  bf  97  24  74  :  53  8e  f3  00  00  00  10  01
03  00  0a  4f  52  4d  5f  53  :  74  72  69  6e  67  34  34  00
00  00  14  01  01  00  08  4f  :  52  4d  5f  42  6f  6f  6c  00
00  00  00  00  00  00  01  00  :  00  00  17  01  01  00  0b  4f
52  4d  5f  46  6c  6f  61  74  :  36  34  3f  f1  f9  a6  b5  0b
0f  28  00  00  00  10  01  03  :  00  0a  61  6c  69  61  73  46
69  65  6c  64  35  35  00  00  :  00  13  01  01  00  07  4f  52
4d  5f  49  6e  74  00  00  00  :  00  00  00  00  21  00  00  00
10  01  14  00  09  4f  52  4d  :  5f  42  79  74  65  73  92  36
36
Transaction did not complete for some reason:  unpack_from requires a buffer of at least 166 bytes
Marking bad:  BB998DEDB722AB8   ('127.0.0.1', 3000)
cluster says: no good hosts, really
 failing request because no good hosts
no data retrieved

#4

Okay, this isn’t a problem with the Python client, then. Can you move it to Tools?


#5

Moving to tools. I found it may be an issue in the python library citrusleaf.py


#6

Yes, ascli is the new cli, cli is still in the tool set for legacy purposes but you are correct, citrusleaf.py doesn’t support CDTs as they were not available in 2.x.


#7

OK,got it. So the cli will not be updated in the future to support 3.x?


#8

There currently aren’t any plans to do so.