AnswerDotAI / AnswerDotAI/execnb

What is equivalent to `InteractiveShell.kernel.comm_manager.register_target('file_request', target_func)`?

Open
#51 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
138
Forks
12
Avg merge
1m
Merged PRs (30d)
1

Description

Hi,
I encountered this error while using an [interactive tool](https://github.com/igvteam/igv-notebook/blob/b81c898f726bebad1306a1dc09d4009e23c68417/igv_notebook/file_reader.py#L61C60-L61C72) through CaptureShell:
```
---> 61 get_ipython().kernel.comm_manager.register_target('file_request', target_func)
AttributeError: 'CaptureShell' object has no attribute 'kernel'
```
Is there any equivalent to InteractiveShell's `InteractiveShell.kernel.comm_manager.register_target('file_request', target_func)` or colab notebook's `google.colab.output.register_callback('ReadFile', callback)` attributes that I could use to resolve the error?
Thanks.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with igv_notebook/file_reader.py at line 61 and trace how CaptureShell handles the call to register_target. Compare the available CaptureShell execution path with InteractiveShell and the linked Colab callback behavior. Done means the supported equivalent or limitation is identified and the file_request flow no longer depends on a missing kernel attribute.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.