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

Preserve raw labview timestamps when defragmenting #319

Open
jimkring opened this issue Jan 24, 2024 · 0 comments
Open

Preserve raw labview timestamps when defragmenting #319

jimkring opened this issue Jan 24, 2024 · 0 comments

Comments

@jimkring
Copy link
Contributor

Issue #200 added support for reading timestamps as raw TDMS timestamps. However, the TDMSWriter defragment function does not preserve this raw timestamp information when writing the defragmented file.

I tried to modify the defragment method by passing raw_timestamp=True to the TDMS reader, but that results in an error when writing back the file.
Here’s that error:

File "defrag-py", line 31, in defragment new_file.write_ segment ([ChannelObject
File "venv\Lib\site-packages \nptdms \writer-py", line 149, in write segment segment. write(self._file)
File "venv\Lib\site-packages \nptdms writer-py", line 187, in write
metadata = self.metadata)
AAAAAAAAAAAAAAA
File "venv\Lib\site-packages \nptdms\writer-py", line 204, in metadata properties - read_ properties_dict(obj-properties)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv\Lib\site-packages \nptdms writer.py", line 358, in read_properties dict return OrderedDict(
AAAAAAAAAAAA
File "venv\Lib\site-packages \nptdms \writer.py", line 359, in ‹genexpr» (key, _to_tdms_value(val))
лАААААААААААААААААА
File "venv\Lib\site-packages \nptdms writer.py", line 382, in _to_tdms_value raise TypeError ("Unsupported property type for %™ % value)
TypeError: Unsupported property type for TdmsTimestamp(3779986269, 6576073492611989504)
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

No branches or pull requests

1 participant