How to trace Pydantic serializer warning without traceback #9317
Replies: 8 comments 2 replies
-
bump |
Beta Was this translation helpful? Give feedback.
-
This warning is emitted in |
Beta Was this translation helpful? Give feedback.
-
I find myself in a very similar position as well. An improvement to the logs would be greatly appreciated!
… On Jul 1, 2024, at 10:01 AM, James Braza ***@***.***> wrote:
Hello @Viicos <https://github.com/Viicos> happy to see your name here.
So I inherited a sizable app that is also nondeterministic in nature, and this message seems to randomly appears in the logs. I have failed to figure out where it comes from, hence why I made the original post here. Any tips on how to figure out where the error comes from?
Thinking about this, Pydantic internals emitting a warning without context is not ideal. Is there any way Pydantic can link a full stack trace, or use f-strings to show the field name having a type mismatch?
—
Reply to this email directly, view it on GitHub <#9317 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BGS7NLJHGCEJCK7OZB252E3ZKFOMZAVCNFSM6AAAAABGYHE3TOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TSMRWGAZTC>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
Logging the class name would be great to have to help debug these warnings. |
Beta Was this translation helpful? Give feedback.
-
are there any rust ppl that can show a poor soul how to set up a debug environment for this? i will repay in trying to add more information to the warnings here |
Beta Was this translation helpful? Give feedback.
-
Tagging along, as I am also in the same boat. (Encountering a similar issue) |
Beta Was this translation helpful? Give feedback.
-
In the same boat. Echoing @aodj-kara : Edit: Solved my particular issue by stepping through with the debugger. Wasn't a great experience. In addition to the class name, I would also like to know the field which is raising the warning. |
Beta Was this translation helpful? Give feedback.
-
pydantic/pydantic-core#1799 Adds the field name as a start to giving better location context. Next steps tracked in #10495. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In my application logs this warning shows up:
The traceback doesn't seem to propagate further than this, so I have no idea where in my code this error is coming from.
How can I hunt this down further?
Beta Was this translation helpful? Give feedback.
All reactions