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

UserWarning: Could not parse CG block names tag #203

Open
younesr1 opened this issue May 10, 2022 · 1 comment
Open

UserWarning: Could not parse CG block names tag #203

younesr1 opened this issue May 10, 2022 · 1 comment

Comments

@younesr1
Copy link

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
Copy link
Owner

ratal commented May 10, 2022

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")'

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

2 participants