# Suppress/Catch warning and error messages in python

**URL:** <https://forum.aousd.org/t/suppress-catch-warning-and-error-messages-in-python/1926>\
**Category:** USD\
**Created:** [October 17, 2024, 8:38pm UTC](https://forum.aousd.org/t/suppress-catch-warning-and-error-messages-in-python/1926 "2024-10-17T20:38:27Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![nvmkuruc](https://avatars.discourse-cdn.com/v4/letter/n/76d3ee/32.png) [@nvmkuruc](https://forum.aousd.org/u/nvmkuruc)\
**Post date:** [October 22, 2024, 5:21pm UTC](https://forum.aousd.org/t/suppress-catch-warning-and-error-messages-in-python/1926/5 "2024-10-22T17:21:13Z")

</div>

As an alternative, on this thread we suggested that perhaps `TF_WARN` should integrate with the `warning` module via `PyError_Warn`. That would surface OpenUSD warnings as native python warnings (similar to how OpenUSD errors are surfaced as pyton exceptions) without having to rely on delegates to do filtering.

[Integrating USD Tf.Warn with Python logging.Logger - Community / USD - Alliance for OpenUSD (aousd.org)](https://forum.aousd.org/t/integrating-usd-tf-warn-with-python-logging-logger/1221/3)

---

_[View the full topic](https://forum.aousd.org/t/suppress-catch-warning-and-error-messages-in-python/1926)._
