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

[BUG] ModuleNotFoundError for ipython_genutils #206

Closed
AlpAribal opened this issue Mar 11, 2022 · 5 comments
Closed

[BUG] ModuleNotFoundError for ipython_genutils #206

AlpAribal opened this issue Mar 11, 2022 · 5 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@AlpAribal
Copy link

Describe the bug
After the recent ipython version bump, our flake8-nb precommit hooks started failing with the error: ModuleNotFoundError: No module named 'ipython_genutils'.

To Reproduce
Steps to reproduce the behavior:

conda create -n test python=3.8
conda activate test
pip install flake8-nb
python
>>> import flake8_nb

Expected behavior
flake8_nb should be imported without any errors.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version 20.04

Additional context
This might be due to ipykernel not stating its dependencies properly, see here.

@AlpAribal AlpAribal added the bug Something isn't working label Mar 11, 2022
@AlpAribal AlpAribal changed the title [BUG] [BUG] ModuleNotFoundError for ipython_genutils Mar 11, 2022
@s-weigand
Copy link
Owner

Thanks for reporting this error!
I can reproduce it.
It seems to be an issue with nbconvert which uses ipython_genutils directly without declaring it in their dependencies, but a hotfix is already on its way.
This bug is atm only 16h old and most likely won't get 24h old, so I would say just wait a bit.
Having indirect dependencies which piggybacked in with a dependency of a dependency is a quite common problem with python packages, so huge props for the nbconvert maintainers for their quick reaction.

If you urgently need to keep on working you can just add ipython_genutils as an additional dependency as a quick fix in your .pre-commit-config.yaml

- repo: https://github.com/s-weigand/flake8-nb
  rev: 0.4.0
  hooks:
  - id: flake8-nb
    additional_dependencies: [ipython_genutils]

Since this is an upstream problem that will soon be fixed I will close the issue.

@s-weigand s-weigand added wontfix This will not be worked on and removed bug Something isn't working labels Mar 11, 2022
@s-weigand
Copy link
Owner

@all-contributors please add @AlpAribal for bug

@allcontributors
Copy link
Contributor

@s-weigand

I've put up a pull request to add @AlpAribal! 🎉

@s-weigand
Copy link
Owner

@AlpAribal nbconvert made a new release and the issue is fixed (see update PR with passing CI).
If pre-commit uses the cached version of the broken env you can just do a pre-commit clean to remove all cached envs.

@AlpAribal
Copy link
Author

Thank you for the update, that was fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants