nbdev_template icon indicating copy to clipboard operation
nbdev_template copied to clipboard

TypeError: __init__() missing 2 required positional arguments: 'cfg_path' and 'cfg_name'

Open dsm-72 opened this issue 3 years ago • 11 comments

How to reproduce

  1. new repo based off of template
  2. update settings.ini to match personal repo and user
  3. update index.ipynb so that your_lib_name is lib_name from settings.ini
  4. run nbdev_install_git_hooks
  5. run nbdev_clean_nbs
  6. run nbdev_build_lib && nbdev_build_docs
  7. get error

dsm-72 avatar Jun 17 '22 19:06 dsm-72

Traceback (most recent call last):
  File "/home/USER/anaconda3/envs/ml/bin/nbdev_build_lib", line 10, in <module>
    sys.exit(nbdev_build_lib())
  File "/home/USER/anaconda3/envs/ml/lib/python3.9/site-packages/fastcore/script.py", line 113, in _f
    tfunc(**merge(args, args_from_prog(func, xtra)))
  File "/home/USER/anaconda3/envs/ml/lib/python3.9/site-packages/nbdev/export2html.py", line 477, in nbdev_build_lib
    write_tmpls()
  File "/home/USER/anaconda3/envs/ml/lib/python3.9/site-packages/nbdev/export2html.py", line 467, in write_tmpls
    cfg = Config()
TypeError: __init__() missing 2 required positional arguments: 'cfg_path' and 'cfg_name'

dsm-72 avatar Jun 17 '22 19:06 dsm-72

@muellerzr any idea?

dsm-72 avatar Jun 17 '22 19:06 dsm-72

Upgrade your fastcore?

muellerzr avatar Jun 17 '22 20:06 muellerzr

@muellerzr how do I do that?

dsm-72 avatar Jun 20 '22 18:06 dsm-72

@muellerzr ok, I ran conda update fastcore and I still get the same error

dsm-72 avatar Jun 20 '22 18:06 dsm-72

What is the fastcore currently installed and nbdev installed?

pip show fastcore nbdev

On Mon, Jun 20, 2022, 2:07 PM dsm-72 @.***> wrote:

@muellerzr https://github.com/muellerzr ok, I ran conda update fastcore and I still get the same error

— Reply to this email directly, view it on GitHub https://github.com/fastai/nbdev_template/issues/104#issuecomment-1160719463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3YCV6LGY57263FV4NR3RDVQCXNJANCNFSM5ZDIE5OA . You are receiving this because you were mentioned.Message ID: @.***>

muellerzr avatar Jun 20 '22 18:06 muellerzr

Fastcore was up to date. However nbcovert was 5.5.0 and nbdev was 1.1.5 and conda update nbdev didn't run. So I forced it with conda install -c fastai nbdev=1.2.10 and now I get:

Traceback (most recent call last):
  File "/home/USER/anaconda3/envs/ml/bin/nbdev_build_lib", line 7, in <module>
    from nbdev.export2html import nbdev_build_lib
  File "/home/USER/anaconda3/envs/ml/lib/python3.9/site-packages/nbdev/export2html.py", line 15, in <module>
    from .showdoc import *
  File "/home/USER/anaconda3/envs/ml/lib/python3.9/site-packages/nbdev/showdoc.py", line 12, in <module>
    from fastcore.docments import _docments, isclass, _clean_comment, _tokens, _param_locs, _get_comment
ImportError: cannot import name '_docments' from 'fastcore.docments' (/home/USER/anaconda3/envs/ml/lib/python3.9/site-packages/fastcore/docments.py)

@muellerzr

dsm-72 avatar Jun 20 '22 18:06 dsm-72

fastcore  1.4.4
nbconvert 6.4.4
nbdev     1.2.10

dsm-72 avatar Jun 20 '22 18:06 dsm-72

You need 1.4.5. @jph00 was that released on conda?

For the time being do pip install fastcore -U

On Mon, Jun 20, 2022, 2:18 PM dsm-72 @.***> wrote:

fastcore 1.4.4 nbconvert 6.4.4 nbdev 1.2.10

— Reply to this email directly, view it on GitHub https://github.com/fastai/nbdev_template/issues/104#issuecomment-1160728821, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3YCV4GAOFLOQL7ELP6YL3VQCYYZANCNFSM5ZDIE5OA . You are receiving this because you were mentioned.Message ID: @.***>

muellerzr avatar Jun 20 '22 18:06 muellerzr

How do I do that?

On Jun 17, 2022, at 16:24, Zachary Mueller @.***> wrote:

 Upgrade your fastcore?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

dsm-72 avatar Oct 11 '22 08:10 dsm-72

https://anaconda.org/fastchan/fastcoreMessage ID: @.***>

jph00 avatar Oct 11 '22 08:10 jph00