fastai / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.88k stars 488 forks source link

Error in `nbdev_build_lib` in latest commit #384

Closed urspb closed 3 years ago

urspb commented 3 years ago

nbdev_build_lib produces the error messages stated below. When I tried commit Merge pull request fastai/nbdev_template#27 from muellerzr/master 99a3810 Jeremy Howard <j@fast.ai> 2021-01-10, 18:00 the error does not appear.

➜  nb2ltx git:(master) ✗ nbdev_build_lib
Traceback (most recent call last):
  File "/Users/uli/.pyenv/versions/nbdevTst1/bin/nbdev_build_lib", line 8, in <module>
    sys.exit(nbdev_build_lib())
  File "/Users/uli/.pyenv/versions/3.7.9/envs/nbdevTst1/lib/python3.7/site-packages/fastcore/script.py", line 105, in _f
    tfunc(**merge(args, args_from_prog(func, xtra)))
  File "/Users/uli/.pyenv/versions/3.7.9/envs/nbdevTst1/lib/python3.7/site-packages/nbdev/export2html.py", line 477, in nbdev_build_lib
    write_tmpls()
  File "/Users/uli/.pyenv/versions/3.7.9/envs/nbdevTst1/lib/python3.7/site-packages/nbdev/export2html.py", line 470, in write_tmpls
    write_tmpl(topnav_tmpl, 'host git_url', cfg, path/'_data'/'topnav.yml')
  File "/Users/uli/.pyenv/versions/3.7.9/envs/nbdevTst1/lib/python3.7/site-packages/nbdev/export2html.py", line 462, in write_tmpl
    dest.write_text(outp)
  File "/Users/uli/.pyenv/versions/3.7.9/lib/python3.7/pathlib.py", line 1240, in write_text
    with self.open(mode='w', encoding=encoding, errors=errors) as f:
  File "/Users/uli/.pyenv/versions/3.7.9/lib/python3.7/pathlib.py", line 1208, in open
    opener=self._opener)
  File "/Users/uli/.pyenv/versions/3.7.9/lib/python3.7/pathlib.py", line 1063, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/uli/Develop/GitHub/nb2ltx/docs/_data/topnav.yml'
hamelsmu commented 3 years ago

This appears to have been fixed in the current version of nbdev (clone this repo and run pip install -e .). Let us know if you continue to encounter this