I’ve been using nbdev for this project and thus far the [source] links in the documentation were working perfectly, but they all appeared to break with this most recent push. For example, if I want to go here to my bcml_model class and see the source code, the url used by the documentation is
I just upgraded to fastcore version 1.5.4 and now I get the following error when I run nbdev_build_docs
converting: /Users/sheridan/Academic/bcml4pheno/full_example.ipynb
[IPKernelApp] ERROR | KeyboardInterrupt caught in kernel.
'coroutine' object is not subscriptable
/Users/sheridan/opt/anaconda3/envs/pheno_pip/lib/python3.9/site-packages/nbdev/export2html.py:514: RuntimeWarning: coroutine 'ZMQSocketChannel.get_msg' was never awaited
return False
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Conversion failed on the following:
full_example.ipynb
converting /Users/sheridan/Academic/bcml4pheno/index.ipynb to README.md
Traceback (most recent call last):
File "/Users/sheridan/opt/anaconda3/envs/pheno_pip/bin/nbdev_build_docs", line 8, in <module>
sys.exit(nbdev_build_docs())
File "/Users/sheridan/opt/anaconda3/envs/pheno_pip/lib/python3.9/site-packages/fastcore/script.py", line 117, in _f
tfunc(**merge(args, args_from_prog(func, xtra)))
File "/Users/sheridan/opt/anaconda3/envs/pheno_pip/lib/python3.9/site-packages/nbdev/export2html.py", line 650, in nbdev_build_docs
if mk_readme: make_readme()
File "/Users/sheridan/opt/anaconda3/envs/pheno_pip/lib/python3.9/site-packages/nbdev/export2html.py", line 630, in make_readme
convert_md(index_fn, get_config().config_file.parent, jekyll=False)
File "/Users/sheridan/opt/anaconda3/envs/pheno_pip/lib/python3.9/site-packages/nbdev/export2html.py", line 555, in convert_md
exp = nbdev_exporter(cls=MarkdownExporter, template_file='jekyll-md.tpl' if jekyll else 'md.tpl')
File "/Users/sheridan/opt/anaconda3/envs/pheno_pip/lib/python3.9/site-packages/nbdev/export2html.py", line 475, in nbdev_exporter
exporter.template_paths.append(str(Path(__file__).parent/'templates'))
AttributeError: 'MarkdownExporter' object has no attribute 'template_paths'
That’s either an old version of nbconvert or nbdev. The issue is that a couple of years ago, nbconvert made a non backward compatible change. In a recent version of nbdev we updated things to use their new API.
Thanks for getting back to me so fast. My nbdev is version 1.2.11 which pypi confirms is the most recent release, while my nbconvert is version 6.5.0 which pypi shows as the most recent version that isn’t a pre-release. Do I need to get an nbconvert pre-release?
In that case, I’ll admit I’m perplexed: when I run conda list I can pick out the following package versions, which all appear to be up to date. I can’t understand why I’d be experiencing a month-old problem with very recently updated packages.
I do notice, though, that fastcore does say 1.5.3 here: since identifying this, I have many times attempted to reinstall fastcore version 1.5.4 (using both pip and conda) but every time conda and pip both confirm that 1.5.4 is indeed installed butconda continues to print out a version number of 1.5.3 each time I run conda list or conda list fastcore. I’m unsure if this is connected or not…
and after updating the docs and pushing everything to github, I am continuing to have broken links to source code in my documentation (as can be seen here for example).