#14579: notebook / inspection error
------------------------+---------------------------------------------------
Reporter: cnassau | Owner: jason, mpatel, was, kini
Type: defect | Status: new
Priority: major | Milestone: sage-5.10
Component: notebook | Keywords: notebook, traceback
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
------------------------+---------------------------------------------------
I got this Traceback with a notebook based on Sage 5.9:
{{{
G = matrix([[2 for u in (1,..,21)] for v in (1,..,21)])
print G
}}}
{{{
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_47.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
-*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("RyA9IG1hdHJpeChbWzIgZm9yIHUgaW4gKDEsLi4sMjEpXSBmb3IgdiBpbiAoMSwuLiwyMSldKQpwcmludCBH"),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmp6hJvFE/___code___.py", line 4, in <module>
exec compile(u'print G
File "", line 1, in <module>
File "matrix0.pyx", line 1729, in sage.matrix.matrix0.Matrix.__repr__
(sage/matrix/matrix0.c:9374)
File "/waste/cn/sage-5.9/local/lib/python2.7/site-
packages/sage/misc/sageinspect.py", line 1915, in sage_getvariablename
for frame in inspect.stack():
File "/waste/cn/sage-5.9/local/lib/python/inspect.py", line 1054, in
stack
return getouterframes(sys._getframe(1), context)
File "/waste/cn/sage-5.9/local/lib/python/inspect.py", line 1032, in
getouterframes
framelist.append((frame,) + getframeinfo(frame, context))
File "/waste/cn/sage-5.9/local/lib/python/inspect.py", line 1007, in
getframeinfo
lines, lnum = findsource(frame)
File "/waste/cn/sage-5.9/local/lib/python/inspect.py", line 528, in
findsource
if not sourcefile and file[0] + file[-1] != '<>':
IndexError: string index out of range
}}}
The code works as expected in a Sage shell.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14579>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.