Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dsm-72 opened this issue Jun 17, 2022 · 11 comments

Comments

@dsm-72
Copy link

dsm-72 commented Jun 17, 2022

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
Copy link
Author

dsm-72 commented Jun 17, 2022

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
Copy link
Author

dsm-72 commented Jun 17, 2022

@muellerzr any idea?

@muellerzr
Copy link
Collaborator

Upgrade your fastcore?

@dsm-72
Copy link
Author

dsm-72 commented Jun 20, 2022

@muellerzr how do I do that?

@dsm-72
Copy link
Author

dsm-72 commented Jun 20, 2022

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

@muellerzr
Copy link
Collaborator

muellerzr commented Jun 20, 2022 via email

@dsm-72
Copy link
Author

dsm-72 commented Jun 20, 2022

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
Copy link
Author

dsm-72 commented Jun 20, 2022

fastcore  1.4.4
nbconvert 6.4.4
nbdev     1.2.10

@muellerzr
Copy link
Collaborator

muellerzr commented Jun 20, 2022 via email

@dsm-72
Copy link
Author

dsm-72 commented Oct 11, 2022 via email

@jph00
Copy link
Member

jph00 commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants