[IPython-user] Problem with IPShellEmbed

Fernando Perez Fernando.Perez at colorado.edu
Fri Jan 28 12:45:57 CST 2005

Michael Foord wrote:
> Fernando Perez wrote:
>>Michael Foord wrote:
>>>I've encountered a problem with IPShellEmbed, for my Movable Python 
>>>project. It's quite likely that this problem is my fault - but I 
>>>would still appreciate help ! It looks like a frame object is 
>>>expected and None is returned.
>>>Basically *sometimes* a call to IPShellEmbed will fail :
>>>ipshell = IPShellEmbed(argv, banner=banner)
>>>The error raised occurs in :
>>>  File "C:\Python24\Lib\site-packages\IPython\Itpl.py", line 182, in 
>>>    while frame.f_globals["__name__"] == __name__: frame = frame.f_back
>>>AttributeError: 'NoneType' object has no attribute 'f_globals'
>>Very, very strange.  It seems like you have a stack with a bogus frame 
>>somewhere.  Here's something to try: in the Itpl.py file, around line 
>>182, comment out 3 lines and add a _getframe as follows:
> Ha -and another thing, it only seems to happen with python 2.4..
> I've attempted to reproduce the problem at work on a machine with Python 
> 2.3. I don't see the same problem.... I can *definitely* only confirm 
> this later - when I get a chance to test again under Python 2.4.

Well, it _could_ be a python2.4 bug.  If you track it down to that, make sure 
to report it on sf, they are gearing up for a 2.4.1 release.



More information about the IPython-user mailing list