Dear all,

In four different copies of Sage 6.6 on three different computers, I get 
the below traceback whenever I try to do introspection.  I tried deleting 
".sage" and ".ipython" but to no avail.  I poked at it in pdb, and the 
"object" argument at the last stage is, as you would expect, the "built-in 
function range".   In detail, the systems are Linux (RHEL 6.*, built from 
source), OS X 10.8 (built from source), OS X 10.9 (binary installer, built 
from source). 

Is this a known issue?   

Thanks,

Nathan

--------

sage: range?

---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

<ipython-input-1-a13e96925d1e> in <module>()

----> 1 get_ipython().magic(u'pinfo range')


/pkgs/tmp/sage/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc
 
in magic(self, arg_s)

*   2302*         magic_name, _, magic_arg_s = arg_s.partition(' ')

*   2303*         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)

-> 2304         return self.run_line_magic(magic_name, magic_arg_s)

*   2305* 

*   2306*     
#-------------------------------------------------------------------------


/pkgs/tmp/sage/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc
 
in run_line_magic(self, magic_name, line)

*   2223*                 kwargs['local_ns'] = sys._getframe(stack_depth).
f_locals

*   2224*             with self.builtin_trap:

-> 2225                 result = fn(*args,**kwargs)

*   2226*             return result

*   2227* 


/pkgs/tmp/sage/local/lib/python2.7/site-packages/IPython/core/magics/namespace.pyc
 
in pinfo(self, parameter_s, namespaces)


/pkgs/tmp/sage/local/lib/python2.7/site-packages/IPython/core/magic.pyc in 
<lambda>(f, *a, **k)

*    191*     # but it's overkill for just that one bit of state.

*    192*     def magic_deco(arg):

--> 193         call = lambda f, *a, **k: f(*a, **k)

*    194* 

*    195*         if callable(arg):


/pkgs/tmp/sage/local/lib/python2.7/site-packages/IPython/core/magics/namespace.pyc
 
in pinfo(self, parameter_s, namespaces)

*     59*         else:

*     60*             self.shell._inspect('pinfo', oname, 
detail_level=detail_level,

---> 61                                 namespaces=namespaces)

*     62* 

*     63*     @line_magic


/pkgs/tmp/sage/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc
 
in _inspect(self, meth, oname, namespaces, **kw)

*   1567*                 pmethod(info.obj, oname, formatter)

*   1568*             elif meth == 'pinfo':

-> 1569                 pmethod(info.obj, oname, formatter, info, **kw)

*   1570*             else:

*   1571*                 pmethod(info.obj, oname)


/pkgs/tmp/sage/local/lib/python2.7/site-packages/IPython/core/oinspect.pyc 
in pinfo(self, obj, oname, formatter, info, detail_level)

*    638*         - detail_level: if set to 1, more information is given.

*    639*         """

--> 640         text = self._format_info(obj, oname, formatter, info, 
detail_level)

*    641*         if text:

*    642*             page.page(text)


/pkgs/tmp/sage/local/lib/python2.7/site-packages/IPython/core/oinspect.pyc 
in _format_info(self, obj, oname, formatter, info, detail_level)

*    576*         """Format an info dict as text"""

*    577*         info = self.info(obj, oname=oname, formatter=formatter,

--> 578                             info=info, detail_level=detail_level)

*    579*         displayfields = []

*    580*         def add_fields(fields):


/pkgs/tmp/sage/local/lib/python2.7/site-packages/IPython/core/oinspect.pyc 
in info(self, obj, oname, formatter, info, detail_level)

*    728*         # Filename where object was defined

*    729*         binary_file = False

--> 730         fname = find_file(obj)

*    731*         if fname is None:

*    732*             # if anything goes wrong, we don't want to show 
source, so it's as


/pkgs/tmp/sage/local/lib/python2.7/site-packages/sage/misc/sageinspect.pyc 
in sage_getfile(obj)

*   1181* 

*   1182*     # No go? fall back to inspect.

-> 1183     sourcefile = inspect.getabsfile(obj)

*   1184*     if sourcefile.endswith(os.path.extsep+'so'):

*   1185*         return sourcefile[:-3]+os.path.extsep+'pyx'


/pkgs/tmp/sage/local/lib/python/inspect.pyc in getabsfile(object, _filename)

*    464*     normalizes the result as much as possible."""

*    465*     if _filename is None:

--> 466         _filename = getsourcefile(object) or getfile(object)

*    467*     return os.path.normcase(os.path.abspath(_filename))

*    468* 


/pkgs/tmp/sage/local/lib/python/inspect.pyc in getsourcefile(object)

*    442*     Return None if no way can be identified to get the source.

*    443*     """

--> 444     filename = getfile(object)

*    445*     if string.lower(filename[-4:]) in ('.pyc', '.pyo'):

*    446*         filename = filename[:-4] + '.py'


/pkgs/tmp/sage/local/lib/python/inspect.pyc in getfile(object)

*    418*         return object.co_filename

*    419*     raise TypeError('{!r} is not a module, class, method, '

--> 420                     'function, traceback, frame, or code 
object'.format(object))

*    421* 

*    422* ModuleInfo = namedtuple('ModuleInfo', 'name suffix mode 
module_type')


TypeError: <built-in function range> is not a module, class, method, 
function, traceback, frame, or code object

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to