Skip to content

ModuleNotFoundError: No module named 'ipython_genutils' #102

Open

Description

@yasirroni

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.

Activity

  1. alex-remedios commented on Mar 7, 2023

    @alex-remedios
    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.

  2. yasirroni commented on Mar 7, 2023

    @yasirroni
    Author

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

  3. yasirroni commented on Mar 8, 2023

    @yasirroni
    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

  4. yasirroni commented on Mar 18, 2023

    @yasirroni
    Author

    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).

  5. alex-remedios commented on Mar 20, 2023

    @alex-remedios
    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)

  6. added
    bug
    on Mar 20, 2023
  7. yasirroni commented on Mar 20, 2023

    @yasirroni
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions