#5282: In %python mode in the notebook, tracebacks are not properly reported
------------------------+---------------------------------------------------
Reporter: wasI | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-3.3
Component: interfaces | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Changes (by was):
* reporter: was => wasI
Old description:
New description:
Type
{{{
%python
os.chdir(1,2,2)
}}}
into a notebook cell in sage <= 3.3.rc0 and you will get this
as output
{{{
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/wstein/.sage/sage_notebook/worksheets/admin/42/code/14.py",
line 6, in <module>
print _support_.syseval(python, ur'''os.chdir(1,2,2)''',
'/Users/wstein/.sage/sage_notebook/worksheets/admin/42/cells/35')
File "/Users/wstein/build/build/sage-3.3.alpha3/local/lib/python2.5
/site-packages/sage/server/support.py", line 321, in syseval
return system.eval(cmd)
TypeError: eval() takes at least 3 arguments (2 given)
}}}
That's bad since it's giving a traceback based on an error in the use of
the system.eval method by the sage notebook itself in server/support.py!
In Sage mode one gets:
{{{
os.chdir(1,2,2)
}}}
outputs
{{{
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/wstein/.sage/sage_notebook/worksheets/admin/42/code/15.py",
line 7, in <module>
os.chdir(_sage_const_1 ,_sage_const_2 ,_sage_const_2 )
File "/Users/wstein/build/build/sage-3.3.alpha3/local/lib/python2.5
/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in <module>
TypeError: chdir() takes exactly 1 argument (3 given)
}}}
That's much better -- at least it is the right exception. Of course the
spurious reference ot SQLAlchemy is yet another bug...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5282#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---