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

Always seek to beginning of readable file before reading, and raise error if no bytes can be read #492

Open
brendan-ward opened this issue Nov 7, 2024 · 0 comments
Milestone

Comments

@brendan-ward
Copy link
Member

Per read-related issues raised in GeoPandas #3379.

If user writes to an open file (perhaps an in-memory temporary file) but does not reset the read pointer via seek to the beginning of the file, we attempt to read from the end of the file, read no bytes into the in-memory file we create, and then GDAL raises a confusing error because the input file in the in-memory file is not valid.

If the file is seekable, we should be able to seek to the beginning. Then, we can raise an error if there were no bytes read.

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

1 participant