From 75d5b7bf81f8091cc36d70e51dc4a4eb0c02312f Mon Sep 17 00:00:00 2001 From: Stephen Copplestone Date: Wed, 25 Mar 2026 20:49:27 +0100 Subject: [PATCH] Fix error "UnboundLocalError: cannot access local variable '_' where it is not associated with a value" when trying to use "variable = [_] ..." --- pyhope/mesh/fem/fem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyhope/mesh/fem/fem.py b/pyhope/mesh/fem/fem.py index 17345a6b..cf83235a 100644 --- a/pyhope/mesh/fem/fem.py +++ b/pyhope/mesh/fem/fem.py @@ -263,7 +263,7 @@ def FEMConnect() -> None: # > 5. Generate final edge keys for all raw edges nEdgesRaw = len(edgesRaw) - edgeKeys = [_] * nEdgesRaw + edgeKeys = [()] * nEdgesRaw edgeKeySet = set() for i, (elemID, locEdge, (n0, n1)) in enumerate(edgesRaw): # Get the initial representation of the edge