Open ocehugo opened 8 years ago
@ocehugo I tried this, and it just spits out two attribute errors for me, is there some option that controls invoking the pager?
Humm...did you tried calling the x.error()
again after that? I found out that (maybe related to ipython internals) sometimes it works the first time (returning an AttributeError as expected and opening the debugger dialog) , but soon after quitting the debug and getting other exceptions the kernel hangs trying to comunicate/show with the pager.
Also note that you need to be running inside a kernel, not plain ipython.
This is what I see:
@ocehugo Maybe you can give me something that generates a longer exception stack?
@ocehugo also, what OS are you on, are you using master and have a recent vim?
OSX El Capitain
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 29 2016 10:35:10) MacOS X (unix) version Included patches: 1-1453
jupyter-console 4.4.1
Sorry, assumed you were used to ipython.
How to reproduce:
include c.TerminalInteractiveShell.pager = 'vimpager'``` in the ipython profile:
echo "c.TerminalInteractiveShell.pager = 'vimpager'" >> ~/.ipython/profile_default/ipython_config.py
and after that call jupyter:
jupyter console
%pdb
x=10
x.error()
ipdb>q
x.error()
call jupyter, enable the debugger (pdb), set x raise error (should hang here) quit the debuggeer dialog (should hang here after quiting sometimes) raise the error again (should hang)
To me looks like it's a OS related, since it should hang after you call x.error() . the ipdb>
dialog is the debugger. To test further you could, after the dialog is open call q
(to quit) and call x.error()
again to test further ( as I said before, sometimes it works first time, but soon after quiting the debugger the kernel hangs).
I put that into ~/.jupyter/jupyter_console_config.py
and it does not make a difference. I am also on El Cap.
BTW, if you are using vimpager from homebrw, please try master instead.
That is really strange, because i can make the kernel hangs if using the option and without it it works.
I can't install vimpager HEAD through brew :
→ brew install vimpager --HEAD
==> Cloning https://github.com/rkitover/vimpager.git
Updating /Library/Caches/Homebrew/vimpager--git
==> Checking out branch master
Error: No such file or directory - vimcat.md
The formula is outdated, I just made a tap, use this:
brew tap rkitover/vimpager git://github.com/rkitover/vimpager.git
brew reinstall rkitover/vimpager/vimpager --HEAD
updated and keep happening... I will leave it as is, since it's not as important (the functionality doesnt change in using less inside the ipython console). I simple put vimpager there in the configuration and using it caused a lot of unexpected problems.
PS: I noted that now with your tap vimpager is much more slower than with the older on.
Yeah I'm in the middle of a major refactor, I'll have to look at the speed issues.
In any case, since I can't reproduce your issue I don't know what the problem is, unless you can find some other way to reproduce it.
Hi @rkitover,
it seems that vimpager is not as compatible as other pages for ipython/jupyter. I found this annoying bug using vimpager as the ipython pager through c.TerminalInteractiveShell.pager = 'vimpager'.
For the help funcitons it works, but it seems that for debugging (%pdb) it cause the kernel of ipython to hang.
To reproduce you can run the jupyter console code below with the option above in the default profile of ipython/jupyter: