Ask Your Question

Not able to relabel a Cartan type in the notebook

asked 2012-10-02 10:51:23 -0600

Jesustc gravatar image

In the shell:

sage: A3 = CartanType("A3")
sage: A3.relabel({1:2,2:3,3:1})
['A', 3] relabelled by {1: 2, 2: 3, 3: 1}

But in the notebook:


A3 = CartanType("A3")


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 10, in <module>
    exec compile(u'open("","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("QTMgPSBDYXJ0YW5UeXBlKCJBMyIpCkEzLnJlbGFiZWwoezE6MiwyOjMsMzoxfSk="),globals())+"\\n"); execfile(os.path.abspath(""))
  File "", line 1, in <module>

  File "/tmp/tmpWUCLyz/", line 4, in <module>
exec compile(u'A3.relabel({_sage_const_1 :_sage_const_2 ,_sage_const_2 :_sage_const_3 ,_sage_const_3 :_sage_const_1 })
  File "", line 1, in <module>

  File "/usr/lib/sage/local/lib/python2.7/site-packages/sage/combinat/root_system/", line 795, in relabel
import type_relabel
  File "/usr/lib/sage/local/lib/python2.7/site-packages/sage/combinat/root_system/", line 278, in <module>
class CartanType_affine(sage.combinat.root_system.cartan_type.CartanType_affine):
AttributeError: 'module' object has no attribute 'cartan_type'

Strange, isn't it?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-10-02 16:27:42 -0600

benjaminfjones gravatar image

I just tried this on (which runs sage-5.3 right now) and it works perfectly fine. Perhaps you have some other cells in the worksheet that have affected the state of the running session? Are the notebook and terminal sessions running the same version of Sage?

edit flag offensive delete link more


It does indeed in 5.3. I am using 5.1 (the latest Ubuntu PPA version). I made sure that this is the version both in the shell and the notebook, and started with a clean session. I guess I will have to install 5.3, or wait until the PPA get's updated. Thanks!

Jesustc gravatar imageJesustc ( 2012-10-02 22:36:43 -0600 )edit

Should we delete the question, since it does not seem useful for anyone?

Jesustc gravatar imageJesustc ( 2012-10-02 22:38:47 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-10-02 10:51:23 -0600

Seen: 85 times

Last updated: Oct 02 '12