AnswerDotAI / AnswerDotAI/nbdev

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

Aperta
#1,384 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Jupyter Notebook
Stelle
5.3k
Fork
513
Merge medio
2g 30m
PR unite (30g)
8

Descrizione

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!

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Parti da nbdev/quarto.py, intorno alla riga 230 di nbdev_docs, e verifica come vengono derivati cfg.doc_path e cfg.config_path; quindi confronta il comportamento con nbdev_preview e con il settings.ini interessato. Riproduci il comando nella libreria segnalata e verifica che nbdev_docs venga completato senza richiedere un percorso _proc/docs inesistente e che CI non fallisca più.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
jupyter-notebook, python
Ambito
documentation, tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.