manim icon indicating copy to clipboard operation
manim copied to clipboard

Add stack trace to warnings

Open GniLudio opened this issue 3 months ago • 7 comments

Description of proposed feature

Warnings messages to the user should include the stack trace, so the user knows where it was caused from.

logger.warning(
    "Don't do ...",
    stack_info=True,
    stacklevel=2,
)

GniLudio avatar Sep 01 '26 16:09 GniLudio

Would you like this applied to every Manim logger warning, or only warnings caused by user scene code? I can add focused output tests once the intended scope is confirmed.

RRXXZZYY avatar Sep 01 '26 16:09 RRXXZZYY

Would you like this applied to every Manim logger warning, or only warnings caused by user scene code? I can add focused output tests once the intended scope is confirmed.

The warning should show the user where he/she did something wrong.

GniLudio avatar Sep 01 '26 16:09 GniLudio

IMO such stack traces should mostly occur when the action is performed in userland - if the library itself is doing something stupid, that should ideally be caught by tests.

Also @RRXXZZYY, I just wanted to mention: reading the phrasing of your comment and looking at your profile, it seems like you have a pretty AI-heavy work flow. If you are intending to submit a (mostly) AI-generated PR for this, could I perhaps suggest that you give someone else a chance to "hand-build" a solution first? This seems like a really really good issue for a first-time open source contributor so it would be nice to give a complete newbie the chance to try and implement this 😊

nikolajmunk avatar Sep 01 '26 16:09 nikolajmunk

That is fair. I use AI in my workflow, and I do not want to crowd out a first-time contributor here, so I will step back from this issue. Thanks for raising it.

RRXXZZYY avatar Sep 02 '26 05:09 RRXXZZYY

Thanks @RRXXZZYY, I really appreciate it! Hope we see you again soon on another issue šŸ‘

nikolajmunk avatar Sep 02 '26 05:09 nikolajmunk

Hi, I’d like to take this one. Could you assign it to me?

pranjalimahatme avatar Oct 18 '26 09:10 pranjalimahatme

Hi @pranjalimahatme, the Manim community usually doesn't assign issues to people. You "assign" the issue to yourself simply by submitting a PR which addresses the issue. If you don't feel like you're able to solve the entire problem right away, you're welcome to open a draft PR and discuss/work on it in steps. See Manim's development guide for more info on this.

We look forward to your contribution!

nikolajmunk avatar Oct 18 '26 09:10 nikolajmunk