fastai / nbdev_template

Template for nbdev projects
https://nbdev.fast.ai/
Apache License 2.0
291 stars 99 forks source link

CI fails on nbdev_test_nbs: TypeError: __init__() got an unexpected keyword argument 'mp_context' #25

Closed joedockrill closed 3 years ago

joedockrill commented 3 years ago

Hi Jeremy,

I have the impression from somewhere you might be aware of this already but I might have that wrong so logging it just in case.

A fresh copy of nbdev fails CI on the "Run tests" step

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.12/x64/bin/nbdev_test_nbs", line 8, in <module>
    sys.exit(nbdev_test_nbs())
  File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/fastscript/core.py", line 76, in _f
    func(**args.__dict__)
  File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/nbdev/cli.py", line 66, in nbdev_test_nbs
    results = parallel(_test_one, files, flags=flags, verbose=verbose, n_workers=n_workers, pause=pause)
  File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/fastcore/utils.py", line 712, in parallel
    with ProcessPoolExecutor(n_workers, pause=pause) as ex:
  File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/fastcore/utils.py", line 693, in __init__
    super().__init__(max_workers, mp_context=mp_context, initializer=initializer, initargs=initargs)
TypeError: __init__() got an unexpected keyword argument 'mp_context'
##[error]Process completed with exit code 1.

installing fastcore 1.0.9 like so makes it go away.

run: |
        pip install fastcore==1.0.9
        nbdev_test_nbs

Regards, Joe

hamelsmu commented 3 years ago

This has been fixed in current versions of fastcore/nbdev. Thanks