Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Getting the Most Out of a Python Traceback (Summary)

The Python traceback contains useful information that can help you find what is going wrong in your Python code. These tracebacks can look a little intimidating, but once you break it down to see what it’s trying to show you, they can be super helpful.

Going through a few tracebacks line by line will give you a better understanding of the information they contain and help you get the most out of them. Getting a Python traceback output when you run your code is an opportunity to improve your code. It’s one way Python tries to help you out.

Now that you know how to read a Python traceback, you can benefit from learning more about some tools and techniques for diagnosing the problems that your traceback output is telling you about. Python’s built-in traceback module can be used to work with and inspect tracebacks. The traceback module can be helpful when you need to get more out of the traceback output. It would also be helpful to learn more about some techniques for debugging your Python code.

Download

Sample Code (.zip)

4.5 KB

Download

Course Slides (.pdf)

406.0 KB

Comments & Discussion

WoBa on June 9, 2020

Cool but too short. Python traceback module should at least be demonstrated.

Alan ODannel on June 11, 2020

A good course, I would have liked to have a little more information.

Wiggers on June 24, 2020

It was just enough detail for me IMHO

Rishi on July 2, 2020

Course was too short.Expected a broader concept coverage

Become a Member to join the conversation.