Error messages in 10.9.beta9?

102 views
Skip to first unread message

Martin R

unread,
Apr 15, 2026, 9:22:36 AM (2 days ago) Apr 15
to sage-devel
I used to get

sage: s = SymmetricFunctions(QQ).s()
sage: f = s[2,1]
sage: f.to_vector()
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File ~/sage/src/sage/structure/category_object.pyx:842, in sage.structure.category_object.CategoryObject.getattr_from_category()
   841 try:
--> 842     return self.__cached_methods[name]
   843 except KeyError:

KeyError: '_dense_free_module'

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
Cell In [3], line 1
----> 1 f.to_vector()

File ~/sage/src/sage/modules/with_basis/indexed_element.pyx:802, in sage.modules.with_basis.indexed_element.IndexedFreeModuleElement._vector_()
   800      optimizations.
   801 """
--> 802 free_module = self._parent._dense_free_module(new_base_ring)
   803 if sparse:
   804     free_module = free_module.sparse_module()

File ~/sage/src/sage/structure/category_object.pyx:836, in sage.structure.category_object.CategoryObject.__getattr__()
   834         AttributeError: 'PrimeNumbers_with_category' object has no attribute 'sadfasdf'
   835     """
--> 836     return self.getattr_from_category(name)
   837  
   838 cdef getattr_from_category(self, name):

File ~/sage/src/sage/structure/category_object.pyx:851, in sage.structure.category_object.CategoryObject.getattr_from_category()
   849     cls = self._category.parent_class
   850  
--> 851 attr = getattr_from_other_class(self, cls, name)
   852 self.__cached_methods[name] = attr
   853 return attr

File ~/sage/src/sage/cpython/getattr.pyx:357, in sage.cpython.getattr.getattr_from_other_class()
   355     dummy_error_message.cls = type(self)
   356     dummy_error_message.name = name
--> 357     raise AttributeError(dummy_error_message)
   358 cdef PyObject* attr = instance_getattr(cls, name)
   359 if attr is NULL:

AttributeError: 'SymmetricFunctionAlgebra_schur_with_category' object has no attribute '_dense_free_module'


Now I get

sage: s = SymmetricFunctions(QQ).s()
sage: f = s[2,1]
sage: f.to_vector()
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File sage/structure/category_object.pyx:856, in sage.structure.category_object.CategoryObject.getattr_from_category()
--> 856 'Could not get source, probably due dynamically evaluated source code.'

KeyError: '_dense_free_module'

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
Cell In[3], line 1
----> 1 f.to_vector()

File sage/modules/with_basis/indexed_element.pyx:855, in sage.modules.with_basis.indexed_element.IndexedFreeModuleElement._vector_()
--> 855 'Could not get source, probably due dynamically evaluated source code.'

File sage/structure/category_object.pyx:850, in sage.structure.category_object.CategoryObject.__getattr__()
--> 850 'Could not get source, probably due dynamically evaluated source code.'

File sage/structure/category_object.pyx:865, in sage.structure.category_object.CategoryObject.getattr_from_category()
--> 865 'Could not get source, probably due dynamically evaluated source code.'

File sage/cpython/getattr.pyx:357, in sage.cpython.getattr.getattr_from_other_class()
--> 357 'Could not get source, probably due dynamically evaluated source code.'

AttributeError: 'SymmetricFunctionAlgebra_schur_with_category' object has no attribute '_dense_free_module'


Dima Pasechnik

unread,
Apr 15, 2026, 2:27:54 PM (2 days ago) Apr 15
to sage-...@googlegroups.com
It's the same KeyError and AttributeError, what exactly is the problem you are facing here?

Nils Bruin

unread,
Apr 15, 2026, 8:20:55 PM (2 days ago) Apr 15
to sage-devel
There is no source lookup in the traceback anymore. I am seeing the same thing on 10.9.beta9,  but without the ungrammatical error messages. It looks like something has changed that has affected the availability of source code in cython files for tracebacks.

Antonio Rojas

unread,
Apr 16, 2026, 2:39:44 AM (yesterday) Apr 16
to sage-devel
Are you running sage on the same machine where you compiled it, and are the source files still available in their original location?

Martin R

unread,
Apr 16, 2026, 6:01:44 AM (yesterday) Apr 16
to sage-devel
yes (to both).  It's a configure/make install, not conda.

Dima Pasechnik

unread,
Apr 16, 2026, 12:43:46 PM (yesterday) Apr 16
to sage-...@googlegroups.com
it probably comes from a recent ipython upgrade.

The code is still there, but ipython no longer knows where to look, I gather.

Dima Pasechnik

unread,
Apr 16, 2026, 12:43:52 PM (yesterday) Apr 16
to sage-...@googlegroups.com
On April 16, 2026 1:39:44 AM CDT, Antonio Rojas <nqn...@gmail.com> wrote:

Martin R

unread,
3:36 AM (15 hours ago) 3:36 AM
to sage-devel
Downgrading IPython to 8.18.1 using

sage -sh
(sage-sh) martin@convex63:sage$ pip install ipython==8.18.1

does *not* solve the issue.  (or would I have to recompile sage to see a difference?)

Martin

Martin R

unread,
5:30 AM (13 hours ago) 5:30 AM
to sage-devel
an LLM says that the paths might be wrong.  Above, in the working version we have


KeyError                                  Traceback (most recent call last)
File ~/sage/src/sage/structure/category_object.pyx:842, in sage.structure.category_object.CategoryObject.getattr_from_category()


whereas in the new version we have


KeyError                                  Traceback (most recent call last)
File sage/structure/category_object.pyx:856, in sage.structure.category_object.CategoryObject.getattr_from_category()
--> 856 'Could not get source, probably due dynamically evaluated source code.'

This only happens for cython files:

try:
    s = SymmetricFunctions(QQ).s()
    s[1,2]
except:
    tb = sys.exc_info()[2]
    while tb:
        print(tb.tb_frame.f_code.co_filename)
        tb = tb.tb_next

gives

<string>
/home/martin/sage/src/sage/combinat/sf/sfa.py
sage/structure/parent.pyx
sage/structure/coerce_maps.pyx
sage/structure/coerce_maps.pyx
/home/martin/sage/src/sage/combinat/partition.py

Martin R

unread,
5:48 AM (13 hours ago) 5:48 AM
to sage-devel
It further analyzed that the problem might originate in `sage_setup/find.py`
```
def find_python_sources(src_dir, modules=['sage'], distributions=None,
                        exclude_distributions=None):
```

I have to stop here.

Martin

Antonio Rojas

unread,
2:19 PM (4 hours ago) 2:19 PM
to sage-devel
This is a problem with editable installs. Cython expects the source pyx files to be available alongside the compiled modules, and that is not the case in editable installs, where the source pyx files are in the source dir and the compiled modules are somewhere else.
Reply all
Reply to author
Forward
0 new messages