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

nbdev_update_lib errors out when fname not supplied #415

Closed
RenzoBenemerito opened this issue Feb 4, 2021 · 6 comments · Fixed by #416
Closed

nbdev_update_lib errors out when fname not supplied #415

RenzoBenemerito opened this issue Feb 4, 2021 · 6 comments · Fixed by #416
Labels
bug Something isn't working

Comments

@RenzoBenemerito
Copy link

if fname.endswith('.ipynb'): raise ValueError("`nbdev_update_lib` operates on .py files. If you wish to convert notebooks instead, see `nbdev_build_lib`.")

When doing nbdev_update_lib without specifying the optional fname argument, it fails with an error as shown below instead of traversing the lib path directory.

image

@RenzoBenemerito RenzoBenemerito changed the title nbdev_update_lib errors out when fname not given nbdev_update_lib errors out when fname not supplied Feb 4, 2021
@hamelsmu
Copy link
Member

hamelsmu commented Feb 5, 2021

edit: found the link, but I cannot reproduce your error. I'm pretty sure you need to ugprade nbdev

pip install -U git+https://github.com/fastai/nbdev.git

@hamelsmu hamelsmu closed this as completed Feb 5, 2021
@hamelsmu
Copy link
Member

hamelsmu commented Feb 5, 2021

If upgrading doesn't fix it for you will be happy to reopen this issue please let me know.

@RenzoBenemerito
Copy link
Author

If upgrading doesn't fix it for you will be happy to reopen this issue please let me know.

The problem still persists, I already have the latest version of nbdev

image

I think we need to add a None checker before the if statement in the code. If the default of fname is None and you execute the if statement fname.endswith, it will cause the error seen above.

@hamelsmu hamelsmu reopened this Feb 5, 2021
@hamelsmu hamelsmu added the bug Something isn't working label Feb 5, 2021
@hamelsmu
Copy link
Member

hamelsmu commented Feb 5, 2021

Thanks. I was testing the wrong command! I was testing nbdev_build_lib instead 🤦🏽 sorry. This is going to be fixed shortly via #416

@RenzoBenemerito
Copy link
Author

Thanks. I was testing the wrong command! I was testing nbdev_build_lib instead 🤦🏽 sorry. This is going to be fixed shortly via #416

Thank you sir! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants