Skip to content

Commit 0cd91b2

Browse files
authored
Update graph_util.py
debug
1 parent f0dae98 commit 0cd91b2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/segmentation_skeleton_metrics/utils/graph_util.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,13 @@ def to_graph(self, swc_dict):
146146
147147
"""
148148
# Initialize graph
149-
graph = SkeletonGraph(anisotropy=self.anisotropy)
150-
graph.init_voxels(swc_dict["voxel"])
151-
graph.set_filename(swc_dict["swc_id"] + ".swc")
152-
graph.set_nodes(len(swc_dict["id"]))
149+
try:
150+
graph = SkeletonGraph(anisotropy=self.anisotropy)
151+
graph.init_voxels(swc_dict["voxel"])
152+
graph.set_filename(swc_dict["swc_id"] + ".swc")
153+
graph.set_nodes(len(swc_dict["id"]))
154+
except:
155+
print("Failed at Line 155 -", swc_dict["swc_id"] + ".swc")
153156

154157
# Build graph
155158
id_lookup = dict()

0 commit comments

Comments
 (0)