Skip to content

Commit 22a0946

Browse files
committed
NPI-3973 added clearer exception when _get_snx_vector_gzchunks() returns no output
1 parent 6dba890 commit 22a0946

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gnssanalysis/gn_frame.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def get_frame_of_day(
3535
):
3636
"""Main function to propagate frame into datetime of interest"""
3737

38-
if isinstance(date_or_j2000, (int, _np.int64)):
38+
if isinstance(date_or_j2000, (int, _np.int64)): # TODO check: np.int64 is meant to be a class not a type
3939
date_J2000 = date_or_j2000
4040
else:
4141
date_J2000 = _gn_datetime.datetime2j2000(_np.datetime64(date_or_j2000))
@@ -53,6 +53,8 @@ def get_frame_of_day(
5353
output = itrf_path_or_df
5454
elif isinstance(itrf_path_or_df, str):
5555
output = _gn_io.sinex._get_snx_vector_gzchunks(filename=itrf_path_or_df, block_name="SOLUTION/ESTIMATE")
56+
if output is None:
57+
raise Exception(f"Output from _get_snx_vector_gzchunks() was None! Filepath: {itrf_path_or_df}")
5658
else:
5759
raise ValueError(f"itrf_path_or_df must be a pandas DataFrame or str, got: {type(itrf_path_or_df)}")
5860

0 commit comments

Comments
 (0)