JuliaLang / IJulia.jl

Julia kernel for Jupyter
MIT License
2.79k stars 411 forks source link

Printed text and plots go away when a notebook is called from nbconvert. #610

Open bicycle1885 opened 6 years ago

bicycle1885 commented 6 years ago

Some text and plots are not rendered when the notebook is executed from jupyter nbconvert tool. The output looks like this:

image

This is the notebook (the file extension is changed to upload the file to GitHub): Untitled.ipynb.txt

This is the command I used:

~/e/b/r/g/lambda (master|…) $ jupyter nbconvert --to notebook --execute --inplace Untitled.ipynb
[NbConvertApp] WARNING | Config option `template_path` not recognized by `NotebookExporter`.
[NbConvertApp] Converting notebook Untitled.ipynb to notebook
[NbConvertApp] Executing notebook with kernel: julia-0.6
/Users/kenta/miniconda3/lib/python3.6/site-packages/jupyter_client/connect.py:157: RuntimeWarning: Failed to set sticky bit on '/var/folders/v4/mx_s6fmx7d543syfxp5ndjl00000gn/T': [Errno 1] Operation not permitted: '/var/folders/v4/mx_s6fmx7d543syfxp5ndjl00000gn/T'
  RuntimeWarning,
Starting kernel event loops.
[NbConvertApp] Writing 1393 bytes to Untitled.ipynb

And there are curious observations:

Versioninfo:

Julia Version 0.6.2
Commit d386e40c17 (2017-12-13 18:08 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, skylake)
bicycle1885 commented 6 years ago

I've updated some python packages to the latest version but the situation doesn't change.

~/e/b/r/g/lambda (master|…) $ pip list --format=columns | grep -E "jupyter|nb|notebook"
jupyter                           1.0.0
jupyter-client                    5.2.1
jupyter-console                   5.2.0
jupyter-contrib-core              0.3.3
jupyter-contrib-nbextensions      0.3.1
jupyter-core                      4.4.0
jupyter-highlight-selected-word   0.0.11
jupyter-latex-envs                1.3.8.4
jupyter-nbextensions-configurator 0.2.7
nbconvert                         5.3.1
nbformat                          4.4.0
notebook                          5.2.2
widgetsnbextension                3.0.2
stevengj commented 6 years ago

Can you try adding a sleep(2) cell at the end to see if it is a timing thing? You can also try

flush(STDOUT)
sleep(2)
bicycle1885 commented 6 years ago

Still no plot: image

stevengj commented 6 years ago

You could turn on IJulia.set_verbose() to see if the display_data message is being sent by IJulia to the backend.