[IPython-dev] bug with ??

David Huard david.huard at gmail.com
Mon May 7 14:46:28 EDT 2007


Hi, 

I get the following on Ubuntu running a Xeon processor. I noticed this
bug on a couple of other functions too, and unless I'm mistaken, it
appeared about one or two months ago. 


IPython 0.8.1 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import numpy

In [2]: numpy.ma.maximum??
---------------------------------------------------------------------------
exceptions.TypeError                                 Traceback (most recent call last)

/usr/local/lib/python2.4/site-packages/IPython/iplib.py in multiline_prefilter(self, line, continue_prompt)
   2273         out = []
   2274         for l in line.rstrip('\n').split('\n'):
-> 2275             out.append(self._prefilter(l, continue_prompt))
   2276         return '\n'.join(out)
   2277 

/usr/local/lib/python2.4/site-packages/IPython/iplib.py in _prefilter(self, line, continue_prompt)
   2170             handler = self.esc_handlers.get(iFun[0:1])
   2171         if handler is not None:
-> 2172             return handler(line,continue_prompt,pre,iFun,theRest)
   2173         # Emacs ipython-mode tags certain input lines
   2174         if line.endswith('# PYTHON-MODE'):

/usr/local/lib/python2.4/site-packages/IPython/iplib.py in handle_help(self, line, continue_prompt, pre, iFun, theRest)
   2414             if line:
   2415                 #print 'line:<%r>' % line  # dbg
-> 2416                 self.magic_pinfo(line)
   2417             else:
   2418                 page(self.usage,screen_lines=self.rc.screen_length)

/usr/local/lib/python2.4/site-packages/IPython/Magic.py in magic_pinfo(self, parameter_s, namespaces)
    771         else:
    772             self._inspect('pinfo', oname, detail_level=detail_level,
--> 773                           namespaces=namespaces)
    774 
    775     def magic_psearch(self, parameter_s=''):

/usr/local/lib/python2.4/site-packages/IPython/Magic.py in _inspect(self, meth, oname, namespaces, **kw)
    705                 pmethod(info.obj,oname,formatter)
    706             elif meth == 'pinfo':
--> 707                 pmethod(info.obj,oname,formatter,info,**kw)
    708             else:
    709                 pmethod(info.obj,oname)

/usr/local/lib/python2.4/site-packages/IPython/OInspect.py in pinfo(self, obj, oname, formatter, info, detail_level)
    482                               'Calling definition not available.')
    483                 else:
--> 484                     out.write(header('Call def:\t')+self.format(call_def))
    485                 call_ds = getdoc(obj.__call__)
    486                 if call_ds:

TypeError: cannot concatenate 'str' and 'NoneType' objects

Cheers,
David





More information about the IPython-dev mailing list