Skip to content

modular polynomials database is broken #4322

@aghitza

Description

@aghitza

In 3.1.4, install this optional spkg with

sage -i database_kohel-20060803

then

sage: DBMP = ClassicalModularPolynomialDatabase()
sage: DBMP[29]
<string>:1: Warning: 'with' will become a reserved keyword in Python 2.6
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', (1683, 0))

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

/opt/sage-3.1.4/devel/sage-main/sage/structure/<ipython console> in <module>()

/opt/sage-3.1.4/local/lib/python2.5/site-packages/sage/databases/db_modular_polynomials.pyc in __getitem__(self, level)
     93             for cff in coeff_list:
     94                 poly[(cff[0],cff[1])] = Integer(cff[2])
---> 95         return P(polydict.PolyDict(poly))
     96 
     97 class ModularCorrespondenceDatabase(ModularPolynomialDatabase):

/opt/sage-3.1.4/local/lib/python2.5/site-packages/sage/rings/polynomial/multi_polynomial_libsingular.so in sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular.__call__ (sage/rings/polynomial/multi_polynomial_libsingular.cpp:6996)()

/opt/sage-3.1.4/local/lib/python2.5/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:3732)()
    303                         del self._convert_from_list[i]
    304                         break
--> 305                 raise
    306             
    307         raise TypeError, "No conversion defined from %s to %s"%(R, self)

/opt/sage-3.1.4/local/lib/python2.5/site-packages/sage/structure/parent.so in sage.structure.parent.__call__ (sage/structure/parent.c:3619)()
    294             try:
    295                 if no_extra_args:
--> 296                     return mor._call_(x)
    297                 else:
    298                     return mor._call_with_args(x, args, kwds)

/opt/sage-3.1.4/local/lib/python2.5/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:2622)()
     74                 print type(self._codomain), self._codomain
     75                 print type(self._codomain._element_constructor), self._codomain._element_constructor
---> 76             raise
     77 
     78     cpdef Element _call_with_args(self, x, args=(), kwds={}):

/opt/sage-3.1.4/local/lib/python2.5/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps._call_ (sage/structure/coerce_maps.c:2537)()
     69     cpdef Element _call_(self, x):
     70         try:
---> 71             return self._codomain._element_constructor(x)
     72         except:
     73             if print_warnings:

/opt/sage-3.1.4/local/lib/python2.5/site-packages/sage/rings/integer.so in sage.rings.integer.Integer.__init__ (sage/rings/integer.c:5688)()

TypeError: unable to coerce <type 'sage.rings.polynomial.polydict.PolyDict'> to an integer

CC: @robertwb

Component: packages: optional

Keywords: modular polynomial database

Issue created by migration from https://trac.sagemath.org/ticket/4322

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions