Unexpected looping behavior
Closed this issue · 2 comments
What happened?
Hi,
I was exploring the library and noticed an unexpected looping behavior.
I am using the latest version of iTerm2 and nbpreview
.
nbpreview version
nbpreview 0.8.1
Output
What you can see in the screenshot happens a few (3 to be precise) times in a row, it always goes until the very same point, says skipping
, and repeats from start.
Notebook
No response
OS
macOS
Terminal
iTerm2
Python version
Python 3.8.10
Might be semi-related to #506.
Going to repeat a bit of what is explained in the other issue for clarity and future users.
A guess is that this is an issue with your pager, and nbpreview is not playing well with it. One way to confirm this is to disable paging with --no-paging
.
% nbpreview --no-paging notebook.ipynb
This does not change what nbpreview renders, but does force it to print out the render directly to the terminal instead of the pager. If the issue dissappears when we prevent nbpreview from outputing to your pager, then it's likely an issue with the pager.
To make this more permanent config, you can set the enrionmental variable NBPREVIEW_PAGER=0
.
# Place this is your shell startup (.zshrc/.bashrc/.bashprofile/.zshenv)
export NBPREVIEW_PAGER=0
Indeed that was related and using --no-paging
flag helps with the looping behavior. Thanks for help!