From eb8264c5533e31af6ff3a9af4c0e9e1f7cd8a3e2 Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Wed, 25 Sep 2024 23:02:35 +0000 Subject: [PATCH] Fix failure to detect offsets when running out of data. --- bemani/utils/read.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bemani/utils/read.py b/bemani/utils/read.py index e894c2a..c3bc0b2 100644 --- a/bemani/utils/read.py +++ b/bemani/utils/read.py @@ -2128,7 +2128,7 @@ class ImportPopn(ImportBase): print("Successfully parsed game DB!") return songs - except (UnicodeError, InvalidOffsetException): + except (UnicodeError, InvalidOffsetException, struct.error): # These offsets are possibly not correct, so try the next configuration. print("Failed to parse game DB using current inferred data version!") pass @@ -3166,7 +3166,7 @@ class ImportIIDX(ImportBase): # We only import one or the other here, I know its a weird function. return [], qpros - except (UnicodeError, InvalidOffsetException): + except (UnicodeError, InvalidOffsetException, struct.error): # These offsets are possibly not correct, so try the next configuration. print("Failed to parse game DB using current inferred data version!") pass @@ -3748,7 +3748,7 @@ class ImportDDR(ImportBase): print("Successfully parsed game DB!") return songs - except (UnicodeError, InvalidOffsetException): + except (UnicodeError, InvalidOffsetException, struct.error): # These offsets are possibly not correct, so try the next configuration. print("Failed to parse game DB using current inferred data version!") pass @@ -4843,7 +4843,7 @@ class ImportReflecBeat(ImportBase): print("Successfully parsed game DB!") return songs - except (UnicodeError, InvalidOffsetException): + except (UnicodeError, InvalidOffsetException, struct.error): # These offsets are possibly not correct, so try the next configuration. print("Failed to parse game DB using current inferred data version!") pass