Ticket #29886: traceback.txt

File traceback.txt, 9.6 KB (added by gh-Ivo-Maffei, 2 years ago)

mutable matrices issue full traceback

Line 
1---------------------------------------------------------------------------
2TypeError                                 Traceback (most recent call last)
3~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:5975)()
4    995             try:
5--> 996                 return self.cache[k]
6    997             except TypeError:  # k is not hashable
7
8~/sage/local/lib/python3.7/site-packages/sage/misc/weak_dict.pyx in sage.misc.weak_dict.WeakValueDictionary.__getitem__ (build/cythonized/sage/misc/weak_dict.c:3713)()
9    701         """
10--> 702         cdef PyObject* wr = PyDict_GetItemWithError(self, k)
11    703         if wr == NULL:
12
13~/sage/local/lib/python3.7/site-packages/sage/sets/family.py in __hash__(self)
14   1190         """
15-> 1191         return hash(self._enumeration)
16   1192
17
18~/sage/local/lib/python3.7/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.__hash__ (build/cythonized/sage/matrix/matrix0.c:38650)()
19   5694         if not self._is_immutable:
20-> 5695             raise TypeError("mutable matrices are unhashable")
21   5696         if self.hash != -1:
22
23TypeError: mutable matrices are unhashable
24
25During handling of the above exception, another exception occurred:
26
27TypeError                                 Traceback (most recent call last)
28~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.dict_key (build/cythonized/sage/misc/cachefunc.c:3092)()
29    542     try:
30--> 543         hash(o)
31    544     except TypeError:
32
33~/sage/local/lib/python3.7/site-packages/sage/sets/family.py in __hash__(self)
34   1190         """
35-> 1191         return hash(self._enumeration)
36   1192
37
38~/sage/local/lib/python3.7/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.__hash__ (build/cythonized/sage/matrix/matrix0.c:38650)()
39   5694         if not self._is_immutable:
40-> 5695             raise TypeError("mutable matrices are unhashable")
41   5696         if self.hash != -1:
42
43TypeError: mutable matrices are unhashable
44
45During handling of the above exception, another exception occurred:
46
47TypeError                                 Traceback (most recent call last)
48~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.cache_key (build/cythonized/sage/misc/cachefunc.c:3296)()
49    582     try:
50--> 583         hash(o)
51    584     except TypeError:
52
53~/sage/local/lib/python3.7/site-packages/sage/sets/family.py in __hash__(self)
54   1190         """
55-> 1191         return hash(self._enumeration)
56   1192
57
58~/sage/local/lib/python3.7/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.__hash__ (build/cythonized/sage/matrix/matrix0.c:38650)()
59   5694         if not self._is_immutable:
60-> 5695             raise TypeError("mutable matrices are unhashable")
61   5696         if self.hash != -1:
62
63TypeError: mutable matrices are unhashable
64
65During handling of the above exception, another exception occurred:
66
67TypeError                                 Traceback (most recent call last)
68~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.cache_key (build/cythonized/sage/misc/cachefunc.c:3296)()
69    582     try:
70--> 583         hash(o)
71    584     except TypeError:
72
73~/sage/local/lib/python3.7/site-packages/sage/sets/family.py in __hash__(self)
74   1190         """
75-> 1191         return hash(self._enumeration)
76   1192
77
78~/sage/local/lib/python3.7/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.__hash__ (build/cythonized/sage/matrix/matrix0.c:38650)()
79   5694         if not self._is_immutable:
80-> 5695             raise TypeError("mutable matrices are unhashable")
81   5696         if self.hash != -1:
82
83TypeError: mutable matrices are unhashable
84
85During handling of the above exception, another exception occurred:
86
87TypeError                                 Traceback (most recent call last)
88~/sage/local/lib/python3.7/site-packages/sage/structure/sage_object.pyx in sage.structure.sage_object.SageObject._cache_key (build/cythonized/sage/structure/sage_object.c:3090)()
89    407         try:
90--> 408             hash(self)
91    409         except TypeError:
92
93~/sage/local/lib/python3.7/site-packages/sage/sets/family.py in __hash__(self)
94   1190         """
95-> 1191         return hash(self._enumeration)
96   1192
97
98~/sage/local/lib/python3.7/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.__hash__ (build/cythonized/sage/matrix/matrix0.c:38650)()
99   5694         if not self._is_immutable:
100-> 5695             raise TypeError("mutable matrices are unhashable")
101   5696         if self.hash != -1:
102
103TypeError: mutable matrices are unhashable
104
105During handling of the above exception, another exception occurred:
106
107TypeError                                 Traceback (most recent call last)
108<ipython-input-5-423e08b1e87d> in <module>
109----> 1 MS.submodule([A])
110
111~/sage/local/lib/python3.7/site-packages/sage/categories/modules_with_basis.py in submodule(self, gens, check, already_echelonized, unitriangular, support_order, category, *args, **opts)
112    874                                       support_order=support_order,
113    875                                       unitriangular=unitriangular,
114--> 876                                       category=category, *args, **opts)
115    877
116    878         def quotient_module(self, submodule, check=True, already_echelonized=False, category=None):
117
118~/sage/local/lib/python3.7/site-packages/sage/misc/classcall_metaclass.pyx in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1762)()
119    320         """
120    321         if cls.classcall is not None:
121--> 322             return cls.classcall(cls, *args, **kwds)
122    323         else:
123    324             # Fast version of type.__call__(cls, *args, **kwds)
124
125~/sage/local/lib/python3.7/site-packages/sage/modules/with_basis/subquotient.py in __classcall_private__(cls, basis, support_order, ambient, unitriangular, category, *args, **opts)
126    218         return super(SubmoduleWithBasis, cls).__classcall__(cls,
127    219                     basis, tuple(support_order), ambient, unitriangular, category,
128--> 220                     *args, **opts)
129    221
130    222     def __init__(self, basis, support_order, ambient, unitriangular, category,
131
132~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:6014)()
133    996                 return self.cache[k]
134    997             except TypeError:  # k is not hashable
135--> 998                 k = dict_key(k)
136    999                 return self.cache[k]
137   1000         except KeyError:
138
139~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.dict_key (build/cythonized/sage/misc/cachefunc.c:3130)()
140    543         hash(o)
141    544     except TypeError:
142--> 545         o = (unhashable_key, cache_key_unhashable(o))
143    546     return o
144    547
145
146~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.cache_key_unhashable (build/cythonized/sage/misc/cachefunc.c:3661)()
147    592     """
148    593     if isinstance(o, tuple):
149--> 594         return tuple(cache_key(item) for item in o)
150    595     try:
151    596         k = o._cache_key()
152
153~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in genexpr (build/cythonized/sage/misc/cachefunc.c:3552)()
154    592     """
155    593     if isinstance(o, tuple):
156--> 594         return tuple(cache_key(item) for item in o)
157    595     try:
158    596         k = o._cache_key()
159
160~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.cache_key (build/cythonized/sage/misc/cachefunc.c:3334)()
161    583         hash(o)
162    584     except TypeError:
163--> 585         o = cache_key_unhashable(o)
164    586     return o
165    587
166
167~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.cache_key_unhashable (build/cythonized/sage/misc/cachefunc.c:3661)()
168    592     """
169    593     if isinstance(o, tuple):
170--> 594         return tuple(cache_key(item) for item in o)
171    595     try:
172    596         k = o._cache_key()
173
174~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in genexpr (build/cythonized/sage/misc/cachefunc.c:3552)()
175    592     """
176    593     if isinstance(o, tuple):
177--> 594         return tuple(cache_key(item) for item in o)
178    595     try:
179    596         k = o._cache_key()
180
181~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.cache_key (build/cythonized/sage/misc/cachefunc.c:3334)()
182    583         hash(o)
183    584     except TypeError:
184--> 585         o = cache_key_unhashable(o)
185    586     return o
186    587
187
188~/sage/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.cache_key_unhashable (build/cythonized/sage/misc/cachefunc.c:3714)()
189    594         return tuple(cache_key(item) for item in o)
190    595     try:
191--> 596         k = o._cache_key()
192    597     except AttributeError:
193    598         raise TypeError("unhashable type: {!r}".format(type(o).__name__))
194
195~/sage/local/lib/python3.7/site-packages/sage/structure/sage_object.pyx in sage.structure.sage_object.SageObject._cache_key (build/cythonized/sage/structure/sage_object.c:3168)()
196    408             hash(self)
197    409         except TypeError:
198--> 410             raise TypeError("{} is not hashable and does not implement _cache_key()".format(type(self)))
199    411         else:
200    412             assert False, "_cache_key() must not be called for hashable elements"
201
202TypeError: <class 'sage.sets.family.TrivialFamily_with_category'> is not hashable and does not implement _cache_key()