Hi Everyone,

Something in the sage-combinat queue appears to be break 
CombinatorialFreeModule.

Using the unpatched version of sage 5.5 I get the following expected 
behaviour:

----------------------------------------------------------------------
| Sage Version 5.5, Release Date: 2012-12-22                         |
| Type "notebook()" for the browser-based notebook interface.        |
| Type "help()" for help.                                            |
----------------------------------------------------------------------
sage: CombinatorialFreeModule(QQ, [4,3,2,1]).sum_of_terms([(i,i) for i in 
[4,3,2,1]])
B[1] + 2*B[2] + 3*B[3] + 4*B[4]

If I now apply the complete queue and try exactly the same command then we 
get the AttributeError below.

It's late in Sydney so I haven't tracked down the patch which is causing 
the problem...but my guess is that (fixing and) unguarding 
trac_7980-multiple-realizations-nt.patch might help?

Cheers,
Andrew

---
The broken CombinatorialFreeModule call:

----------------------------------------------------------------------
| Sage Version 5.5, Release Date: 2012-12-22                         |
| Type "notebook()" for the browser-based notebook interface.        |
| Type "help()" for help.                                            |
----------------------------------------------------------------------
Loading Sage library. Current Mercurial branch is: combinat
sage: CombinatorialFreeModule(QQ, [4,3,2,1]).sum_of_terms([(i,i) for i in 
[4,3,2,1]])
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', (151, 0))

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

/usr/local/src/sage/sage-5.5/devel/sage-combinat/sage/combinat/<ipython 
console> in <module>()

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/IPython/Prompts.pyc
 
in __call__(self, arg)
    550 
    551             # and now call a possibly user-defined print mechanism
--> 552             manipulated_val = self.display(arg)
    553             
    554             # user display hooks can change the variable to be 
stored in

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/IPython/Prompts.pyc
 
in _display(self, arg)
    576             return IPython.generics.result_display(arg)
    577         except TryNext:            
--> 578             return self.shell.hooks.result_display(arg)
    579 
    580     # Assign the default display method:

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/IPython/hooks.pyc
 
in __call__(self, *args, **kw)
    139             #print "prio",prio,"cmd",cmd #dbg
    140             try:
--> 141                 ret = cmd(*args, **kw)
    142                 return ret
    143             except ipapi.TryNext, exc:

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/sage/misc/pretty_console_print.pyc
 
in result_display(ip_self, obj)
    110     # IPython's default result_display() uses the 
IPython.genutils.Term.cout stream.
    111     # See also local/lib/python2.6/site-packages/IPython/hooks.py.
--> 112     f_tmp( ip_self, obj )
    113 
    114 def displayhook( obj ):

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/sage/misc/pretty_console_print.pyc
 
in pretty_display(ip_self, obj)
    100     # IPython's default result_display() uses the 
IPython.genutils.Term.cout stream.
    101     # See also local/lib/python2.6/site-packages/IPython/hooks.py.
--> 102     print >> IPython.genutils.Term.cout, pretty_console_repr( obj )
    103 
    104 f_tmp = pretty_display

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/sage/misc/pretty_console_print.pyc
 
in pretty_console_repr(elem)
    142             return pretty_repr_set( elem )
    143     if hasattr( elem, "__pretty_repr__" ):
--> 144         return elem.__pretty_repr__()
    145     return PrettyConsoleRepr( repr(elem).splitlines() )
    146 

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/sage/misc/pcp_monkey_patch.pyc
 
in __pretty_repr__(self)
    164         all_atomic = True
    165         for (monomial,c) in terms:
--> 166             b = repr_monomial(monomial) # PCR
    167             if c != 0:
    168                 break_points = []

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/sage/misc/pcp_monkey_patch.pyc
 
in _pretty_repr_term(self, el)
     71                  o
     72         """
---> 73         if el == self.one_basis():
     74             return PrettyConsoleRepr( ["1"])
     75         pref = PrettyConsoleRepr( [self.prefix()] )

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/sage/structure/parent.so
 
in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:6081)()

/usr/local/src/sage/sage-5.5/local/lib/python2.7/site-packages/sage/structure/misc.so
 
in sage.structure.misc.getattr_from_other_class 
(sage/structure/misc.c:1427)()

AttributeError: 'CombinatorialFreeModule_with_category' object has no 
attribute 'one_basis'

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/SGmLtGSoT4wJ.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to