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

Error when selecting certain folders in the import file browser #21

Closed
yoda-vid opened this issue Apr 28, 2021 · 1 comment
Closed

Error when selecting certain folders in the import file browser #21

yoda-vid opened this issue Apr 28, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@yoda-vid
Copy link
Collaborator

@clifduhn reported that a crash can occur when opening the Import file browser and selecting certain folders. This appears to be related to trying to parse filenames in the folder.

@yoda-vid yoda-vid added the bug Something isn't working label Apr 28, 2021
@yoda-vid yoda-vid added this to the v1.4.0 milestone Apr 29, 2021
@yoda-vid
Copy link
Collaborator Author

The crash occurs when selecting a folder to import, but the first file cannot be opened by skimage.io.imread. This may happen when a non-image file happens to be in a folder to be imported, but may also happen when inadvertently selecting a folder in the import file browser and then clicking on the open rather than the cancel button.

The fix is to catch image read exceptions, proceeding to the next file until an image is found. May want to filter files at this setup stage or provide more explicit warning regarding unloadable files since the import will likely fail in the next step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant