Ticket #1458 (closed defect: duplicate)
Ipython bug -- the tracebacks in the sage command line list all absolute paths to Cython files totally incorrectly.
| Reported by: | was | Owned by: | was |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-duplicate/invalid/wontfix |
| Component: | user interface | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
On the command line:
sage: 1/0 --------------------------------------------------------------------------- <type 'exceptions.ZeroDivisionError'> Traceback (most recent call last) /Users/was/<ipython console> in <module>() /Users/was/element.pyx in sage.structure.element.RingElement.__div__() /Users/was/coerce.pxi in sage.structure.element._div_c() /Users/was/integer.pyx in sage.rings.integer.Integer._div_c_impl() /Users/was/integer_ring.pyx in sage.rings.integer_ring.IntegerRing_class._div() <type 'exceptions.ZeroDivisionError'>: Rational division by zero
Notice that the absolute paths are nonsense.
In the notebook:
1/0
outputs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/was/.sage/sage_notebook/worksheets/admin/9/code/5.py", line 4, in <module>
Integer(1)/Integer(0)
File "/Users/was/s/data/extcode/sage/", line 1, in <module>
File "element.pyx", line 1480, in sage.structure.element.RingElement.__div__
File "coerce.pxi", line 138, in sage.structure.element._div_c
File "integer.pyx", line 854, in sage.rings.integer.Integer._div_c_impl
File "integer_ring.pyx", line 190, in sage.rings.integer_ring.IntegerRing_class._div
ZeroDivisionError: Rational division by zero
so there are no absolute paths. This is the same as in Python itself:
>>> 1/sage.all.ZZ(0) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "element.pyx", line 1482, in sage.structure.element.RingElement.__div__ File "coerce.pyx", line 252, in sage.structure.coerce.CoercionModel_cache_maps.bin_op_c File "element.pyx", line 1480, in sage.structure.element.RingElement.__div__ File "coerce.pxi", line 138, in sage.structure.element._div_c File "integer.pyx", line 854, in sage.rings.integer.Integer._div_c_impl File "integer_ring.pyx", line 190, in sage.rings.integer_ring.IntegerRing_class._div ZeroDivisionError: Rational division by zero
Change History
Note: See
TracTickets for help on using
tickets.

From Fernando Perez: