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

ModuleNotFoundError: No module named 'ipython_genutils' #102

Open
yasirroni opened this issue Mar 7, 2023 · 6 comments
Open

ModuleNotFoundError: No module named 'ipython_genutils' #102

yasirroni opened this issue Mar 7, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@yasirroni
Copy link

Describe the bug
In a rare case, an error might happen due to ipython_genutils not properly installed. That is because nbmake did not require ipython_genutils nor jupyter explicitly. Others also get this behavior while using IPython ipython/ipython_genutils#3.

On my use case, the error happen on matpower-pip workflow and fixed with a commit yasirroni/matpower-pip@ae73edf

To Reproduce
I don't know exactly how to reproduce, but install nbmake seems not installing ipython_genutils

Expected behavior
Whenever someone using nbmake, we can assume that they are going to test IPython file. Then, isn't logical to make nbmake require at least jupyter?

Screenshots

Desktop (please complete the following information):

  • OS: Linux
  • GitHub action

If not installing jupyter by default is the expected behavior, please ignore and close this issue.

@alex-treebeard
Copy link
Member

thanks for the report @yasirroni

I need to look a bit further but it's likely this is caused by a combination of pkg version.

See the source repo: https://github.com/ipython/ipython_genutils

It implies we shouldn't be depending on it, so let's try figure out how to resolve this issue without adding the dependency.

@yasirroni
Copy link
Author

On my use case, simply adding jupyter as dependency solve the issue.

@yasirroni
Copy link
Author

Another issue

NBMAKE INTERNAL ERROR
Kernel died before replying to kernel_info

...

ImportError: cannot import name 'write_connection_file' from 'jupyter_client' (/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/jupyter_client/__init__.py)

See https://github.com/yasirroni/matpower-pip/actions/runs/4355686258/jobs/7627873484

@yasirroni
Copy link
Author

yasirroni commented Mar 18, 2023

After some digging, it seems that the bug might be from a cell containing !pip install SOMETHING==... that cause incompatibility of Jupyter. Solved using os.sytem() approach that detect the version used by the environment (thus, avoiding reinstallation that might cause a bug).

@alex-treebeard
Copy link
Member

thanks for the follow up @yasirroni , think I'll leave this one open as a bug for now, given that we should be eliminating internal errors (in favour of something more helpful)

@alex-treebeard alex-treebeard added the bug Something isn't working label Mar 20, 2023
@yasirroni
Copy link
Author

Sure. This kind of bug is pretty silent and challenging to solve! Hope you can catch this error and return a proper message for user.

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

No branches or pull requests

2 participants