halfbrained / cuda_lsp

LSP Client plugin for CudaText
6 stars 4 forks source link

ValueError: x not in list #112

Closed Alexey-T closed 2 years ago

Alexey-T commented 3 years ago
Python 3.8.10
..
Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 529, in _get_lang
    lang = Language(cfg,
  File "/home/user/.config/cudatext/py/cuda_lsp/language.py", line 125, in __init__
    self._validate_config()
  File "/home/user/.config/cudatext/py/cuda_lsp/language.py", line 875, in _validate_config
    raise ValidationError(f'NOTE: {LOG_NAME}: sever config error: "{self.name}" - {msg}')
cuda_lsp.util.ValidationError: NOTE: LSP: sever config error: "lsp_py" - no server-start-command for current OS (cmd_unix) or tcp_port specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 357, in on_lexer
    self.on_open(ed_self)
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 262, in on_open
    self._do_on_open(ed_self)
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 288, in _do_on_open
    lang = self._get_lang(ed_self, langid) # uses dynamic server registrationed
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 536, in _get_lang
    servers_cfgs.remove(cfg) # dont nag on every on_open
ValueError: list.remove(x): x not in list
ERROR: Exception in CudaText for on_lexer: ValueError: list.remove(x): x not in list
Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 529, in _get_lang
    lang = Language(cfg,
  File "/home/user/.config/cudatext/py/cuda_lsp/language.py", line 125, in __init__
    self._validate_config()
  File "/home/user/.config/cudatext/py/cuda_lsp/language.py", line 875, in _validate_config
    raise ValidationError(f'NOTE: {LOG_NAME}: sever config error: "{self.name}" - {msg}')
cuda_lsp.util.ValidationError: NOTE: LSP: sever config error: "lsp_py" - no server-start-command for current OS (cmd_unix) or tcp_port specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 262, in on_open
    self._do_on_open(ed_self)
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 288, in _do_on_open
    lang = self._get_lang(ed_self, langid) # uses dynamic server registrationed
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 536, in _get_lang
    servers_cfgs.remove(cfg) # dont nag on every on_open
ValueError: list.remove(x): x not in list
ERROR: Exception in CudaText for on_open: ValueError: list.remove(x): x not in list
Init: cuda_fmt
Formatters: regex:HTML.*, regex:JSON.*, regex:JavaScript.*
Init: cuda_console_complete
Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 529, in _get_lang
    lang = Language(cfg,
  File "/home/user/.config/cudatext/py/cuda_lsp/language.py", line 125, in __init__
    self._validate_config()
  File "/home/user/.config/cudatext/py/cuda_lsp/language.py", line 875, in _validate_config
    raise ValidationError(f'NOTE: {LOG_NAME}: sever config error: "{self.name}" - {msg}')
cuda_lsp.util.ValidationError: NOTE: LSP: sever config error: "lsp_py" - no server-start-command for current OS (cmd_unix) or tcp_port specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 329, in on_save
    self.on_open(ed_self)
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 262, in on_open
    self._do_on_open(ed_self)
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 288, in _do_on_open
    lang = self._get_lang(ed_self, langid) # uses dynamic server registrationed
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 536, in _get_lang
    servers_cfgs.remove(cfg) # dont nag on every on_open
ValueError: list.remove(x): x not in list
ERROR: Exception in CudaText for on_save: ValueError: list.remove(x): x not in list
Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 529, in _get_lang
    lang = Language(cfg,
  File "/home/user/.config/cudatext/py/cuda_lsp/language.py", line 125, in __init__
    self._validate_config()
  File "/home/user/.config/cudatext/py/cuda_lsp/language.py", line 875, in _validate_config
    raise ValidationError(f'NOTE: {LOG_NAME}: sever config error: "{self.name}" - {msg}')
cuda_lsp.util.ValidationError: NOTE: LSP: sever config error: "lsp_py" - no server-start-command for current OS (cmd_unix) or tcp_port specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 329, in on_save
    self.on_open(ed_self)
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 262, in on_open
    self._do_on_open(ed_self)
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 288, in _do_on_open
    lang = self._get_lang(ed_self, langid) # uses dynamic server registrationed
  File "/home/user/.config/cudatext/py/cuda_lsp/lsp.py", line 536, in _get_lang
    servers_cfgs.remove(cfg) # dont nag on every on_open
ValueError: list.remove(x): x not in list
ERROR: Exception in CudaText for on_save: ValueError: list.remove(x): x not in list

This is on editing python file. lsp_py.json has DISABLED (renamed) keys

{
    "lexers": {
      "Python__": "python"
    },
    "cmd_unix__": ["~/.local/bin/pyls"]
}