Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WaveorderReader should give more informative error messages #93

Closed
talonchandler opened this issue Nov 23, 2022 · 2 comments
Closed

WaveorderReader should give more informative error messages #93

talonchandler opened this issue Nov 23, 2022 · 2 comments

Comments

@talonchandler
Copy link
Collaborator

The current WaveorderReader error messages can be slightly confusing. For example:

python
>>> from waveorder.io import WaveorderReader
>>> WaveorderReader('./2T_3P_16Z_128Y_256X_Kazansky_BF_1')
<waveorder.io.reader.WaveorderReader object at 0x7f7d1807cc70>
>>> WaveorderReader('./2T_3P_16Z_128Y_256X_Kazansky_BF_1/2T_3P_16Z_128Y_256X_Kazansky_BF_1_MMStack_Pos0.ome.tif')
ValueError: Specific input contains no ome.tif files, please specify a valid input directory
>>> WaveorderReader('./nonexistent'))
FileNotFoundError: No compatible data found under ./nonexistent, please specify the top level micromanager directory.

I might suggest that:

  • trying to open a single multipage .ome.tif file should give a different error message like "WaveorderReader expects a directory of .ome.tif files, not a single file.". As written the error might make it seem like the ome.tif is invalid/corrupt.
  • trying to open a nonexistent file/folder displays the message "This file/folder does not exist on the file system, please check your path and provide a directory." As written the error makes it seem like the reader only reads micromanager directories. Also, the error makes it makes it seem like the files are invalid/corrupt, when in reality it's a path issue.
@talonchandler
Copy link
Collaborator Author

FWIW these messages have caused me and at least one user some difficulty in using the reader. I think it's worth the effort to carefully choose error messages.

@talonchandler
Copy link
Collaborator Author

Closing this...I/O has moved to iohub which now has much clearer error messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant