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
Creating scene with SEVIRI HRIT reader fails with UnicodeDecodeError #2073
Comments
@pdebuyl do you have an idea what is happening here? |
It looks like a file is getting opened in text mode instead of binary mode. |
Looks like the indicated PR assumed |
I started with the |
Two solutions:
def __init__(self, filename, *args, mode='rb', **kwargs):
"""Keep filename and mode."""
self.filename = filename
self.open_args = args
self.open_kwargs = kwargs | {'mode': mode}
I don't know if you would have a preference beween those two solutions. |
I went with "explicit" to avoid bypassing the defaults of the regular |
The |
Hi @djhoese I did submit a PR with an explicit |
Sounds good. Thanks. |
Describe the bug
Reading SEVIRI HRIT files fails with UnicodeDecodeError upon scene creation.
To Reproduce
Expected behavior
Success.
Actual results
Environment Info:
Additional context
Fails with Satpy main. Succeeds with Satpy 0.35.0. git bisect suggests this bug was introduced in 78ef550.
The text was updated successfully, but these errors were encountered: