添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
英勇无比的苹果  ·  xelatex (TeX) ...·  昨天    · 
英姿勃勃的针织衫  ·  How to Fix the ...·  3 天前    · 
兴奋的开水瓶  ·  [Solved] Working with ...·  5 天前    · 
逆袭的黑框眼镜  ·  What are Jupyter ...·  5 天前    · 
爱看球的人字拖  ·  How To Use LaTeX In ...·  1 周前    · 
微笑的充电器  ·  首页轮播·  4 月前    · 
调皮的凉面  ·  FABP5 x MALT1 - ...·  5 月前    · 
0
0

More than 1 year has passed since last update.

vscodeで編集したjupyternotebookのexportエラー対処法

Last updated at Posted at 2022-12-31

  • vscode上で編集したnotebookをPDFでexportしようとしたところ下記のエラーが発生。
  • > /opt/anaconda3/bin/python -m jupyter nbconvert /tmp/2039761f-2452-48f4-a2b9-fe06cfd385e4/work.1.ipynb --to pdf --output tmp-239FhAqS20h2565.html --output-dir /tmp --debug
    error 12:46:37.424: Export failed [Error: [NbConvertApp] Searching ['/root/.vscode-server/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161', '/root/.jupyter', '/opt/anaconda3/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
    [NbConvertApp] Looking for jupyter_config in /etc/jupyter
    [NbConvertApp] Looking for jupyter_config in /usr/local/etc/jupyter
    [NbConvertApp] Looking for jupyter_config in /opt/anaconda3/etc/jupyter
    [NbConvertApp] Looking for jupyter_config in /root/.jupyter
    [NbConvertApp] Looking for jupyter_config in /root/.vscode-server/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161
    [NbConvertApp] Looking for jupyter_nbconvert_config in /etc/jupyter
    [NbConvertApp] Looking for jupyter_nbconvert_config in /usr/local/etc/jupyter
    [NbConvertApp] Looking for jupyter_nbconvert_config in /opt/anaconda3/etc/jupyter
    [NbConvertApp] Looking for jupyter_nbconvert_config in /root/.jupyter
    [NbConvertApp] Looking for jupyter_nbconvert_config in /root/.vscode-server/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161
    [NbConvertApp] Converting notebook /tmp/2039761f-2452-48f4-a2b9-fe06cfd385e4/work.1.ipynb to html
    [NbConvertApp] Notebook name is 'tmp-239FhAqS20h2565'
    [NbConvertApp] ERROR | Notebook JSON is invalid: Non-unique cell id '99b3287b-2872-4144-a7c1-e30e0ba29a5c' detected. Corrected to '93b153e5'.
    〜〜〜中略〜〜〜
    error 12:55:35.573: If you have not installed xelatex (TeX) you will need to do so before you can export to PDF, for further instructions please look https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex. 
    To avoid installing xelatex (TeX) you might want to try exporting to HTML and using your browsers "Print to PDF" feature.
    
  • 別のnotebookをコピーして編集していたことで、cell idがuniqueでなくなることが原因とのこと。
  • 別のnotebookをコピーするのをやめるか、新しくnotebookを作成して、そこにコピペすることで解決する。
  • PDFでexportしようとすると、以下のエラーでる。
  • error 12:55:35.573: If you have not installed xelatex (TeX) you will need to do so before you can export to PDF, for further instructions please look https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex. 
    To avoid installing xelatex (TeX) you might want to try exporting to HTML and using your browsers "Print to PDF" feature.
    
  • xelatexのinstallを促されるので、再インストールしたりとめちゃくちゃハマった。
  • エラーをよく読めば、最初の方で'Notebook JSON is invalid: Non-unique cell id'が出てるので、最後のエラーと関係ないところを疑うべきで、落ち着いてエラー読もうねと思った。
  • issueはたてられてるようなので、最新バージョンでは解消しているかもしれない。
  • 0
    0
    0

    Register as a new user and use Qiita more conveniently

    1. You get articles that match your needs
    2. You can efficiently read back useful information
    3. You can use dark theme
    What you can do with signing up
    0
    0