Skip to content

title: "## pipeio_nb_exec runs papermill from MCP server env, not notebook kernel env status: resolved created: 2026-04-09 updated: 2026-04-09 timestamp: 20260409-232034-115590 tags: [issue] source: agent-observation project_primary: projio capture_id: 20260409-232032-63af45 confidence: 1.0 transcript_file: /storage2/arash/worklog/workflow/captures/20260409-232032-63af45/transcript.txt


pipeio_nb_exec runs papermill from MCP server env, not notebook kernel env

When pipeio_nb_exec runs a notebook that specifies kernel: cogpy, papermill executes from the MCP server's own Python environment (rag), not the cogpy conda env. This causes ModuleNotFoundError for any package only installed in the kernel env (cogpy, pipeio, sutil, etc.).

Observed behavior

  • pipeio_nb_exec(flow="preprocess_ieeg", name="ttl_characterization_removal", timeout=7200) → error at first cell: ModuleNotFoundError: No module named 'utils.bootstrap'
  • The notebook has kernel: cogpy in its jupytext metadata and a registered Jupyter kernelspec cogpy pointing to the conda env.

Expected behavior

pipeio_nb_exec should either: 1. Run conda run -n <kernel_env> papermill ... (resolve kernel name → conda env), or 2. Use jupyter nbconvert --execute --ExecutePreprocessor.kernel_name=cogpy which respects the kernelspec, or 3. Launch papermill with -k cogpy and let Jupyter's kernel machinery handle env activation.

Workaround

Manual: conda run -n cogpy jupyter nbconvert --to notebook --execute --ExecutePreprocessor.kernel_name=cogpy --ExecutePreprocessor.timeout=7200 ...


Source context: pixecog

PixEcog (pixecog): Neuropixels and ECoG dataset and analysis

Recent commits:

8dc0d9d Pipeline docs: gitignore docs/pipelines/, relocate hand-authored files
96cd1ec Refactor sharpwaveripple/contracts: extract generic helpers to utils/io, remove pipelines __init__.py
36f9326 Add result note directory and sample note

README:


type: readme


Quick Start for Collaborators

Follow this checklist to get started with Pixecog documentation and workflows.

🐀 Pixecog Project — Compact Overview

Core principles

  • One immutable BIDS raw dataset (raw/) as the canonical baseline
  • Each analysis pipeline ha