Ask Your Question

Revision history [back]

Problem with invariant_module()

Hello, sorry if I'm doing something bad, I'm super noob using Sage in my computer instead of using CoCalc server.

I'm learning about representation theory and I want to make some computations using sagemath.

When I'm using my jupyter notebook repeating the example provided by sage's tutorial we have an error when I call the function invariant_module()

I get the following error:

KeyError Traceback (most recent call last) /Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7075)() 838 try: --> 839 return self.__cached_methods[name] 840 except KeyError:

KeyError: 'invariant_module'

During handling of the above exception, another exception occurred:

AttributeError Traceback (most recent call last) <ipython-input-3-e8a722bdce17> in <module> 1 from sage.modules.with_basis.representation import Representation 2 R = Representation(G, M, action) ----> 3 I = R.invariant_module()

/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.__getattr__ (build/cythonized/sage/structure/category_object.c:6994)() 831 AttributeError: 'PrimeNumbers_with_category' object has no attribute 'sadfasdf' 832 """ --> 833 return self.getattr_from_category(name) 834 835 cdef getattr_from_category(self, name):

/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7160)() 846 cls = self._category.parent_class 847 --> 848 attr = getattr_from_other_class(self, cls, name) 849 self.__cached_methods[name] = attr 850 return attr

/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/cpython/getattr.pyx in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2553)() 365 dummy_error_message.cls = type(self) 366 dummy_error_message.name = name --> 367 raise AttributeError(dummy_error_message) 368 cdef PyObject* attr = instance_getattr(cls, name) 369 if attr is NULL:

AttributeError: 'Representation_with_category' object has no attribute 'invariant_module'

But if I try in Cocalc I have no problem. Am I doing something bad?

Problem with invariant_module()

Hello, sorry if I'm doing something bad, I'm super noob using Sage in my computer instead of using CoCalc server.

I'm learning about representation theory and I want to make some computations using sagemath.

When I'm using my jupyter notebook repeating the example provided by sage's tutorial we have an error when I call the function invariant_module()

invariant_module() I get the following error:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7075)()
    838         try:
--> 839             return self.__cached_methods[name]
    840         except KeyError:

KeyError: KeyError: 'invariant_module'

'invariant_module' During handling of the above exception, another exception occurred:

occurred: AttributeError Traceback (most recent call last) <ipython-input-3-e8a722bdce17> in <module> 1 from sage.modules.with_basis.representation import Representation 2 R = Representation(G, M, action) ----> 3 I = R.invariant_module()

R.invariant_module() /Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.__getattr__ (build/cythonized/sage/structure/category_object.c:6994)() 831 AttributeError: 'PrimeNumbers_with_category' object has no attribute 'sadfasdf' 832 """ --> 833 return self.getattr_from_category(name) 834 835 cdef getattr_from_category(self, name):

name): /Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7160)() 846 cls = self._category.parent_class 847 --> 848 attr = getattr_from_other_class(self, cls, name) 849 self.__cached_methods[name] = attr 850 return attr

attr /Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/cpython/getattr.pyx in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2553)() 365 dummy_error_message.cls = type(self) 366 dummy_error_message.name = name --> 367 raise AttributeError(dummy_error_message) 368 cdef PyObject* attr = instance_getattr(cls, name) 369 if attr is NULL:

NULL: AttributeError: 'Representation_with_category' object has no attribute 'invariant_module'

'invariant_module'

But if I try in Cocalc I have no problem. Am I doing something bad?

click to hide/show revision 3
retagged

Problem with invariant_module()

Hello, sorry if I'm doing something bad, I'm super noob using Sage in my computer instead of using CoCalc server.

I'm learning about representation theory and I want to make some computations using sagemath.

When I'm using my jupyter notebook repeating the example provided by sage's tutorial we have an error when I call the function invariant_module() I get the following error:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7075)()
    838         try:
--> 839             return self.__cached_methods[name]
    840         except KeyError:

KeyError: 'invariant_module'

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
<ipython-input-3-e8a722bdce17> in <module>
      1 from sage.modules.with_basis.representation import Representation
      2 R = Representation(G, M, action)
----> 3 I = R.invariant_module()

/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.__getattr__ (build/cythonized/sage/structure/category_object.c:6994)()
    831             AttributeError: 'PrimeNumbers_with_category' object has no attribute 'sadfasdf'
    832         """
--> 833         return self.getattr_from_category(name)
    834 
    835     cdef getattr_from_category(self, name):

/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7160)()
    846                 cls = self._category.parent_class
    847 
--> 848             attr = getattr_from_other_class(self, cls, name)
    849             self.__cached_methods[name] = attr
    850             return attr

/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/cpython/getattr.pyx in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2553)()
    365         dummy_error_message.cls = type(self)
    366         dummy_error_message.name = name
--> 367         raise AttributeError(dummy_error_message)
    368     cdef PyObject* attr = instance_getattr(cls, name)
    369     if attr is NULL:

AttributeError: 'Representation_with_category' object has no attribute 'invariant_module'

But if I try in Cocalc I have no problem. Am I doing something bad?