Skip to content

Commit

Permalink
adding KeyError
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Nov 10, 2023
1 parent dd1a74b commit 9657c42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py4DSTEM/io/filereaders/read_K2.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(
try:
R_Ny = gtg.allTags[".SI Dimensions.Size Y"]
R_Nx = gtg.allTags[".SI Dimensions.Size X"]
except ValueError:
except (ValueError,KeyError):
print("Warning: scan shape not detected. Please check/set manually.")
R_Nx = self._guess_number_frames() // 32
R_Ny = 1
Expand Down

0 comments on commit 9657c42

Please sign in to comment.