Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
Is there a way to make python showtraceback in jupyter notebooks scrollable?

Or if there are scrolling functionalities built in, to edit the scrolling settings?

I tried this but it didn't work --

def test_exception(self, etype, value, tb, tb_offset=None):
    try:
        announce = Announce(etype, value)
        if announce.print:
            announce.title()
            announce.tips()
            announce.resources()
            announce.feedback()
            announce.scroll(self, etype, value, tb, tb_offset)
        #self.showtraceback((etype, value, tb), tb_offset=tb_offset)
    except:
        self.showtraceback((etype, value, tb), tb_offset=tb_offset)
    def scroll(self, etype, value, tb, tb_offset=None):
        b=widgets.HTML(
        value=self.showtraceback((etype, value, tb), tb_offset=tb_offset),
        placeholder='Some HTML',
        description='Some HTML',
        disabled=True
        )
        a = HBox([b], layout=Layout(height='20px', overflow_y='10px'))
        display(a)
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Try going to cell > current outputs > toggle scrolling in the Jupyter UI to enable scrolling output for a cell.

over 4 years ago · Santiago Trujillo Report

0

If you aren't seeing enough traceback information, you can always print it directly:

import traceback
try: 
    raise Exception('thing')
except:
    TraceBackString = traceback.format_exc()
    print(TraceBackString)

produces:

Traceback (most recent call last):
  File "yourfilehere", line 19, in <module>
    raise Exception('thing')
Exception: thing
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!