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

bash_kernel bug with readline > v8.0 in conda environments #115

Closed
CriticalSci opened this issue Sep 9, 2021 · 5 comments
Closed

bash_kernel bug with readline > v8.0 in conda environments #115

CriticalSci opened this issue Sep 9, 2021 · 5 comments

Comments

@CriticalSci
Copy link

CriticalSci commented Sep 9, 2021

When accessing this kernel in a conda environment containing readline v8.1 (as is the default in conda-forge or defaults channels) every command output returns garbled with exit status 1 in the Jupyter notebook.

Only readline v8 (the default in the anaconda channel) restores normal behaviour.

Note the Jupyter lab server is also running nb_conda_kernels to access kernels across conda environments.

Can anyone advise what could be the problem here? Is there something in readline 8.1 breaking the code? Or is this specific to my setup?

The problematic environment configuration arises with anything other than anaconda as top priority channel:

conda create --name dev_bash bash ipykernel bash_kernel

Screenshot 2021-09-09 at 16 06 10

@goekce
Copy link

goekce commented Oct 2, 2021

could be related to #107

try with

bind 'set enable-bracketed-paste off'

Does someone know why this problem exists in bash_kernel?

more info on bracketed paste

@takluyver
Copy link
Owner

That does look like it might be related to bracketed paste. At a guess, bash is sending the escape codes to switch bracketed paste mode on & off, but Jupyter's limited terminal emulation doesn't support them, so they both show up and interfere with checking exit codes.

Disabling bracketed paste mode is probably a good idea. With bash_kernel, you can't paste anything directly into the bash session anyway (it's running behind the Jupyter machinery), so there's no need for it. I think the right place to fix it is this file in pexpect, if anyone wants to make a PR.

@CriticalSci
Copy link
Author

could be related to #107

try with

bind 'set enable-bracketed-paste off'

Thanks, this does fix the problem (temporarily) for the duration of each session!

@ackalker
Copy link

ackalker commented Feb 8, 2022

could be related to #107
try with

bind 'set enable-bracketed-paste off'

Thanks, this does fix the problem (temporarily) for the duration of each session!

@CriticalSci Please see my comment in #117 (comment) for a hack that could help the workaround to 'stick' for all Bash kernel notebooks.

@takluyver
Copy link
Owner

I think #120 should fix this.

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

No branches or pull requests

4 participants