ratal / mdfreader

Read Measurement Data Format (MDF) versions 3.x and 4.x file formats in python
Other
169 stars 73 forks source link

UserWarning: Could not parse CG block names tag #203

Open younesr1 opened 2 years ago

younesr1 commented 2 years ago

Python version

Please write here the output of printing sys.version '3.8.9 (default, ) \n[Clang 13.1.6 (clang-1316.0.21.2.3)]'

Platform information

Please write here the output of printing platform.platform() 'macOS-12.1-arm64-arm-64bit'

Numpy version

Please write here the output of printing numpy.__version__ '1.22.3'

mdfreader version

Please write here the output of printing mdfreader.__version__ 4.1

Description

Please describe the issue pr error stack here and eventually script used to use mdfreader Upon constructing an Mdf instance with mdfreader.Mdf, I see a warning that the module was unable to parse the "CG block names tag". The warning seems to be printed here. The warning does not seem to affect my processing of the mf4 file. I am able to read the relevant signals.

  1. Could someone please explain what the warning means? I'm not sure I understand what a comment block is?
  2. Would it be a good idea to have a way to disable these warnings in the constructor?

Also mentioning version of mdf file will be helpful (using mdfvalidator or mdfreader if functional for reading) mf4 file version is 410

print of issue related variables at the errors location and eventually mdfvalidator screenshots can help troubleshooting complicated issues UserWarning: Could not parse CG block names tag warn('Could not parse CG block names tag')

ratal commented 2 years ago

Hi, A comment block is an xml that should follow a schema. If it is malformed, a warning is thrown. You might see this issue as well in MDFValidator if you want to dig more about the comment issue. You could use https://docs.python.org/3/library/warnings.html to tweak the level of warnings in your script, like 'warnings.filterwarnings("ignore")'