Skip to content

Commit

Permalink
Add a debug statement for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
arcondello committed Sep 13, 2023
1 parent 2fab6f4 commit b25c4f6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dimod/constrained/constrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,11 @@ def from_file(cls,
if match is not None:
constraint_labels.add(match.group(1))

for constraint in constraint_labels:
label = deserialize_variable(json.loads(constraint))
for constraint in constraint_labels:
try:
label = deserialize_variable(json.loads(constraint))
except json.decoder.JSONDecodeError:
raise RuntimeError(f"Cannot load {constraint!r}")

rhs = np.frombuffer(zf.read(f"constraints/{constraint}/rhs"), np.float64)[0]
sense = zf.read(f"constraints/{constraint}/sense").decode('ascii')
Expand Down

0 comments on commit b25c4f6

Please sign in to comment.