SQL: Fix crash at reshape failed with try catch (dirty).

This commit is contained in:
parouby committed 2025-04-23 15:31:23 +02:00
1 parent 79ee1c3cfa
commit 9857615a12
1 file changed
+11 -3
+11 -3
View File
@@ -434,10 +434,18 @@ class ReadTableForOpen:
for dest, resh in SNR_vars:
SNR = np_f64_parse(next(it))
if len(SNR) == 0:
try:
if len(SNR) != 0:
dest.append(SNR.reshape(resh[i].shape))
else:
dest.append(np.array([]))
except:
logger.warning(
"SQL: read_table_BS_raw_data_SNR: "
+ "failed to reshape data from "
+ f"{SNR.shape} to {resh[i].shape}"
)
dest.append(np.array([]))
else:
dest.append(SNR.reshape(resh[i].shape))
def read_table_BS_raw_data_rest(self, query, i):
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)