Fix Notebook Errors

VerifiedSafe

Fixes errors encountered during Jupyter notebook execution. It addresses issues by either editing the notebook cells (if the problem is in the notebook logic or missing imports) or by patching the underlying Python source code (if the bug is in the library package).

Sby Skills Guide Bot
DevelopmentIntermediate
906/2/2026
Claude CodeCursorWindsurf
#notebook-errors#debugging#jupyter#python#fix-notebook

Recommended for

Our review

This skill fixes errors encountered during notebook execution by editing either the notebook cells or the underlying library source code.

Strengths

  • Thorough analysis of the traceback to identify the root cause
  • Direct fixes in notebook JSON cells or Python source files
  • Verification by re-running the notebook to ensure no regressions

Limitations

  • Requires understanding of both notebook and source code
  • Cannot resolve environment or external dependency issues
  • Limited to Python notebooks using an internal package
When to use it

Use when a notebook fails due to logic errors, missing imports, or bugs in the associated source code.

When not to use it

Avoid when the error stems from environment issues (package versions, missing dependencies) or external data problems that cannot be fixed by code changes.

Security analysis

Safe
Quality score75/100

The skill instructs on analyzing errors and editing notebook cells or source code; it does not execute any dangerous commands, exfiltrate data, or bypass security.

No concerns found

Examples

Fix missing import in notebook
This notebook cell failed with NameError: name 'np' is not defined. Fix the notebook by adding the missing import.
Fix bug in source code
The notebook error is caused by a bug in the `process_data` function in `gwexpy/utils.py`. Traceback shows IndexError. Fix the source code.
Fix notebook cell logic
The notebook cell fails with TypeError: cannot concatenate str and int. Identify the issue in the cell and fix it.

name: fix_notebook description: ノートブックのエラーを、そのノートブック自体の修正またはソースコードの修正により解決する

Fix Notebook Errors

This skill handles fixing errors encountered during notebook execution.

Instructions

  1. Analyze the Failure:

    • Examine the traceback to determine if the error is in the notebook cell's logic or the underlying library.
  2. Strategy A: Fix Notebook (Local):

    • If the usage is wrong or imports are missing, edit the .ipynb cells.
    • Modify the "source" field of the failing code cell in the notebook JSON.
  3. Strategy B: Fix Source Code:

    • If the bug is in the gwexpy/ package, trace it to the source file.
    • Apply the fix to the Python source while ensuring no regressions.
  4. Verification:

    • Re-run the notebook to confirm it passes.
Related skills