Skip to content

Commit

Permalink
Clarify error message for empty directories in load_imgs_from_dir (#32
Browse files Browse the repository at this point in the history
)

* Clarify error message for empty directories in load_imgs_from_dir

* pre-commit formatting
  • Loading branch information
alex-l-kong authored May 15, 2023
1 parent 23ea4d5 commit 048b678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/alpineer/load_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def load_imgs_from_tree(
channels = [chan for _, chan in sorted(zip(channels_indices, all_channels))]

if len(channels) == 0:
raise ValueError("No images found in designated folder")
raise ValueError(f"No images found in designated folder, {os.path.join(data_dir, fovs[0])}")

test_img = io.imread(os.path.join(data_dir, fovs[0], img_sub_folder, channels[0]))

Expand Down

0 comments on commit 048b678

Please sign in to comment.