fastai / nbdev

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

Does nbdev work with Windows? #389

Closed dilzeem closed 3 years ago

dilzeem commented 3 years ago

Hi,

I know there is an issue related to some windows errors. I attempted to follow the tutorial using powershell to but it fails when I try to nbdev_build_lib

with the following error:

  File "c:\users\sivaharan.rajkumar\miniconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\sivaharan.rajkumar\miniconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\sivaharan.rajkumar\Miniconda3\Scripts\nbdev_build_lib.exe\__main__.py", line 7, in <module>
  File "c:\users\sivaharan.rajkumar\miniconda3\lib\site-packages\fastcore\script.py", line 85, in _f
    tfunc(**merge(args, args_from_prog(func, xtra)))
  File "c:\users\sivaharan.rajkumar\miniconda3\lib\site-packages\nbdev\export2html.py", line 477, in nbdev_build_lib
    write_tmpls()
  File "c:\users\sivaharan.rajkumar\miniconda3\lib\site-packages\nbdev\export2html.py", line 470, in write_tmpls
    write_tmpl(topnav_tmpl, 'host git_url', cfg, path/'_data'/'topnav.yml')
  File "c:\users\sivaharan.rajkumar\miniconda3\lib\site-packages\nbdev\export2html.py", line 462, in write_tmpl
    dest.write_text(outp)
  File "c:\users\sivaharan.rajkumar\miniconda3\lib\pathlib.py", line 1235, in write_text
    with self.open(mode='w', encoding=encoding, errors=errors) as f:
  File "c:\users\sivaharan.rajkumar\miniconda3\lib\pathlib.py", line 1203, in open
    opener=self._opener)
  File "c:\users\sivaharan.rajkumar\miniconda3\lib\pathlib.py", line 1058, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\sivaharan.rajkumar\\projects\\pa-logging\\docs\\_data\\topnav.yml'

when I look at the directory there is indeed no file or directory _data there. Is there something missing? I also created the project using nbdev_new.

igorbrigadir commented 3 years ago

Does it work if you try creating a new project using https://github.com/fastai/nbdev_template?

dilzeem commented 3 years ago

Thanks. I didn't try use it.

But it seems like the issue actually has already been raised there.

https://github.com/fastai/nbdev_template/issues/31

So I will close this one.