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

ENH: capture all errors logged by gdal when opening a file fails #495

Conversation

theroggy
Copy link
Member

@theroggy theroggy commented Nov 10, 2024

This was present in Rasterio (rasterio/rasterio#2526) and has been included in fiona::_err recently (Toblerity/Fiona#1408)... so this PR is based on the change there.

Closes #491

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this! Added a few quick questions

Do you have a link to the PRs that added this to rasterio/fiona (that might have some background)?

Copy link
Member

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @theroggy ! A few suggestions re: naming things.

@theroggy
Copy link
Member Author

theroggy commented Nov 12, 2024

Do you have a link to the PRs that added this to rasterio/fiona (that might have some background)?

I added links to them in the PR description...

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A few more comments/questions

@brendan-ward
Copy link
Member

This appears to be raising a lot of test errors on GDAL 3.4.3 specifically; is that expected?

@theroggy
Copy link
Member Author

theroggy commented Nov 28, 2024

This appears to be raising a lot of test errors on GDAL 3.4.3 specifically; is that expected?

No... I've had a look at it... but I didn't really see why these errors occur... and even less why these changes triggered them to start failing. If you have an idea... very welcome.

@theroggy
Copy link
Member Author

theroggy commented Dec 4, 2024

@brendan-ward I found and fixed the issue with gdal < 3.5.2...

Copy link
Member

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating @theroggy ; just a few minor comments.

Copy link
Member

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @theroggy !

@brendan-ward brendan-ward merged commit ea3d23f into geopandas:main Dec 6, 2024
22 checks passed
@theroggy theroggy deleted the ENH-capture-all-errors-logged-by-gdal-when-opening-a-file-fails branch December 6, 2024 00:15
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.

ENH: keep full gdal error when error is thrown by gdal while reading a file
3 participants