title: How do I suppress tracebacks in Jupyter?
body: <p>I want to hide tracebacks in my Python code in Jupyter notebooks, so only the error type and message are displayed. </p>
  
  <p><a href="https://stackoverflow.com/a/27674608/1013457">This answer</a> suggests <code>sys.tracebacklimit = 0</code> but trying that gave the following:</p>
  
  <pre>
  ERROR:root:Internal Python error in the inspect module.
  Below is the traceback from this internal error.
  
  ERROR:root:Internal Python error in the inspect module.
  Below is the traceback from this internal error.
  
  Traceback (most recent call last): 
  AssertionError 
  Traceback (most recent call last): 
  AssertionError
  </pre>
  
  <p>That answer also suggests replacing <code>sys.excepthook</code> with a custom function, but the traceback was still displayed. </p>
  
  <p>How can I hide the traceback?</p>