Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Python Language Server error #22045

Open
javierdelpino opened this issue Apr 30, 2024 · 1 comment
Open

Internal Python Language Server error #22045

javierdelpino opened this issue Apr 30, 2024 · 1 comment

Comments

@javierdelpino
Copy link

Description

What steps will reproduce the problem?

Just trying to open Spyder and change the default directory

Traceback

  File "/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages/pylsp_jsonrpc/endpoint.py", line 117, in consume
    self._handle_request(message['id'], message['method'], message.get('params'))
  File "/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages/pylsp_jsonrpc/endpoint.py", line 197, in _handle_request
    handler_result = handler(params)
  File "/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages/pylsp_jsonrpc/dispatchers.py", line 25, in handler
    return method(**(params or {}))
  File "/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages/pylsp/python_lsp.py", line 210, in m_initialize
    self.config = config.Config(rootUri, initializationOptions or {},
  File "/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages/pylsp/config/config.py", line 52, in __init__
    entry_point.load()
  File "/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2517, in load
    self.require(*args, **kwargs)
  File "/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2540, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
  File "/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages/pkg_resources/__init__.py", line 875, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)

pkg_resources.ContextualVersionConflict: (typing-extensions 3.7.4 (/home/javier/PROGRAMACION/anaconda3/envs/MUSICNN/lib/python3.8/site-packages), Requirement.parse('typing-extensions>=4.0.1; python_version < "3.11"'), {'black'}

Versions

  • Spyder version: 5.1.5
  • Python version: 3.8.0
  • Qt version: 5.9.7
  • PyQt5 version: 5.9.2
  • Operating System: Linux 6.8.0-31-lowlatency

Dependencies


# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.2.1 (OK)
cookiecutter >=1.6.0          :  2.6.0 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  8.12.2 (OK)
jedi >=0.17.2;<0.19.0         :  0.17.2 (OK)
jsonschema >=3.2.0            :  4.19.2 (OK)
keyring >=17.0.0              :  24.3.1 (OK)
nbconvert >=4.0               :  7.10.0 (OK)
numpydoc >=0.6.0              :  1.5.0 (OK)
parso >=0.7.0;<0.9.0          :  0.7.0 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0;<2.10.0        :  2.9.6 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.2.2;<1.3.0          :  1.2.4 (OK)
pylsp_black >=1.0.0           :  None (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.2 (OK)
qtawesome >=1.0.2             :  1.2.2 (OK)
qtconsole >=5.1.0             :  5.5.1 (OK)
qtpy >=1.5.0                  :  2.4.1 (OK)
rtree >=0.9.7                 :  1.0.1 (OK)
setuptools >=49.6.0           :  68.2.2 (OK)
sphinx >=0.6.6                :  5.0.2 (OK)
spyder_kernels >=2.1.1;<2.2.0 :  2.1.3 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
xdg >=0.26                    :  0.27 (OK)
zmq >=17                      :  18.1.1 (OK)

# Optional:
cython >=0.21                 :  None (OK)
matplotlib >=2.0.0            :  None (OK)
numpy >=1.7                   :  1.19.2 (OK)
pandas >=1.1.1                :  None (OK)
scipy >=0.17.0                :  1.6.2 (OK)
sympy >=0.7.3                 :  None (OK)
@ccordoba12
Copy link
Member

Hey @javierdelpino, thanks for reporting. It seems your MUSICNN is broken. One option to fix it is for you to close Spyder, open the Anaconda Prompt and run the following commands there:

conda activate MUSICNN
conda install typing-extensions=3.7

and then restart Spyder again.

That should work as long you haven't installed packages with pip in that env because conda can't easily deal with that situation. If that was the case, then I'm afraid you'll have to recreate your environment to fix this error.

Let us know if you manage to solve your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants