[IPython-dev] IPython bug in tracebacks

Gary Bishop gb at cs.unc.edu
Tue Jun 10 15:24:48 CDT 2003


The cool traceback printing code in ultraTB.py fails if a program uses 
a module from the current directory but changes it works directory 
before the traceback.

The problem originates in inspect.getinnerframes in VerboseTB.text. 
getinnerframes calls inspect.getsourcefile which insists on 
os.path.exists(filename) before it will return filename. Problem is 
after the chdir, os.path.exists will return false for things that 
aren't full pathnames.

I think this is a bug in inspect and I have posted a message to 
comp.lang.python expressing that opinion. We'll see if it gets a 
response. Meantime, watch out for this problem in IPython.

gb



More information about the IPython-dev mailing list