[QScintilla] QSciLexer blockStart & blockEnd return type error

Matic Kukovec kukovecmatic at hotmail.com
Sun Mar 24 11:15:05 GMT 2019


Hi Phil,

I have these two methods in a QsciLexerCustom:
    def blockStart(self, style=0):
        return data.QByteArray(1, "{")

    def blockEnd(self, style=0):
        return data.QByteArray(1, "}")

But on pressing Enter inside the editor always throws: TypeError: invalid result from MyLexer.blockStart()
I also tried return bytes("{", encoding="utf-8") and return "{", but those also throw the same error.
This is on PyQt5.11.3 / QScintilla2.10.8.

Am I missing something?

Thanks,
Matic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20190324/9d3f031d/attachment.html>


More information about the QScintilla mailing list