muffinmad / anakin-language-server

Yet another Jedi Python language server
GNU General Public License v3.0
37 stars 3 forks source link

Sometimes exception thrown in textDocument/didOpen notification handler #9

Closed rwols closed 4 years ago

rwols commented 4 years ago
anakin: INFO:root:  /home/raoul/.local/lib/python3.7/site-packages
anakin: INFO:root:  /usr/local/lib/python3.7/dist-packages
anakin: INFO:root:  /usr/lib/python3/dist-packages
anakin: INFO:root:Jedi project path: /home/raoul/.config/sublime-text-3/Packages/LSP
anakin: ERROR:pygls.protocol:Failed to handle *user defined* notification textDocument/didOpen: <snip>
anakin: Traceback (most recent call last):
anakin:   File "/home/raoul/.local/lib/python3.7/site-packages/pygls/protocol.py", line 60, in decorator
anakin:     self._execute_notification(user_func, *args, **kwargs)
anakin:   File "/home/raoul/.local/lib/python3.7/site-packages/pygls/protocol.py", line 221, in _execute_notification
anakin:     handler(*params)
anakin:   File "/home/raoul/.local/lib/python3.7/site-packages/anakinls/server.py", line 342, in did_open
anakin:     _validate(ls, params.textDocument.uri)
anakin:   File "/home/raoul/.local/lib/python3.7/site-packages/anakinls/server.py", line 321, in _validate
anakin:     PyflakesReporter(result, script, config['pyflakes_errors']))
anakin:   File "/home/raoul/.local/lib/python3.7/site-packages/pyflakes/api.py", line 77, in check
anakin:     reporter.flake(warning)
anakin:   File "/home/raoul/.local/lib/python3.7/site-packages/anakinls/server.py", line 170, in flake
anakin:     if message.__class__.__name__ in self.errors:
anakin: TypeError: argument of type 'bool' is not iterable

This is usually for the first file. Further didOpens work OK.

rwols commented 4 years ago

I'm on version 1.5.

muffinmad commented 4 years ago

I think this is happens during didChangeConfiguration because of pyflykes_errors: true while pyflakes_errors must be the list.

rwols commented 4 years ago

You are right.