fastai / nbdev_template

Template for nbdev projects
https://nbdev.fast.ai/
Apache License 2.0
294 stars 99 forks source link

Missing file: attachement.html #63

Open jbulow opened 3 years ago

jbulow commented 3 years ago

New to nbdev.

Used this template and followed the tutorial on this page

Ended up with the following when running nbdev_build_docs:

converting: /Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbformat/tests/test4plus.ipynb
'source'
converting: /Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbformat/tests/invalid.ipynb
'source'
converting: /Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbconvert/exporters/tests/files/attachment.ipynb
[Errno 2] No such file or directory: '/Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbconvert/exporters/tests/files/attachment:image.png'
Conversion failed on the following:
test4plus.ipynb
invalid.ipynb
attachment.ipynb
Traceback (most recent call last):
  File "/Users/jonas/nbdev_test/venv/bin/nbdev_build_docs", line 8, in <module>
    sys.exit(nbdev_build_docs())
  File "/Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/fastcore/script.py", line 105, in _f
    tfunc(**merge(args, args_from_prog(func, xtra)))
  File "/Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbdev/export2html.py", line 643, in nbdev_build_docs
    if fname is None: make_sidebar()
  File "/Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbdev/export2html.py", line 708, in make_sidebar
    create_default_sidebar()
  File "/Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbdev/export2html.py", line 700, in create_default_sidebar
    dic = {Config().lib_name: _create_default_sidebar()}
  File "/Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbdev/export2html.py", line 692, in _create_default_sidebar
    titles = [_get_title(f) for f in fnames if f.stem!='index']
  File "/Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbdev/export2html.py", line 692, in <listcomp>
    titles = [_get_title(f) for f in fnames if f.stem!='index']
  File "/Users/jonas/nbdev_test/venv/lib/python3.9/site-packages/nbdev/export2html.py", line 682, in _get_title
    with open(fname, 'r') as f: code = f.read()
FileNotFoundError: [Errno 2] No such file or directory: '/Users/jonas/nbdev_test/docs/attachment.html'
/Users/jonas/nbdev_test
jbulow commented 3 years ago

Workaround: install nbdev locally in the cloned nbdev_template

git clone https://github.com/fastai/nbdev
pip install -e nbdev