Skip to content

Commit

Permalink
Merge pull request #33 from MPI-Dortmund/labeling_bug
Browse files Browse the repository at this point in the history
fix labeling bug
  • Loading branch information
thorstenwagner authored Jul 17, 2023
2 parents cb36f72 + 7ad1390 commit 1f12b50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tomotwin/modules/common/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def label_filename(path: str) -> str:
filename = os.path.basename(path)
try:
lbl = re.search("id(?P<PDB>\d[a-zA-Z0-9]{3})", filename).group("PDB").upper()
except AssertionError:
except AttributeError:
lbl = re.search("\d[a-zA-Z0-9]{3}", filename).group(0).upper() # https://regex101.com/r/rZi0TZ/1

return lbl
Expand Down

0 comments on commit 1f12b50

Please sign in to comment.