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

Spyder Kernel can't restart #21679

Closed
PythonUser112 opened this issue Jan 5, 2024 · 4 comments
Closed

Spyder Kernel can't restart #21679

PythonUser112 opened this issue Jan 5, 2024 · 4 comments

Comments

@PythonUser112
Copy link

I've tried to restart the kernel using the "Restart Kernel"-Function
but this didn't work

@PythonUser112
Copy link
Author

This is the error stack:
File "/usr/lib/python3.9/asyncio/tasks.py", line 258, in __step
result = coro.throw(exc)
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 636, in _async_wait
await asyncio.sleep(pollinterval)
File "/usr/lib/python3.9/asyncio/tasks.py", line 654, in sleep
return await future
File "/usr/lib/python3.9/asyncio/futures.py", line 284, in await
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
future.result()
File "/usr/lib/python3.9/asyncio/futures.py", line 196, in result
raise exc
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
fut.result()
File "/usr/lib/python3.9/asyncio/futures.py", line 196, in result
raise exc
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 433, in _async_finish_shutdown
await asyncio.wait_for(
File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 75, in wrapper
out = await method(self, *args, **kwargs)
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 498, in _async_shutdown_kernel
await ensure_async(self.finish_shutdown(restart=restart))
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/utils.py", line 30, in wrapped
raise e
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/utils.py", line 27, in wrapped
return loop.run_until_complete(future)
File "/home/buddha/.local/lib/python3.9/site-packages/nest_asyncio.py", line 89, in run_until_complete
return f.result()
File "/usr/lib/python3.9/asyncio/futures.py", line 201, in result
raise self._exception
File "/usr/lib/python3.9/asyncio/tasks.py", line 256, in __step
result = coro.send(None)
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 439, in _async_finish_shutdown
await ensure_async(self._kill_kernel(restart=restart))
TypeError: _kill_kernel() got an unexpected keyword argument 'restart'
Traceback (most recent call last):
File "/usr/lib/python3.9/asyncio/tasks.py", line 258, in __step
result = coro.throw(exc)
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 636, in _async_wait
await asyncio.sleep(pollinterval)
File "/usr/lib/python3.9/asyncio/tasks.py", line 654, in sleep
return await future
File "/usr/lib/python3.9/asyncio/futures.py", line 284, in await
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
future.result()
File "/usr/lib/python3.9/asyncio/futures.py", line 196, in result
raise exc
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
fut.result()
File "/usr/lib/python3.9/asyncio/futures.py", line 196, in result
raise exc
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 433, in _async_finish_shutdown
await asyncio.wait_for(
File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/spyder/plugins/ipythonconsole/widgets/client.py", line 642, in _restart_thread_main
self.shellwidget.kernel_manager.restart_kernel(
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/utils.py", line 30, in wrapped
raise e
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/utils.py", line 27, in wrapped
return loop.run_until_complete(future)
File "/home/buddha/.local/lib/python3.9/site-packages/nest_asyncio.py", line 89, in run_until_complete
return f.result()
File "/usr/lib/python3.9/asyncio/futures.py", line 201, in result
raise self._exception
File "/usr/lib/python3.9/asyncio/tasks.py", line 256, in __step
result = coro.send(None)
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 535, in _async_restart_kernel
await ensure_async(self.shutdown_kernel(now=now, restart=True))
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/utils.py", line 30, in wrapped
raise e
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/utils.py", line 27, in wrapped
return loop.run_until_complete(future)
File "/home/buddha/.local/lib/python3.9/site-packages/nest_asyncio.py", line 89, in run_until_complete
return f.result()
File "/usr/lib/python3.9/asyncio/futures.py", line 201, in result
raise self._exception
File "/usr/lib/python3.9/asyncio/tasks.py", line 256, in __step
result = coro.send(None)
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 83, in wrapper
raise e
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 75, in wrapper
out = await method(self, *args, **kwargs)
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 498, in _async_shutdown_kernel
await ensure_async(self.finish_shutdown(restart=restart))
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/utils.py", line 30, in wrapped
raise e
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/utils.py", line 27, in wrapped
return loop.run_until_complete(future)
File "/home/buddha/.local/lib/python3.9/site-packages/nest_asyncio.py", line 89, in run_until_complete
return f.result()
File "/usr/lib/python3.9/asyncio/futures.py", line 201, in result
raise self._exception
File "/usr/lib/python3.9/asyncio/tasks.py", line 256, in __step
result = coro.send(None)
File "/home/buddha/.local/lib/python3.9/site-packages/jupyter_client/manager.py", line 439, in _async_finish_shutdown
await ensure_async(self._kill_kernel(restart=restart))
TypeError: _kill_kernel() got an unexpected keyword argument 'restart'

@PythonUser112
Copy link
Author

I'm using Debian 11 on a raspberry 4 and spyder 4.2.1

@ccordoba12
Copy link
Member

Hey @PythonUser112, thanks for reporting. Please remove this directory and try again:

/home/buddha/.local/lib/python3.9

It seems the Python packages installed there conflict with the ones from your Python distribution.

Let us know if that works for you.

@ccordoba12
Copy link
Member

Closing due to lack of response.

@ccordoba12 ccordoba12 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2024
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