question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: tuple indices must be integers or slices, not str

See original GitHub issue

First of all, thank you for your great work~ And the language server always crashes in recent versions.

Traceback

Traceback (most recent call last):
  File "/usr/local/bin/jedi-language-server", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/jedi_language_server/cli.py", line 17, in cli
    SERVER.start_io()
  File "/usr/local/lib/python3.7/site-packages/pygls/server.py", line 179, in start_io
    self.lsp.data_received))
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.7/site-packages/pygls/server.py", line 69, in aio_readline
    proxy(b''.join(message))
  File "/usr/local/lib/python3.7/site-packages/pygls/protocol.py", line 445, in data_received
    object_hook=deserialize_message))
  File "/usr/local/lib/python3.7/site-packages/pygls/protocol.py", line 370, in _procedure_handler
    self._handle_response(message.id, message.result, message.error)
  File "/usr/local/lib/python3.7/site-packages/pygls/protocol.py", line 349, in _handle_response
    future.set_exception(JsonRpcException.from_dict(error))
  File "/usr/local/lib/python3.7/site-packages/pygls/exceptions.py", line 44, in from_dict
    if exc_class.supports_code(error['code']):
TypeError: tuple indices must be integers or slices, not str

Log

image

Version Info

jedi                 0.17.0
jedi-language-server 0.7.2
pygls                0.9.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
pappasamcommented, May 8, 2020

@wy-z please try version 0.13.1 when you get a chance and let me know if that fixes the issue!

1reaction
wy-zcommented, May 9, 2020

0.13.1 is working great for me, thanks! @pappasam

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: tuple indices must be integers or slices, not str
The Python "TypeError: tuple indices must be integers or slices, not str" occurs when we use a string instead of an integer to...
Read more >
TypeError: tuple indices must be integers, not str
I am trying to pull data from a database and assign them to different lists. This specific error is giving me a lot...
Read more >
TypeError: tuple indices must be integers, not str - Codecademy
TypeError : tuple indices must be integers, not str ... they are considered tuples, tuples are like lists except immutable (can't be changed...
Read more >
Python pandas TypeError tuple indices must be integers or ...
df.iterrows() returns a tuple with index and the row value. ... TypeError: list indices must be integers or slices, not str.
Read more >
TypeError: tuple indices must be integers or slices, not str ...
python tutorial: #codefix #python #python_tutorialsTypeError: tuple indices must be integers or slices, not str : In this video i have shared ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found