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

Adjust return value for image load error in extract line & line path #665

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rlskoeser
Copy link

The _extract_line and _extract_path_line methods currently return a 3-tuple instead of a 2-tuple when there is an error loading the image file. This causes an error when the extract function is called by map or imap_unordered - it looks like a code error and it took me some digging to determine I was not setting the image path correctly for the build_binary_dataset method to be able to load the image files.

I've revised to return two values instead of three and added logging so that it will be easier to diagnose image problems; I wasn't sure if it should be a warning or an error, so kept it as a warning.

I added a unit test based on the existing tests for the build_binary_dataset method.

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

Successfully merging this pull request may close these issues.

1 participant