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

Update _cdf.py #26

Closed
wants to merge 7 commits into from
Closed

Update _cdf.py #26

wants to merge 7 commits into from

Conversation

gregstarr
Copy link
Contributor

adding a try/except to _process_return_multi_z_attr when decoding characters so that when uninterpretable characters are encountered, they are just replaced with some filler character but the user can still access the data.

rstoneback and others added 7 commits September 13, 2018 07:00
DOC: added install instructions for python 2.7 (Mac)
Updates for pysat compatibility
adding a try/except to `_process_return_multi_z_attr` when decoding characters so that when uninterpretable characters are encountered, they are just replaced with some filler character but the user can still access the data.
@gregstarr
Copy link
Contributor Author

Hello, I was trying to read the SWARM level 1 B langmuir probe files (https://swarm-diss.eo.esa.int/#swarm%2FLevel1b%2FLatest_baselines%2FEFIx_LP) and was getting an error. I didn't do a huge amount of investigating, but found that the error was a UnicodeDecodeError which occurred when trying to read the metadata.

Here is a picture of the error:

image

I am proposing the change in this PR because I think even if there are parts of the file that can't be read, the user would still want to read as much as possible. I noticed that when I paused at the error, all the actual numerical data had been loaded already, I was just missing the metadata. With the changes in this PR, I was able to read the file, pictured below:

image

@rstoneback
Copy link
Collaborator

Hi @gregstarr! Thanks for reporting an issue and especially for putting forward a fix.

Can you update the pull to target the develop branch?

I'm a bit tied up with the start of the year but I have this down to test out this coming week. Cheers.

@gregstarr gregstarr changed the base branch from main to develop January 5, 2021 21:06
@gregstarr
Copy link
Contributor Author

gregstarr commented Jan 5, 2021

Oh, crap I should have done this off of develop, my bad. I'm not sure I want to mess with rebasing. I think I will just make a new PR

see: #28

@gregstarr gregstarr closed this Jan 5, 2021
@gregstarr gregstarr mentioned this pull request Jan 5, 2021
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.

None yet

4 participants