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

"Object" level error should not fail without --raise-on-error on segmentation #443

Closed
PonteIneptique opened this issue Feb 16, 2023 · 1 comment

Comments

@PonteIneptique
Copy link
Contributor

My current understanding of --raise-on-error is that it should act as a method for deeply "debugging" a set of document or Kraken directly. Unfortunately, the blla.segment has some raising at the line level which prevent the full document to be processed:

except Exception as e:
raise
logger.warning(f'Polygonizer failed on line {idx}: {e}')
polygons.append(None)

I proposed a first potential patch in #442 but if I were to propose a "better" patch, I would probably add a raise_on_error parameter to blla.segment and segmentation.calculate_polygonal_environment to decide between logging and raising at line 730.

I'll propose a second patch, so that you don't have to code it yourself, and choose the version you prefer.

@mittagessen
Copy link
Owner

Thanks, I merged them.

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

2 participants