diff --git a/src/imcflibs/imagej/omerotools.py b/src/imcflibs/imagej/omerotools.py index 7dad756f..856c5a57 100644 --- a/src/imcflibs/imagej/omerotools.py +++ b/src/imcflibs/imagej/omerotools.py @@ -57,6 +57,12 @@ def parse_url(client, omero_str): >>> for wrapper in img_wrappers: >>> imp = wpr.toImagePlus(client) """ + if not str(omero_str).strip(): + raise ValueError("No OMERO link or image ID provided.") + + # Sanitize the string + omero_str = omero_str.strip() + image_ids = [] dataset_ids = [] image_wpr_list = []