nbdev: nbdev_nb2md throws error when called in a notebook
When I tried to call nbdev_nb2md
I got the following error, which I don’t know how to handle:
I’m Using nbdev 1.1.11
➜ nb2ltx git:(master) ✗ pip list | grep nbdev
nbdev 1.1.11
An other issue appeared, when I tried to call nbdev_nb2md
on the command line. If I try to use the argument --img_path
I get an error:
➜ nb2ltx git:(master) ✗ nbdev_nb2md --dest tex --img_path 'tex/images' 10_Code.ipynb
usage: nbdev_nb2md [-h] [--dest DEST] [--use_img USE_IMG] [--replace REPLACE] path_nb
nbdev_nb2md: error: unrecognized arguments: --img_path 10_Code.ipynb
What puzzles me is the [--use_img USE_IMG]
in the usage section of the error message. There seems to be a connection to the error message from the notebook because --use_img
is mentioned there also . If I execute nbdev_nb2md -h
on the command line there is no option --use_img
mentioned.
➜ nb2ltx git:(master) ✗ nbdev_nb2md -h
usage: nbdev_nb2md [-h] [--dest DEST] [--img_path IMG_PATH] [--jekyll JEKYLL] fname
Convert the notebook in `fname` to a markdown file
positional arguments:
fname A notebook file name to convert
optional arguments:
-h, --help show this help message and exit
--dest DEST The destination folder (default: .)
--img_path IMG_PATH Folder to export images to (default: )
--jekyll JEKYLL To use jekyll metadata for your markdown file or not (default: False)
Having read the contribution guidelines, I tried to call import fastai.utils.collect_env; fastai.utils.collect_env.show_install(1)
but was stopped by an error message. Is fastai.utils.collect_env
still part of the current fastai version?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (8 by maintainers)
Yes, the same happens in a terminal environment:
The command was:
nbdev_nb2md --dest mdFiles --img_path imgs 30_HelloPicTwo.ipynb
I took this from the notebook 00_core.ipynb of the test case repository nbdt_issue381