sudecki30/labels

can't iterate

Opened this issue · 2 comments

Hi, can you help me please?

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "D:\Segment\envs\trans\lib\multiprocessing\pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "d:\labels-master\png_to_json.py", line 149, in image_to_json
segmentations,areas,bboxs = create_sub_mask_annotation(mask, image_id, category_id, annotation_id, is_crowd)
File "d:\labels-master\png_to_json.py", line 53, in create_sub_mask_annotation
contour = np.vstack(contour).squeeze()
File "<array_function internals>", line 6, in vstack
TypeError: dispatcher for array_function did not return an iterable
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "d:/labels-master/png_to_json.py", line 251, in
for _ in tqdm.tqdm(pool.imap( image_to_json_partial, range(l)), total=l):
File "D:\Segment\envs\trans\lib\site-packages\tqdm\std.py", line 1178, in iter
for obj in iterable:
File "D:\Segment\envs\trans\lib\multiprocessing\pool.py", line 736, in next
raise value
TypeError: dispatcher for array_function did not return an iterable

-----How can I solve it?

Hi, I have correct the code to work with actual package version

It is successful!!!!!!!!!
My gratitude to you for all you have done!!!!!!!!!