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

AttributeError: 'NoneType' object has no attribute 'start' #1309

Closed
krassowski opened this issue Dec 16, 2024 · 1 comment · Fixed by #1310
Closed

AttributeError: 'NoneType' object has no attribute 'start' #1309

krassowski opened this issue Dec 16, 2024 · 1 comment · Fixed by #1310

Comments

@krassowski
Copy link
Member

On main branch the installation of kernels ends up with an error for me:

  1. Run: python -m ipykernel install --name mykernel --user
  2. See:
Traceback (most recent call last):
  File "/home/krassowski/ipykernel/ipykernel/kernelapp.py", line 750, in main
    tg.start_soon(self.kernel.start)
                  ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'start'

During handling of the above exception, another exception occurred:

  + Exception Group Traceback (most recent call last):
  |   File "<frozen runpy>", line 198, in _run_module_as_main
  |   File "<frozen runpy>", line 88, in _run_code
  |   File "/home/krassowski/ipykernel/ipykernel/__main__.py", line 5, in <module>
  |     app.launch_new_instance()
  |   File "/home/krassowski/.pyenv/versions/ipykernel/lib/python3.11/site-packages/traitlets/config/application.py", line 1077, in launch_instance
  |     app.start()
  |   File "/home/krassowski/ipykernel/ipykernel/kernelapp.py", line 740, in start
  |     run(self.main, backend=backend)
  |   File "/home/krassowski/.pyenv/versions/ipykernel/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 73, in run
  |     return async_backend.run(func, args, {}, backend_options)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/krassowski/.pyenv/versions/ipykernel/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1991, in run
  |     return runner.run(wrapper())
  |            ^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/krassowski/.pyenv/versions/3.11.4/lib/python3.11/asyncio/runners.py", line 118, in run
  |     return self._loop.run_until_complete(task)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/krassowski/.pyenv/versions/3.11.4/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
  |     return future.result()
  |            ^^^^^^^^^^^^^^^
  |   File "/home/krassowski/.pyenv/versions/ipykernel/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1979, in wrapper
  |     return await func(*args)
  |            ^^^^^^^^^^^^^^^^^
  |   File "/home/krassowski/ipykernel/ipykernel/kernelapp.py", line 748, in main
  |     async with create_task_group() as tg:
  |   File "/home/krassowski/.pyenv/versions/ipykernel/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (2 sub-exceptions)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/krassowski/ipykernel/ipykernel/kernelapp.py", line 750, in main
    |     tg.start_soon(self.kernel.start)
    |                   ^^^^^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'start'
    +---------------- 2 ----------------
    | Traceback (most recent call last):
    |   File "/home/krassowski/ipykernel/ipykernel/kernelapp.py", line 744, in _wait_to_enter_eventloop
    |     await self.kernel._eventloop_set.wait()
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute '_eventloop_set'
    +------------------------------------

The latter part seems related to #1292

@davidbrochart
Copy link
Collaborator

I opened #1310.

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

Successfully merging a pull request may close this issue.

2 participants