Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objects without a cross-chunk edge fail during edit #352

Open
ceesem opened this issue Sep 27, 2021 · 1 comment
Open

Objects without a cross-chunk edge fail during edit #352

ceesem opened this issue Sep 27, 2021 · 1 comment

Comments

@ceesem
Copy link
Collaborator

ceesem commented Sep 27, 2021

Some merges with small objects fail with the error: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Looking at the logs, it seems to come from:

"
7: "  File "./pychunkedgraph/graph/operation.py", line 438, in execute
    timestamp=override_ts if override_ts else timestamp,
"
8: "  File "./pychunkedgraph/graph/operation.py", line 631, in _apply
    rows=rows,
"
9: "  File "./pychunkedgraph/graph/edits.py", line 243, in add_edges
    return create_parents.run(), new_l2_ids, rows + create_parents.create_new_entries()
"
10: "  File "./pychunkedgraph/graph/edits.py", line 504, in run
    self._create_new_parents(layer)
"
11: "  File "./pychunkedgraph/graph/edits.py", line 468, in _create_new_parents
    layer_node_ids, layer, lower_layer_ids
"
12: "  File "./pychunkedgraph/graph/edits.py", line 418, in _get_connected_components
    cross_edges = get_sv_parents(sv_cross_edges)
"
13: "  File "/usr/local/lib/python3.7/site-packages/numpy/lib/function_base.py", line 2163, in __call__
    return self._vectorize_call(func=func, args=vargs)
"
14: "  File "/usr/local/lib/python3.7/site-packages/numpy/lib/function_base.py", line 2249, in _vectorize_call
    res = asanyarray(outputs, dtype=otypes[0])
"
15: "TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
"

Which makes it seem like the offending line is here, where the np.vectorize method tries to return the cross-chunk edge list as an array of ints and has no way to handle the case where no cross-chunk edges exist for the object:
https://github.com/seung-lab/PyChunkedGraph/blob/82ae75c091fd1a7fc41c0c73a94f9a8179acf1a2/pychunkedgraph/graph/edits.py#L409

@ceesem
Copy link
Collaborator Author

ceesem commented Sep 27, 2021

(This is for pcgv2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant