asammdf icon indicating copy to clipboard operation
asammdf copied to clipboard

-1 is not a valid CompressionAlgorithm (during export MDF-Version 4.00)

Open tainnok opened this issue 3 months ago • 5 comments

asammdf-UI raises an exception at export in MDF-Version 4.0 (but working fine with e.g. MDF-Version 4.1).
there is no option in the "Compression" dropdown available if MDF-Version 4.0 is selected, but it seems (according to the exception) some kind of compression is needed.

Notes:
the mdf-file was generated with asammdf-lib, after open it in asammdf-gui and try to export i got the descriped exception.
asammdf-version: 8.6.10
this issue exists since at least 7.3.12 (at least with this version i had the same behavior)

Exception

Error: <class 'ValueError'>	 
-1 is not a valid CompressionAlgorithm

Details: 2025-09-09, 15:33:31
--------------------------------------------------------------------------------
<class 'ValueError'>	 
-1 is not a valid CompressionAlgorithm
--------------------------------------------------------------------------------
  File "C:\xxx\lib\site-packages\asammdf\gui\widgets\file.py", line 2672, in apply_processing
    opts = self._current_options()
  File "C:\xxx\lib\site-packages\asammdf\gui\widgets\file.py", line 2587, in _current_options
    "mdf_compression": CompressionAlgorithm(self.mdf_compression.currentIndex()),
  File "C:\tools\python\Python310\lib\enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "C:\tools\python\Python310\lib\enum.py", line 710, in __new__
    raise ve_exc

Info-Tab in asammdf-ui

Image

Export-Settings

Image

asammdf 'About asammdf-gui' window with version-informations:

Image

tainnok avatar Sep 09 '25 13:09 tainnok

@tainnok please try the development branch

danielhrisca avatar Sep 12 '25 10:09 danielhrisca

@danielhrisca thx for the fast fix. is there anywhere a nightly-build of the development-branch? or does i have to build somehow from sources? (i read that a c-toolchain is needed?)

tainnok avatar Sep 15 '25 13:09 tainnok

In the actions (https://github.com/danielhrisca/asammdf/actions) you have to go to the wheels jobs and grab the artifact from the bottom of the page (example https://github.com/danielhrisca/asammdf/actions/runs/17726007956)

danielhrisca avatar Sep 15 '25 13:09 danielhrisca

thx, i take this one:

(example https://github.com/danielhrisca/asammdf/actions/runs/17726007956)

and yes, this does not raise that exception. So it seems the export for MDF <= 4.0 is working again.

THX :)

tainnok avatar Sep 15 '25 13:09 tainnok

@danielhrisca BUT: i just seen another topic, not sure how it should be, but:

in the original file i got this:

Image

in the exported file i got this:

Image

So the "Measurement start time" is identical, but the "time-zone information" (highlighted) is different. I guess that's not planned like this?

If you confirm and this is not an expected behavior i can open a new issue for that if needed.

tainnok avatar Sep 15 '25 13:09 tainnok