Solid-Energy-Systems / NewareNDA

Python module and command line tool for reading and converting Neware nda and ndax battery cycling data files.
BSD 3-Clause "New" or "Revised" License
17 stars 10 forks source link

NewareNDA: try and except remark bytes to ASCII conversion #68

Closed Grimler91 closed 6 months ago

Grimler91 commented 6 months ago

Some old nda files in my lab have bogus remark bytes (either files have become partially corrupt, or some BTS update has had breaking changes), and trying to convert to ASCII gives an error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xa8 in position 10: ordinal not in range(128)

Handle this in NewareNDA and set remarks to empty string if conversion fails.

Grimler91 commented 6 months ago

This PR conflicts with https://github.com/Solid-Energy-Systems/NewareNDA/pull/71. I propose we hold off with this one and wait for 71 to land, after which I can rebase and update this PR.