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

Fix missing source in Jupyter notebook/lab #93

Merged
merged 1 commit into from
Sep 5, 2021
Merged

Fix missing source in Jupyter notebook/lab #93

merged 1 commit into from
Sep 5, 2021

Commits on Sep 2, 2021

  1. Fix missing source in Jupyter notebook/lab

    Profiling in Jupyter Notebooks or Jupyter Lab with recent ipykernel
    versions (>= 6), resulted in the following error message:
    
        Could not find file /tmp/ipykernel_8298/3242911465.py
        Are you sure you are running this program from the same
        directory that you ran the profiler from?
        Continuing without the function's contents.
    
    The timing output then does not include source code lines.
    
    The problem is that line_profiler tries to determine when it runs in
    side IPython/Jupyter using a simple heuristic based on the reported
    filename. New ipykernel versions changed this filename pattern and broke
    our test.
    
    As a quick fix, amend the test so it continues working. Longer term, a
    more robust solution would be desirable.
    
    Fixes #86
    ChrisAichinger committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    e7e1abb View commit details
    Browse the repository at this point in the history