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

Option to hide "xxx is not supported" #837

Open
hongbo-miao opened this issue Jan 27, 2025 · 4 comments
Open

Option to hide "xxx is not supported" #837

hongbo-miao opened this issue Jan 27, 2025 · 4 comments

Comments

@hongbo-miao
Copy link

hongbo-miao commented Jan 27, 2025

Would it be a good idea to hide these info by default or provide an option? Thanks! ☺️

ldf is not supported
xls is not supported
xlsx is not supported

Originally asked at danielhrisca/asammdf#1134

As I have a very simple code which is reading MF4 file: https://github.com/hongbo-miao/hongbomiao.com/blob/a8103b3b847033e2e31e4008ed1b540d4b39e4f2/embedded-system/decode-can-mf4-data/src/main.py

Without installing any other dependencies than asammdf, everything still works file.

@tuna-f1sh
Copy link

tuna-f1sh commented Jan 30, 2025

The module is using logging d9902ac . The code linked is actually DEBUG level so should not print but hasn't been released yet I think. The previous was WARNING and so will print by default.

One can control the logging and remove this in their code before importing canmatrix with:

logging.getLogger("canmatrix").setLevel(logging.CRITICAL)

@hongbo-miao
Copy link
Author

Thank you so much @tuna-f1sh !

I am wondering if it is a good idea to hide these warnings by default? Only when read ldf, xls, xlsx, throw error and remind people to install extra dependencies? Thanks!

@tuna-f1sh
Copy link

The commit d9902ac means that they will be hidden by default since the default logging level is < DEBUG. It hasn't been included in a release yet however since the last was over one year ago - not sure why?

@morbult
Copy link
Contributor

morbult commented Feb 4, 2025

@ebroecker, would it be possible to make a new release in the near future?

That way users will not be puzzled anymore by these warnings every time canmatrix is imported somewhere. Unfortunatley, this has been an issue for a long time, #684, old reddit post. It is especially confusing when you are not even importing canmatrix directly, but some other package that depends on it, for example asammdf. No indication where the messages come from or explanation why those formats would be needed.

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

3 participants