douban / linguist

Language Savant, Python clone of github/linguist.
Other
154 stars 37 forks source link

Missing Jade lexer while from `linguist.libs.repository import Repository` #22

Closed rudskoy closed 7 years ago

rudskoy commented 7 years ago

Sup

I want to use your py linguist but stucked with an error.

At the import action from linguist.libs.repository import Repository (described in readme.md doc)

I got an error:

...
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/linguist/libs/language.py", line 112, in __init__
    raise TypeError('%s is missing lexer' % self.name)
TypeError: Jade is missing lexer

Tried to pip install pyjedi – didn't help too.

What actions should I do to make it work?

P.S. I'm using Python 2.7

rudskoy commented 7 years ago

Moreover, system contains latest pygments and pygments.lexers.html.PugLexer (has a Jade support), but anyway I had the same error.

Help me :(

rudskoy commented 7 years ago

A little workaround helped me to run it.

            if not self.lexer:
            # raise TypeError('%s is missing lexer' % self.name)
            pass