Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbdev_readme() fails on the second run for the notebook with support files (e.g. Fig image). #1106

Closed
nueshym opened this issue Sep 21, 2022 · 0 comments · Fixed by #1143
Closed
Labels
bug Something isn't working

Comments

@nueshym
Copy link

nueshym commented Sep 21, 2022

Minimal setup to reproduce this error:
https:/nueshym/nbdev_readme_error/blob/main/nbdev_readme_test.ipynb

Problem

Executing nbdev_readme() while there's already exported support files folder exists at root directory cause:

FileExistsError: [Errno 17] File exists: '<abs_path_to_root>/index_files'

At

if _rdmi.exists(): copytree(_rdmi, cfg_path/_rdmi.name) # Move Supporting files for README

Expected behaviour

README.md and support files are exported to root directory.

Actual behaviour

support files are not exported.

Solution

Check if the directory exists before copytree.

...

And there's another weird bug closely related to this one:
You can't use readme.ipynb for readme_nb.
failed with:

ERROR: NotFound: No such file or directory (os error 2)

Seems the name readme conflicting with something at quarto or pandoc level.
I will submit as an another issue if you want but that requires another fresh project to reproduce...

Thanks for great project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants