[PEAK] Trellis throws an error related to metaclass in python 2.6.5

P.J. Eby pje at telecommunity.com
Wed May 5 12:04:57 EDT 2010


At 03:39 PM 5/5/2010 +0300, Peter Damoc wrote:
>This is the relevant part of the traceback:
>
>
>     from peak.events import trellis
>   File 
> "C:\Python26\lib\site-packages\trellis-0.7a2-py2.6.egg\peak\events\trellis.py",
>line 1231, in <module>
>     class List(UserList.UserList, Component):
>   File "C:\Python26\lib\abc.py", line 79, in __new__
>     cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
>TypeError: Error when calling the metaclass bases
>     metaclass conflict: the metaclass of a derived class must be a
>(non-strict) subclass of the metaclasses of all its bases
>
>
>I've installed Trellis via easy_install.exe
>
>What can I do to get past this error?

It looks like UserList got a new base class in Python 2.6, adding a 
new metaclass to it.

You can make a temporary fix for this by changing:

     class classy_class(type):

to:
     from abc import ABCMeta
     class classy_class(ABCMeta):

in peak.util.decorators (in the DecoratorTools package).

This is just a temporary hack; I need to look into what can be done 
as a longer-term fix.


>I've searched the net and found something about peak.utils.Meta but I
>don't know how to get that installed on my machine. The peak package
>seams to be 5 years old and throws an error about  vcvarsall.bat

That's just your lack of a C compiler.



More information about the PEAK mailing list