Ticket #5051 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

tracebacks involving cython (etc.) seriously broken in sage-3.3.alpha0 (probably caused by ipython)

Reported by: was Owned by: mhansen
Priority: major Milestone: sage-3.3
Component: misc Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

For example, a clean build of sage-3.3.alpha0 or sage-3.2 on sage.math:

wstein@sage:/space/wstein/build/sage-3.3.alpha0$ ./sage
----------------------------------------------------------------------
| Sage Version 3.3.alpha0, Release Date: 2009-01-19                  |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: 1/0
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (1507, 0))

---------------------------------------------------------------------------
ZeroDivisionError                         Traceback (most recent call last)

/scratch/wstein/sage/temp/sage.math.washington.edu/16649/_scratch_wstein_sage_init_sage_0.py in <module>()
----> 1 
      2 
      3 
      4 
      5 

/space/wstein/build/sage-3.3.alpha0/local/lib/python2.5/site-packages/sage/structure/element.so in sage.structure.element.RingElement.__div__ (sage/structure/element.c:9099)()
   1180 
   1181 
-> 1182 
   1183 
   1184 

/space/wstein/build/sage-3.3.alpha0/local/lib/python2.5/site-packages/sage/rings/integer.so in sage.rings.integer.Integer._div_ (sage/rings/integer.c:9516)()
   1175 
   1176 
-> 1177 
   1178 
   1179 

/space/wstein/build/sage-3.3.alpha0/local/lib/python2.5/site-packages/sage/rings/integer_ring.so in sage.rings.integer_ring.IntegerRing_class._div (sage/rings/integer_ring.c:4745)()
    228 
    229 
--> 230 
    231 
    232 

ZeroDivisionError: Rational division by zero

In the notebook the traceback looks like this (i.e. we never show the actual lines, only the numbers). So this is definitely some sort of ipython problem.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/space/wstein/build/sage-3.3.alpha0/here/worksheets/admin/1/code/1.py", line 9, in <module>
    _sage_const_1 /_sage_const_0
  File "/space/wstein/build/sage-3.3.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in <module>
    
  File "element.pyx", line 1182, in sage.structure.element.RingElement.__div__ (sage/structure/element.c:9099)
  File "integer.pyx", line 1177, in sage.rings.integer.Integer._div_ (sage/rings/integer.c:9516)
  File "integer_ring.pyx", line 230, in sage.rings.integer_ring.IntegerRing_class._div (sage/rings/integer_ring.c:4745)
ZeroDivisionError: Rational division by zero

One possible solution would be to tone down the default traceback of ipython to not show 5 lines of context at every step, which is kind of nuts.

Change History

comment:1 Changed 4 years ago by was

I was wrong. The tracebacks never showed the code:

wstein@sage:/disk/scratch/mabshoff-sage-releases$ sage-2.10/sage
----------------------------------------------------------------------
| SAGE Version 2.10, Release Date: 2008-01-18                        |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage: 1/0
---------------------------------------------------------------------------
<type 'exceptions.ZeroDivisionError'>     Traceback (most recent call last)

/disk/scratch/mabshoff-sage-releases/<ipython console> in <module>()

/disk/scratch/mabshoff-sage-releases/element.pyx in sage.structure.element.RingElement.__div__()

/disk/scratch/mabshoff-sage-releases/coerce.pxi in sage.structure.element._div_c()

/disk/scratch/mabshoff-sage-releases/integer.pyx in sage.rings.integer.Integer._div_c_impl()

/disk/scratch/mabshoff-sage-releases/integer_ring.pyx in sage.rings.integer_ring.IntegerRing_class._div()

<type 'exceptions.ZeroDivisionError'>: Rational division by zero

comment:2 Changed 4 years ago by mhansen

  • Owner changed from cwitty to mhansen
  • Status changed from new to assigned

This is fixed in the patch at #5073.

comment:3 Changed 4 years ago by mabshoff

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from sage-3.4.1 to sage-3.3

Fixed via #5073.

----------------------------------------------------------------------
| Sage Version 3.3.alpha5, Release Date: 2009-02-03                  |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: 1/0
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (1503, 0))

---------------------------------------------------------------------------
ZeroDivisionError                         Traceback (most recent call last)

/home/mabshoff/.sage/temp/geom/20328/_home_mabshoff__sage_init_sage_0.py in <module>()

/scratch/mabshoff/sage-3.3.alpha6/local/lib/python2.5/site-packages/sage/structure/element.so in sage.structure.element.RingElement.__div__ (sage/structure/element.c:9099)()

/scratch/mabshoff/sage-3.3.alpha6/local/lib/python2.5/site-packages/sage/rings/integer.so in sage.rings.integer.Integer._div_ (sage/rings/integer.c:9522)()

/scratch/mabshoff/sage-3.3.alpha6/local/lib/python2.5/site-packages/sage/rings/integer_ring.so in sage.rings.integer_ring.IntegerRing_class._div (sage/rings/integer_ring.c:4745)()

ZeroDivisionError: Rational division by zero

Cheers,

Michael

Note: See TracTickets for help on using tickets.