[IPython-dev] IPython bug in tracebacks

Fernando Perez fperez at colorado.edu
Tue Jun 10 20:38:05 EDT 2003

Gary Bishop wrote:
> 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.

I think I recall recently running into another inspect problem which sounds 
similar.  But unfortunately I can't quite recall exactly what it was.  inspect 
  seems to have been coded with rather 'optimistic' assumptions in many 
places, and it seems to produce not too graceful failures rather easily.  I 
wish I'd been a bit more diligent in documenting this, so I could submit a 
patch for inspect itself (besides building a workaround in ipython).

Thanks for the heads-up, though.

My university's news server seems to be down, so I'll have to wait for the 
google archives to pick up this thread before I can read it.



More information about the IPython-dev mailing list