Skip to content
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.

Getting TypeError: metaclass conflict when specify 'css21' as the parser #7

Open
ye opened this issue Jun 3, 2014 · 0 comments
Open

Comments

@ye
Copy link

ye commented Jun 3, 2014

I was trying to explore the parser options for tinycss. When typing in 'css21' as the parser, I got the below error.

Here is the IPython snippet.

In [1]: import tinycss

In [6]: parser = tinycss.make_parser('css21')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-6-977d1ec4617a> in <module>()
----> 1 parser = tinycss.make_parser('css21')

/Users/ye/.envs/dbi/lib/python2.7/site-packages/tinycss/__init__.pyc in make_parser(*features, **kwargs)
     39     if features:
     40         bases = tuple(PARSER_MODULES.get(f, f) for f in features)
---> 41         parser_class = type('CustomCSSParser', bases + (CSS21Parser,), {})
     42     else:
     43         parser_class = CSS21Parser

TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

There is a StackOverflow answer that seems to be relevant. http://stackoverflow.com/a/11276154

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant