Skip to content

Commit

Permalink
Update configure.py to trace missing node position in add_layer function
Browse files Browse the repository at this point in the history
  • Loading branch information
cxnt committed Aug 2, 2024
1 parent bc4742a commit b9bbcf1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ui/tabs/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,14 @@ def add_layer(action_name: str, position: dict = None, autoconnect: bool = False
logger.debug(
"nodes_json", extra={"nodes_json len": len(nodes_json), "node_idx": node_idx}
)
position = nodes_json[node_idx].get("position", None)
try:
position = nodes_json[node_idx].get("position", None)
except:
logger.error(
f"[DEV] node is not found in nodes_json. node_idx: {node_idx}. nodes_json: {nodes_json}"
)
raise IndexError("Node is not found in nodes_json")

node = ui_utils.create_node(layer, position)
# nodes_flow.replace_node(node_idx, node)
nodes_flow.pop_node(node_idx)
Expand Down

0 comments on commit b9bbcf1

Please sign in to comment.