From 7ad139069f488b6d45794f708d6810ee5fc1a766 Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Mon, 17 Jul 2023 12:27:25 +0200 Subject: [PATCH] fix labeling bug --- tomotwin/modules/common/preprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomotwin/modules/common/preprocess.py b/tomotwin/modules/common/preprocess.py index d888825..09e0614 100644 --- a/tomotwin/modules/common/preprocess.py +++ b/tomotwin/modules/common/preprocess.py @@ -385,7 +385,7 @@ def label_filename(path: str) -> str: filename = os.path.basename(path) try: lbl = re.search("id(?P\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