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

Bug: Output gets hidden on stop_and_persist in Jupyter notebooks #59

Open
manrajgrover opened this issue May 14, 2018 · 5 comments · May be fixed by #133 or #143
Open

Bug: Output gets hidden on stop_and_persist in Jupyter notebooks #59

manrajgrover opened this issue May 14, 2018 · 5 comments · May be fixed by #133 or #143

Comments

@manrajgrover
Copy link
Owner

Description

Currently, in jupyter notebooks, the final stop_and_persist output is not persisted. I've opened an issue in ipywidget for understanding the issue a little better (jupyter-widgets/ipywidgets#2072).

System settings

  • Operating System: Mac OS 10.13.1
  • Terminal in use: NA
  • Jupyter version: 4.4.0
  • Python version: 2.7.14
  • Halo version: 9f9ea37
  • pip freeze output: NA

Error

The output display is not persited on stop_and_persist call.

Expected behaviour

The output should be persited on stop_and_persist call.

Steps to recreate

widget bug

People to notify

@jungwinter @manrajgrover

@manrajgrover
Copy link
Owner Author

@jungwinter Could you look into this as well?

@winterjung
Copy link
Contributor

winterjung commented May 17, 2018

Sorry for late response. I checked this issue in python 2.7.13 and find this line is making the problem.

https://github.com/ManrajGrover/halo/blob/4dbaa1a52356281cdf18cc1ce19016ad9276c09e/halo/halo_notebook.py#L38

After removing that line, final output seems to be resolved. Would you like to check this solution? I guess it caused by this change, but not sure.

@manrajgrover
Copy link
Owner Author

@jungwinter Yes, it seems to resolve the issue. I'm not sure if it breaks anything else.

@mschmo
Copy link

mschmo commented Oct 12, 2019

I'd love to check this out for hacktoberfest. @jungwinter thanks for the starting point.

@mschmo
Copy link

mschmo commented Oct 15, 2019

I looked into this a bit today. This commit caused the bug.

The reason why is ip.events.register('post_run_cell', clean_up) fires after every cell execution, which calls clear() and clears the last output.

I don't want to simply revert that commit, because it seems like there was a good reason for wanting to clean up after execution. Maybe @manrajgrover you can expand on what issue that commit is fixing? I notice it replaced a previous callback to handle SIGINT.

hafiz703 added a commit to hafiz703/halo that referenced this issue Oct 21, 2019
Output gets hidden on stop_and_persist in Jupyter notebooks - added output to self.output.outputs instead of reassignment to persist output when cell finishes running.
@hafiz703 hafiz703 linked a pull request Oct 21, 2019 that will close this issue
3 tasks
@norweeg norweeg linked a pull request Mar 7, 2020 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants