ipypublish icon indicating copy to clipboard operation
ipypublish copied to clipboard

Template files in nbconvert were renamed

Open daha96 opened this issue 3 years ago • 5 comments

Bug Report

Describe the bug

ipypublish tries to access the display_priority.tplx file from nbpconvert in outline_schemas/latex_outline.latex.j2:

jinja2.exceptions.TemplateNotFound: display_priority.tplx

These template files were renamed in nbconvert commit f4c7daefe0e24055a92f185d6fd803abf909db2f.

To Reproduce

I used the follwing conda environment:

    name: xyz
    channels:
    - defaults
    - conda-forge
    - dlr-sc
    dependencies:
    - python=3.7
    - pip
    - wheel
    - setuptools
    - setuptools_scm
    - numpy
    - scipy
    - matplotlib
    - pythonocc-core
    - pandas
    - sympy
    - ipympl
    - ipypublish
    - markdown-it-py~=0.6.0
    - pytest
    - pytest-runner
    - pytest-env
    - pytest-cov
    - coverage
    - sphinx
    - jupyter
    - nbsphinx
    - tixi3
    - tigl3

Minimal Notebook Example

Every notebook can be used for showing the but, even the example notebooks

Expected Behaviour

The exception

 jinja2.exceptions.TemplateNotFound: display_priority.tplx

is thrown when running

nbpublish -pdf -pbug -pt test.ipynb

Runtime Information

    afbs-util                 0.1.dev10+gff58099.d20210127          pypi_0    pypi
    alabaster                 0.7.12                   py37_0
    anyio                     2.0.2            py37h03978a9_4    conda-forge
    argon2-cffi               20.1.0           py37he774522_1
    astroid                   2.4.2                    py37_0
    async_generator           1.10             py37h28b3542_0
    atomicwrites              1.4.0                      py_0
    attrs                     20.3.0             pyhd3eb1b0_0
    autopep8                  1.5.4                      py_0
    babel                     2.9.0              pyhd3eb1b0_0
    backcall                  0.2.0                      py_0
    bibtexparser              1.1.0                      py_0    conda-forge
    blas                      1.0                         mkl
    bleach                    3.2.2              pyhd3eb1b0_0
    brotlipy                  0.7.0           py37h2bbff1b_1003
    ca-certificates           2020.12.5            h5b45459_0    conda-forge
    certifi                   2020.12.5        py37h03978a9_1    conda-forge
    cffi                      1.14.4           py37hcd4344a_0
    chardet                   4.0.0           py37haa95532_1003
    click                     7.1.2              pyhd3eb1b0_0
    colorama                  0.4.4              pyhd3eb1b0_0
    coverage                  5.3.1            py37h2bbff1b_2
    cryptography              3.3.1            py37hcd4344a_0
    cycler                    0.10.0                   py37_0
    decorator                 4.4.2                      py_0
    defusedxml                0.7.0rc2                 pypi_0    pypi
    docutils                  0.16                     py37_1
    entrypoints               0.3                      py37_0
    flake8                    3.8.4                      py_0
    freeimageplus             3.18.0               h6538335_2    dlr-sc
    freetype                  2.10.4               hd328e21_0
    future                    0.18.2                   py37_1
    gitdb                     4.0.5                      py_0
    gitpython                 3.1.12             pyhd3eb1b0_1
    gl2ps                     1.4.2                h0597ee9_0    conda-forge
    icc_rt                    2019.0.0             h0cc432a_1
    icu                       58.2                 ha925a31_3
    idna                      2.10               pyhd3eb1b0_0
    ijson                     3.1.3              pyhd3eb1b0_0
    imagesize                 1.2.0                      py_0
    importlib-metadata        2.0.0                      py_1
    importlib_metadata        2.0.0                         1
    importlib_resources       5.1.0            py37haa95532_1
    iniconfig                 1.1.1              pyhd3eb1b0_0
    intel-openmp              2020.2                      254
    ipykernel                 5.3.4            py37h5ca1d4c_0
    ipympl                    0.6.3              pyhd8ed1ab_0    conda-forge
    ipypublish                0.10.12          py37h03978a9_1    conda-forge
    ipython                   7.19.0           py37hd4e2768_1
    ipython_genutils          0.2.0              pyhd3eb1b0_1
    ipywidgets                7.6.3              pyhd3eb1b0_1
    isort                     5.6.4                      py_0
    jedi                      0.17.2           py37haa95532_1
    jinja2                    2.11.2             pyhd3eb1b0_0
    jpeg                      9b                   hb83a4c4_2
    json5                     0.9.5                      py_0
    jsonextended              0.7.11                     py_0    conda-forge
    jsonschema                3.2.0                      py_2
    jupyter                   1.0.0                    py37_7
    jupyter-lsp               1.1.0              pyhd8ed1ab_0    conda-forge
    jupyter_client            6.1.7                      py_0
    jupyter_console           6.2.0                      py_0
    jupyter_core              4.7.0            py37haa95532_0
    jupyter_server            1.2.2            py37h03978a9_1    conda-forge
    jupyterlab                2.2.6                      py_0
    jupyterlab-git            0.23.3             pyhd8ed1ab_0    conda-forge
    jupyterlab_latex          2.0.0                      py_0    conda-forge
    jupyterlab_pygments       0.1.2                      py_0
    jupyterlab_server         1.2.0                      py_0
    jupyterlab_widgets        1.0.0              pyhd3eb1b0_1
    jupytext                  1.9.1              pyhd3deb0d_1    conda-forge
    kiwisolver                1.3.0            py37hd77b12b_0
    latexcodec                2.0.1              pyh9f0ad1d_0    conda-forge
    latexmk                   4.55                 pl5.20.3_0    conda-forge
    lazy-object-proxy         1.4.3            py37h2bbff1b_2
    libpng                    1.6.37               h2a8f88b_0
    libsodium                 1.0.18               h62dcd97_0
    libtiff                   4.1.0                h56a325e_1
    lz4-c                     1.9.3                h2bbff1b_0
    m2w64-gcc-libgfortran     5.3.0                         6
    m2w64-gcc-libs            5.3.0                         7
    m2w64-gcc-libs-core       5.3.0                         7
    m2w64-gmp                 6.1.0                         2
    m2w64-libwinpthread-git   5.0.0.4634.697f757               2
    markdown-it-py            0.6.1              pyhd8ed1ab_0    conda-forge
    markupsafe                1.1.1            py37hfa6e2cd_1
    matplotlib                3.3.2                haa95532_0
    matplotlib-base           3.3.2            py37hba9282a_0
    mccabe                    0.6.1                    py37_1
    mdit-py-plugins           0.2.4              pyhd8ed1ab_0    conda-forge
    mistune                   0.8.4           py37hfa6e2cd_1001
    mkl                       2020.2                      256
    mkl-service               2.3.0            py37h196d8e1_0
    mkl_fft                   1.2.0            py37h45dec08_0
    mkl_random                1.1.1            py37h47e9c7a_0
    more-itertools            8.6.0              pyhd3eb1b0_0
    mpmath                    1.1.0                    py37_0
    msys2-conda-epoch         20160418                      1
    nbclient                  0.5.1                      py_0
    nbconvert                 6.0.7                    py37_0
    nbdime                    2.1.0                      py_0    conda-forge
    nbformat                  5.1.2              pyhd3eb1b0_1
    nbsphinx                  0.8.1              pyh44b312d_0    conda-forge
    nest-asyncio              1.4.3              pyhd3eb1b0_0
    nodejs                    10.13.0                       0
    notebook                  6.2.0            py37haa95532_0
    numpy                     1.19.2           py37hadc3359_0
    numpy-base                1.19.2           py37ha3acd2a_0
    oce                       0.17.2              he980bc4_14    dlr-sc
    olefile                   0.46                     py37_0
    openssl                   1.1.1i               h8ffe710_0    conda-forge
    ordered-set               4.0.2                      py_0    conda-forge
    packaging                 20.8               pyhd3eb1b0_0
    pandas                    1.2.1            py37hf11a4ad_0
    pandoc                    2.11                 h9490d1a_0
    pandocfilters             1.4.3            py37haa95532_1
    panflute                  2.0.4              pyhd3deb0d_0    conda-forge
    parso                     0.7.0                      py_0
    pathlib2                  2.3.5            py37haa95532_2
    perl                      5.20.3.1                      2    conda-forge
    pexpect                   4.8.0              pyhd3eb1b0_3
    pickleshare               0.7.5           pyhd3eb1b0_1003
    pillow                    8.1.0            py37h4fa10fc_0
    pint                      0.16.1                     py_0    conda-forge
    pip                       20.3.3           py37haa95532_0
    pluggy                    0.13.1                   py37_0
    prometheus_client         0.9.0              pyhd3eb1b0_0
    prompt-toolkit            3.0.8                      py_0
    prompt_toolkit            3.0.8                         0
    ptyprocess                0.7.0              pyhd3eb1b0_2
    py                        1.10.0             pyhd3eb1b0_0
    pybtex                    0.24.0           py37h03978a9_0    conda-forge
    pybtex-docutils           1.0.0            py37h03978a9_0    conda-forge
    pycodestyle               2.6.0                      py_0
    pycparser                 2.20                       py_2
    pydocstyle                5.1.1                      py_0
    pyflakes                  2.2.0                      py_0
    pygments                  2.7.4              pyhd3eb1b0_0
    pylint                    2.6.0                    py37_0
    pyopenssl                 20.0.1             pyhd3eb1b0_1
    pyparsing                 2.4.7              pyhd3eb1b0_0
    pyqt                      5.9.2            py37h6538335_2
    pyrsistent                0.17.3           py37he774522_0
    pysocks                   1.7.1                    py37_1
    pytest                    6.2.1            py37haa95532_0
    pytest-cov                2.11.1             pyhd3eb1b0_0
    pytest-env                0.6.2                      py_0    conda-forge
    pytest-runner             5.2                pyhd3eb1b0_0
    python                    3.7.9                h60c2a47_0
    python-dateutil           2.8.1                      py_0
    python-jsonrpc-server     0.4.0                      py_0
    python-language-server    0.36.2             pyhd3eb1b0_0
    python_abi                3.7                     1_cp37m    conda-forge
    pythonocc-core            0.17.3          py37he980bc4_10    dlr-sc
    pytz                      2020.5             pyhd3eb1b0_0
    pywin32                   227              py37he774522_1
    pywinpty                  0.5.7                    py37_0
    pyyaml                    5.4.1            py37h2bbff1b_1
    pyzmq                     20.0.0           py37hd77b12b_1
    qt                        5.9.7            vc14h73c81de_0
    qtconsole                 4.7.7                      py_0
    qtpy                      1.9.0                      py_0
    requests                  2.25.1             pyhd3eb1b0_0
    rope                      0.18.0                     py_0
    ruamel.yaml               0.16.12          py37he774522_1
    ruamel.yaml.clib          0.2.2            py37he774522_0
    scipy                     1.5.2            py37h9439919_0
    send2trash                1.5.0              pyhd3eb1b0_1
    setuptools                51.3.3           py37haa95532_4
    setuptools-scm            5.0.1              pyhd3eb1b0_0
    setuptools_scm            5.0.1                hd3eb1b0_0
    sip                       4.19.8           py37h6538335_0
    six                       1.15.0           py37haa95532_0
    smmap                     3.0.4                      py_0
    sniffio                   1.1.0                    py37_2
    snowballstemmer           2.1.0              pyhd3eb1b0_0
    sphinx                    3.4.3              pyhd3eb1b0_0
    sphinxcontrib-applehelp   1.0.2                      py_0
    sphinxcontrib-bibtex      2.1.4              pyhd8ed1ab_0    conda-forge
    sphinxcontrib-devhelp     1.0.2                      py_0
    sphinxcontrib-htmlhelp    1.0.3                      py_0
    sphinxcontrib-jsmath      1.0.1                      py_0
    sphinxcontrib-qthelp      1.0.3                      py_0
    sphinxcontrib-serializinghtml 1.1.4                      py_0
    sqlite                    3.33.0               h2a8f88b_0
    sympy                     1.7.1            py37haa95532_0
    tbb                       2020.3               h74a9793_0
    terminado                 0.9.2            py37haa95532_0
    testpath                  0.4.4                      py_0
    texsoup                   0.1.4                      py_0    conda-forge
    tigl3                     3.1.0            py37he980bc4_0    dlr-sc
    tixi3                     3.1.1            py37h6538335_0    dlr-sc
    tk                        8.6.10               he774522_0
    toml                      0.10.1                     py_0
    tornado                   6.1              py37h2bbff1b_0
    traitlets                 5.0.5                      py_0
    typed-ast                 1.4.2            py37h2bbff1b_1
    typing_extensions         3.7.4.3                    py_0
    ujson                     4.0.2            py37hd77b12b_0
    urllib3                   1.26.2             pyhd3eb1b0_0
    vc                        14.2                 h21ff451_1
    vs2015_runtime            14.27.29016          h5e58377_2
    wcwidth                   0.2.5                      py_0
    webencodings              0.5.1                    py37_1
    wheel                     0.36.2             pyhd3eb1b0_0
    widgetsnbextension        3.5.1                    py37_0
    win_inet_pton             1.1.0            py37haa95532_0
    wincertstore              0.2                      py37_0
    winpty                    0.4.3                         4
    wrapt                     1.11.2           py37he774522_0
    xz                        5.2.5                h62dcd97_0
    yaml                      0.2.5                he774522_0
    yapf                      0.30.0                     py_0
    zeromq                    4.3.3                ha925a31_3
    zipp                      3.4.0              pyhd3eb1b0_0
    zlib                      1.2.11               h62dcd97_4
    zstd                      1.4.5                h04227a9_0

daha96 avatar Feb 04 '21 20:02 daha96

+1 I'm seeing the same thing.

jefflarkin avatar Apr 20 '21 18:04 jefflarkin

Any updates on this bug? Still facing the same issue here!

SouraTR avatar Nov 12 '21 06:11 SouraTR

Is there any work-around? (My first attempt at using nbpublish led me to this issue.)

jpgoldberg avatar Oct 04 '22 17:10 jpgoldberg

@jpgoldberg I fixed it by changing a .py file. Go to the file from the python error traceback. And you will need to edit the file and inside the file in a line, where the code is breaking change the extension to .tplx.

Whatever I have written is from my memory. I shall update this with screenshots, since I don't have my computer with me rn.

SouraTR avatar Oct 04 '22 20:10 SouraTR

Ah. The work-around was described above, and is in this commit: https://github.com/daha96/ipypublish/commit/e3c9421dcfee61f278037c1e4022736cdfb01323

jpgoldberg avatar Oct 05 '22 15:10 jpgoldberg