ydb-python-sdk
ydb-python-sdk copied to clipboard
bug: TypeError: 'NoneType' object is not callable while iterating Scanquery results
Bug Report
YDB Python SDK version:
ydb-3.3.5
Environment
Mac OS X
Current behavior:
for row_proto in message.rows: row = _Row(message.columns) for column, value, column_info in zip(message.columns, row_proto.items, column_parsers): v_type = value.WhichOneof("value") if v_type == "null_flag_value": row[column.name] = None continue
while v_type == "nested_value":
value = value.nested_value
v_type = value.WhichOneof("value")
column_parser, unwrapped_type = column_info
row[column.name] = column_parser(unwrapped_type, value, table_client_settings)
E TypeError: 'NoneType' object is not callable
Expected behavior:
Steps to reproduce:
--!syntax_v1 pragma EmitAggApply;
SELECT Pg::count(),Pg::count(key),Pg::min(key),Pg::max(key),Pg::sum(key),Pg::avg(key) FROM (values (1),(2),(3)) as a(key)
it = ydb_driver.table_client.scan_query(query, settings=settings)
if it is None:
return None
while True:
try:
result = next(it)
Other information: