ome / omero-scripts

Core OMERO Scripts
https://pypi.org/project/omero-scripts/
12 stars 32 forks source link

Fixed error message output for Batch_Image_Export #203

Closed muhanadz closed 2 years ago

muhanadz commented 2 years ago

The script gives two choices to the user; to Export Individual Channels OR to Export Meged Image. The user might fail to select either of the options.

Screenshot 2022-08-08 at 4 17 57 pm

This PR fixed the output message to alert the user that they need to chose either of the option.

Without PR

Script fails to exit correctly with TypeError.

Traceback (most recent call last):
  File "./script", line 625, in <module>
    run_script()
  File "./script", line 609, in run_script
    file_annotation, message = batch_image_export(conn, script_params)
TypeError: 'NoneType' object is not iterable

With PR

The output message displays "Not chosen to save Individual Channels OR Merged Image" and exits correctly.

image
sbesson commented 2 years ago

@will-moore should we get released as omero-scripts 5.7.1 so that it can be bundled and distributed in the upcoming OMERO.server release?

will-moore commented 2 years ago

@sbesson Sounds good. I'll go ahead...

will-moore commented 2 years ago

Done: https://github.com/ome/omero-scripts/releases/tag/v5.7.1