adamreeve / npTDMS

NumPy based Python module for reading TDMS files produced by LabView

Home Page:http://nptdms.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle string data in interleaved segments with a single data channel

admond-lee-mu opened this issue · comments

Hi,

In tdms file Sample.zip which opens totally fine with Lab View throws exception:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 10: invalid start byte

As far as I have tried, I guess this is because of the limitation of this package.
Do you have any idea or solution?

Thanks in advance.

Note. Text is enciphered on purpose.

Hi @admond-lee-mu, it looks like the issue is that your file contains string data in an interleaved data segment, which npTDMS doesn't handle correctly. Having interleaved string data doesn't make much sense to me as string values can vary in size, but it looks like these segments only contain a single channel so should be able to be treated as if they're non-interleaved. I should be able to implement a fix for this shortly.

This has been fixed in version 1.3.0