I have been working with nbdev in Google Colab using @pete88b 's great colab_helper notebook. It worked perfectly until about a week ago. Now, two of the functions crash with the same error message. The functions are: nbdev_build_docs() and nbdev_test_nbs(). The error message is:
TypeError Traceback (most recent call last)
<ipython-input-18-e9e09cc99e52> in <module>()
1 from nbdev.cli import nbdev_build_docs
----> 2 nbdev_build_docs()
4 frames
/usr/local/lib/python3.6/dist-packages/fastcore/script.py in _f(*args, **kwargs)
66 def _f(*args, **kwargs):
67 mod = inspect.getmodule(inspect.currentframe().f_back)
---> 68 if not mod: return func(*args, **kwargs)
69
70 p = anno_parser(func)
/usr/local/lib/python3.6/dist-packages/nbdev/cli.py in nbdev_build_docs(fname, force_all, mk_readme, n_workers, pause)
100 pause:Param("Pause time (in secs) between notebooks to avoid race conditions", float)=0.5):
101 "Build the documentation by converting notebooks mathing `fname` to html"
--> 102 notebook2html(fname=fname, force_all=force_all, n_workers=n_workers, pause=pause)
103 if fname is None: make_sidebar()
104 if mk_readme: make_readme()
/usr/local/lib/python3.6/dist-packages/nbdev/export2html.py in notebook2html(fname, force_all, n_workers, cls, template_file, exporter, dest, pause, execute)
582 else:
583 passed = parallel(_notebook2html, files, n_workers=n_workers, cls=cls,
--> 584 template_file=template_file, exporter=exporter, dest=dest, pause=pause, execute=execute)
585 if not all(passed):
586 msg = "Conversion failed on the following:\n"
/usr/local/lib/python3.6/dist-packages/fastcore/utils.py in parallel(f, items, n_workers, total, progress, pause, timeout, chunksize, *args, **kwargs)
710 "Applies `func` in parallel to `items`, using `n_workers`"
711 if progress is None: progress = progress_bar is not None
--> 712 with ProcessPoolExecutor(n_workers, pause=pause) as ex:
713 r = ex.map(f,items, *args, timeout=timeout, chunksize=chunksize, **kwargs)
714 if progress:
/usr/local/lib/python3.6/dist-packages/fastcore/utils.py in __init__(self, max_workers, on_exc, pause, mp_context, initializer, initargs)
691 self.not_parallel = max_workers==0
692 if self.not_parallel: max_workers=1
--> 693 super().__init__(max_workers, mp_context=mp_context, initializer=initializer, initargs=initargs)
694
695 def map(self, f, items, timeout=None, chunksize=1, *args, **kwargs):
TypeError: __init__() got an unexpected keyword argument 'mp_context'
Furthermore, !nbdev_fix_merge index.ipynb fails with the following message
Traceback (most recent call last):
File "/usr/local/bin/nbdev_fix_merge", line 8, in <module>
sys.exit(nbdev_fix_merge())
File "/usr/local/lib/python3.6/dist-packages/fastcore/script.py", line 77, in _f
func(**args.__dict__)
File "/usr/local/lib/python3.6/dist-packages/nbdev/cli.py", line 157, in nbdev_fix_merge
fix_conflicts(fname, fast=fast, trust_us=trust_us)
File "/usr/local/lib/python3.6/dist-packages/nbdev/merge.py", line 96, in fix_conflicts
start,cells,end = extract_cells(raw_text)
File "/usr/local/lib/python3.6/dist-packages/nbdev/merge.py", line 14, in extract_cells
while not lines[i].startswith(' "cells"'): i+=1
IndexError: list index out of range
Any help will be appreciated. The nebdev tool working in Google Colab, thanks to @pete88b, has been a great aid in development.