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

IPython question mark does not display output #193

Closed
moorepants opened this issue Jan 16, 2022 · 6 comments
Closed

IPython question mark does not display output #193

moorepants opened this issue Jan 16, 2022 · 6 comments
Labels

Comments

@moorepants
Copy link

I have lines like:

.. jupyter-execute::
   ?

.. jupyter-execute::
   function?

The output that displays in IPython or Jupyter notebook does not seem to display with jupyter-sphinx. For example:

image

Is there a way to have the output from the IPython ? and ?? display?

@akhmerov
Copy link
Member

akhmerov commented Jan 16, 2022

You are observing jupyter/nbclient#196. I don't think we can offer a workaround on the jupyter-sphinx side. Pinning nbclient or IPython versions would probably be unnecessarily disruptive (and I'm not even sure if this worked before), and therefore I propose to close this issue. Let me know if you disagree.

@moorepants
Copy link
Author

Thanks. Yes, fine to close this in favor of the nbclient one. I believe that nbconvert does handle this correctly and puts the output of ? into an output cell (maybe not relevant though).

@akhmerov
Copy link
Member

nbconvert directly uses nbclient for execution, and therefore has the exact same problem (I also checked that).

@moorepants
Copy link
Author

Interesting. Here is an example of it working with nbviewer:

https://nbviewer.org/github/moorepants/mae223/blob/master/content/lecture-notebooks/mae223-l02.ipynb

image

But I'm not sure what the difference is.

@akhmerov
Copy link
Member

Can't confirm using jupyter nbconvert --execute bug.ipynb --to notebook --stdout (bug.ipynb contains a single code cell with ?).

Your notebook already contains outputs; was it not executed manually, e.g. using run all cells or so?

@moorepants
Copy link
Author

Yes, manually executed then uploaded to github and displayed via nbviewer. So I guess manual execution of the notebook catches the output properly. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants