AnswerDotAI / AnswerDotAI/nbdev

`nbdev_docs` raises `FileNotFoundError` when looking for `_proc/docs`

Open
#1,384 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
5.3k
Forks
513
Avg merge
2d 30m
Merged PRs (30d)
8

Description

Hi, I am having some recent trouble creating the docs for my library (https://github.com/andichallenge/andi_datasets). Everything used to work fine but recently, whenever I try to run `nbdev_docs`, I get this error:

```
FileNotFoundError: [Errno 2] No such file or directory: '/home/gorka/github/andi_datasets/_proc/docs' -> '/home/gorka/github/andi_datasets/docs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/gorka/miniconda3/envs/andi/bin/nbdev_docs", line 8, in
sys.exit(nbdev_docs())
File "/home/gorka/miniconda3/envs/andi/lib/python3.10/site-packages/fastcore/script.py", line 119, in _f
return tfunc(**merge(args, args_from_prog(func, xtra)))
File "/home/gorka/miniconda3/envs/andi/lib/python3.10/site-packages/nbdev/quarto.py", line 230, in nbdev_docs
move(cache/cfg.doc_path.name, cfg.config_path)
File "/home/gorka/miniconda3/envs/andi/lib/python3.10/site-packages/fastcore/shutil.py", line 8, in _f
def _f(src, dst, *args, **kwargs): return f(str(src), str(dst), *args, **kwargs)
File "/home/gorka/miniconda3/envs/andi/lib/python3.10/shutil.py", line 835, in move
copy_function(src, real_dst)
File "/home/gorka/miniconda3/envs/andi/lib/python3.10/shutil.py", line 434, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/home/gorka/miniconda3/envs/andi/lib/python3.10/shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/home/gorka/github/andi_datasets/_proc/docs'
```

Somehow `nbdev_docs`, is looking for `_proc/docs`, which does not exists. `nbdev_preview` works just fine and I can see the docs in my localhost. I have run `nbdev_docs` in another similar library and everything works fine there, even though `_proc/docs` is neither being created in that one.

How is it that in this library `nbdev_docs` looks for `_proc/docs`? Nothing in the settings.ini or so seems to point there. This means that also the CI is failing when pushing to github. Any leads on how to solve this? Thanks!

Contributor guide

Open the contributing guide

Research direction

Start at nbdev/quarto.py around nbdev_docs line 230 and inspect how cfg.doc_path and cfg.config_path are derived, then compare the behavior with nbdev_preview and the affected settings.ini. Reproduce the command in the reported library and verify that nbdev_docs completes without requiring a nonexistent _proc/docs path and that CI no longer fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.