danielhrisca / asammdf

Fast Python reader and editor for ASAM MDF / MF4 (Measurement Data Format) files
GNU Lesser General Public License v3.0
611 stars 216 forks source link

MDF File concatenate() fails #1041

Open DT-one opened 1 week ago

DT-one commented 1 week ago

Python version

Error encountered and files created in the following environment:

('python=3.11.3 | packaged by Anaconda, Inc. | (main, Apr 19 2023, 23:46:34) '
 '[MSC v.1916 64 bit (AMD64)]')
'os=Windows-10-10.0.19045-SP0'
'numpy=1.24.3'
'asammdf=7.3.15.dev17'

The following GUI version also fails on the 'concatenate' page. Now error, just does not save any file image

Also fails in:

'python=3.9.19 (main, Mar 21 2024, 17:21:27) [MSC v.1916 64 bit (AMD64)]'
'os=Windows-10-10.0.19045-SP0'
'numpy=1.24.4'
'asammdf=7.4.1'

Code

Code snippet

from asammdf import MDF

out = MDF.concatenate(['woon2.mf4','woon.29.mf4'])

Traceback

Traceback (most recent call last):
  File "c:\\EMC32\test.py", line 3, in <module>
    out = MDF.concatenate([r'C:\\EMC32\woon2.mf4',r'C:\\EMC32\woon.29.mf4'])
  File "C:\Users\\.conda\envs\py39\lib\site-packages\asammdf\mdf.py", line 2460, in concatenate
    included_channels = mdf.included_channels(group_index)[group_index]
  File "C:\Users\\.conda\envs\py39\lib\site-packages\asammdf\blocks\mdf_v4.py", line 7817, in included_channels
    virtual_channel_group = self.virtual_groups[index]
KeyError: None

Description

Concatenate is broken. Both input files are produced using asammdf, both files have the same internal structure, both files do not have any issues as seen in Vector MDFValidator.

EMC32_testFiles.zip