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

Tdms file issue

rabzgzz opened this issue · comments

Hello,

I'm trying to read a series of tdms files using the "TdmsFile.read()" method in python and I'm getting the following error:

Exception has occurred: ValueError
Segment does not start with b'TDSh', but with b'\x00\x00\x00\x00'

I have a series of 20 tdms files generated from the same source and this error only appears when trying to open a bunch of them (8 files). I checked and these files are all valid as they all start with the TDSm characters. Could you give me any advice on how to address this issue?

Thank you in advance.

Hi, the error says that it's expecting 'TDSh' rather than 'TDSm', so it looks like there's an issue reading the .tdms_index files. Does the error go away if you remove or rename the .tdms_index files?

Hello Adam thank you for your reply! I just tried both things but the error keeps appearing.

Okay, I'm not sure what's going on then. Are you able to provide an example file that reproduces the error?

Sure, the file exceeds the size limit here (even when compressed as .zip). I could send it to you by mail if you agree.

Yep sure, I'm adreeve@gmail.com, thanks

This issue appears to be related to reading the data from a cloud share, as reading the files locally didn't reproduce the error. It's not clear exactly what's going wrong but this can be worked around by copying the files locally, so I'm going to close this issue.