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

Error starting xonsh kernel: xonsh.__amalgam__.XonshError: jupyter is not recognized as a shell type #6

Closed
cgranade opened this issue May 5, 2022 · 0 comments · Fixed by #10
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@cgranade
Copy link

cgranade commented May 5, 2022

To reproduce on a Windows 11 system running Anaconda from PowerShell:

PS> conda create -n xonsh pip notebook
PS> conda activate xonsh
PS> pip install xonsh
PS> xonsh
$ xpip install xontrib-jupyter-shell
$ exit
PS> xonsh
$ xontrib load jupyter
$ xonfig jupyter-kernel
$ exit
PS> jupyter notebook

In the Jupyter session opened up by the last command, creating a new Xonsh notebook results in the following errors being written to the console:

[I 08:09:36.455 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
  File "C:\Users\cgran\Anaconda3\envs\xonsh\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\cgran\Anaconda3\envs\xonsh\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\cgran\Anaconda3\envs\xonsh\lib\site-packages\xonsh_jupyter\kernel.py", line 504, in <module>
    main()
  File "C:\Users\cgran\Anaconda3\envs\xonsh\lib\site-packages\xonsh_jupyter\kernel.py", line 486, in main
    setup(
  File "C:\Users\cgran\Anaconda3\envs\xonsh\lib\site-packages\xonsh\__amalgam__.py", line 22484, in setup
    XSH.shell = Shell(execer, ctx=ctx, shell_type=shell_type)
  File "C:\Users\cgran\Anaconda3\envs\xonsh\lib\site-packages\xonsh\__amalgam__.py", line 15234, in __init__
    self.shell = self.construct_shell_cls(
  File "C:\Users\cgran\Anaconda3\envs\xonsh\lib\site-packages\xonsh\__amalgam__.py", line 15195, in construct_shell_cls
    raise XonshError(f"{backend} is not recognized as a shell type")
xonsh.__amalgam__.XonshError: jupyter is not recognized as a shell type

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

@anki-code anki-code added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 14, 2023
joouha referenced this issue in xonsh/xonsh Mar 16, 2023
joouha added a commit to joouha/xontrib-jupyter that referenced this issue Mar 16, 2023
The jupyter kernel was failing to start as `xonsh.shell.Shell` no longer
accepted "jupyter" as a known shell name, and instead required a shell class to
be passed.

Fixes xonsh#6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants