1. Home
  2. Computing & Technology
  3. Python

Part 4: Handling Errors the Way You Want

From , former About.com Guide

4 of 7

Reading Python's Error Message: Part 1

Now, let's consider the error message. Python conveniently gives us a traceback of the execution process with the most recent call listed last. Because each part of this program could be held in separate files, possibly being re-used from other applications, Python tells us in which file, on which line number, and in which function each error occurs. All line numbers are listed relative to the file in which they are found -- not relative to the cumulative number of program lines. As the most recent call is listed last, we know that the error messages are nested, each error after the first occuring within the execution of the previous error.

Click to the next page to look at this message line-by-line.

Explore Python
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.