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

Commands do not exit cleanly #133

Closed
alcarney opened this issue Jan 24, 2024 · 0 comments · Fixed by #138
Closed

Commands do not exit cleanly #133

alcarney opened this issue Jan 24, 2024 · 0 comments · Fixed by #138
Labels
bug Something isn't working lsp-devtools Issues affecting the lsp-devtools package

Comments

@alcarney
Copy link
Member

$ .env/bin/lsp-devtools record -f "{.params}" --to-file logs.json
^C^CException in callback StreamReaderProtocol.connection_made.<locals>.callback(<Task cancell...server.py:43>>) at /usr/lib64/python3.12/asyncio/streams.py:248
handle: <Handle StreamReaderProtocol.connection_made.<locals>.callback(<Task cancell...server.py:43>>) at /usr/lib64/python3.12/asyncio/streams.py:248>
Traceback (most recent call last):
  File "/usr/lib64/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 671, in run_until_complete
    self.run_forever()
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 638, in run_forever
    self._run_once()
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 1933, in _run_once
    event_list = self._selector.select(timeout)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/asyncio/runners.py", line 157, in _on_sigint
    raise KeyboardInterrupt()
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib64/python3.12/asyncio/streams.py", line 249, in callback
    exc = task.exception()
          ^^^^^^^^^^^^^^^^
  File "/var/home/alex/Projects/lsp-devtools/lib/lsp-devtools/lsp_devtools/agent/server.py", line 45, in handle_client
    await aio_readline(self._stop_event, reader, self.lsp.data_received)
  File "/var/home/alex/Projects/lsp-devtools/.env/lib64/python3.12/site-packages/pygls/client.py", line 48, in aio_readline
    header = await reader.readline()
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/asyncio/streams.py", line 565, in readline
    line = await self.readuntil(sep)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/asyncio/streams.py", line 657, in readuntil
    await self._wait_for_data('readuntil')
  File "/usr/lib64/python3.12/asyncio/streams.py", line 542, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError
^CTask was destroyed but it is pending!
task: <Task cancelling name='Task-1' coro=<AgentServer.start_tcp() done, defined at /var/home/alex/Projects/lsp-devtools/lib/lsp-devtools/lsp_devtools/agent/server.py:42> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[gather.<locals>._done_callback() at /usr/lib64/python3.12/asyncio/tasks.py:767]>

I think this is losely related to #131

@alcarney alcarney added bug Something isn't working lsp-devtools Issues affecting the lsp-devtools package labels Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp-devtools Issues affecting the lsp-devtools package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant