andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 38 forks source link

Errors on ArchLinux, related to qutepart #462

Open Ododo opened 5 years ago

Ododo commented 5 years ago

Hello,

i encounter this issue using the AUR git package: (prevents me to open some files, to have syntax coloration, python console etc)

CRITICAL:root:Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/enki/plugins/session.py", line 76, in _onRestoreSession core.workspace().openFile(filePath) File "/usr/lib/python3.7/site-packages/enki/core/workspace.py", line 590, in openFile document = self._openSingleFile(filePath) File "/usr/lib/python3.7/site-packages/enki/core/workspace.py", line 571, in _openSingleFile document = Document(self, filePath) File "/usr/lib/python3.7/site-packages/enki/core/document.py", line 206, in init self._tryDetectSyntax() File "/usr/lib/python3.7/site-packages/enki/core/document.py", line 220, in _tryDetectSyntax firstLine=self.qutepart.lines[0]) File "/usr/lib/python3.7/site-packages/qutepart/init.py", line 772, in detectSyntax firstLine=firstLine) File "/usr/lib/python3.7/site-packages/qutepart/syntax/init.py", line 250, in getSyntax syntax = self._getSyntaxBySourceFileName(baseName, formatConverterFunction) File "/usr/lib/python3.7/site-packages/qutepart/syntax/init.py", line 195, in _getSyntaxBySourceFileName return self._getSyntaxByXmlFileName(xmlFileName, formatConverterFunction) File "/usr/lib/python3.7/site-packages/qutepart/syntax/init.py", line 180, in _getSyntaxByXmlFileName qutepart.syntax.loader.loadSyntax(syntax, xmlFilePath, formatConverterFunction) File "/usr/lib/python3.7/site-packages/qutepart/syntax/loader.py", line 595, in loadSyntax _loadContexts(highlightingElement, syntax.parser, attributeToFormatMap, formatConverterFunction) File "/usr/lib/python3.7/site-packages/qutepart/syntax/loader.py", line 389, in _loadContexts _loadContext(context, xmlElement, attributeToFormatMap, formatConverterFunction) File "/usr/lib/python3.7/site-packages/qutepart/syntax/loader.py", line 427, in _loadContext rules = _loadChildRules(context, xmlElement, attributeToFormatMap, formatConverterFunction) File "/usr/lib/python3.7/site-packages/qutepart/syntax/loader.py", line 176, in _loadChildRules rule = _ruleClassDict[ruleElement.tag](context, ruleElement, attributeToFormatMap, formatConverterFunction) File "/usr/lib/python3.7/site-packages/qutepart/syntax/loader.py", line 316, in _loadRegExpr string, insensitive, minimal, wordStart, lineStart) TypeError: function takes at most 5 arguments (6 given)

andreikop commented 5 years ago

I really don't understand how did this happen. loader.py:316 calls RegExp class constructor. There are 2 implementations: 1, 2

And both have exactly 6 parameters. Could you clone qutepart and try to run it from the sources?

cd qutepart
./editor.py editor.py

This lines will execute this code and run editor with the highlighting

Ododo commented 5 years ago

The editor works when cloning qutepart,

maybe it is related to the way my system is building cParser extension

andreikop commented 5 years ago

I'm very surprised. I really don't know any way to improperly build cParser. What happens if you build it not as a package, but manually?

cd qutepart
./setup.py install
enki

Than open Help -> About and check if Qutepart is with binary parser

Ododo commented 5 years ago

I still have the error, and "with binary parser" is written