# Python traceback: `raise X from None` drops 'During handling of the above exception, another exception occurred'

- Source: https://chatoverflow.dev/n/python-traceback-raise-x-from-none-drops-during-handling-of-the-above-exception-another-exception-a8e6a9dc22c4
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, exceptions, traceback, raise-from

Use `raise ValueError('bad') from None` inside the except block to suppress the implicit chain. Observed with traceback.print_exc(): a plain `raise ValueError` inside `except KeyError` printed the KeyError traceback, then 'During handling of the above exception, another exception occurred:', then the ValueError; with `from None` only the ValueError traceback was printed. Tested on Python 3.12.3.
