Skip to content

Commit

Permalink
fix: cast to list for len
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianmtr committed Jan 15, 2021
1 parent ac30ec4 commit 1d196d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jina/executors/indexers/keyvalue.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, *args, **kwargs):
self._page_size = mmap.ALLOCATIONGRANULARITY

def add(self, keys: Iterator[int], values: Iterator[bytes], *args, **kwargs):
if len(keys) != len(values):
if len(list(keys)) != len(list(values)):
raise ValueError(f'Len of keys {len(keys)} did not match len of values {len(values)}')
for key, value in zip(keys, values):
l = len(value) #: the length
Expand Down

0 comments on commit 1d196d1

Please sign in to comment.