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

Handle corrupt files #236

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Conversation

mplough-kobold
Copy link
Contributor

Previously, #76 attempted to handle corruption by setting up a libraw dataerror_handler. #229 refined #76 but there are segfaults.

This PR handles corruption in a different way: We ask libraw how many data errors occurred when reading the file and raise an exception if there were more than zero. The test data from #229 was particularly useful in verifying that the method works.

Fixes #228.

@mplough-kobold mplough-kobold mentioned this pull request Aug 9, 2024
rawpy/_rawpy.pyx Show resolved Hide resolved
@letmaik letmaik merged commit d44352e into letmaik:main Sep 12, 2024
43 checks passed
@mplough-kobold mplough-kobold deleted the matt-handle-corrupt-files branch September 12, 2024 14:45
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.

catching corruptions
2 participants