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

ipywidgets "default.js:127 TypeError: Cannot read property 'emit' of undefined" #374

Closed
So-Cool opened this issue Mar 13, 2021 · 4 comments
Labels

Comments

@So-Cool
Copy link

So-Cool commented Mar 13, 2021

Describe the bug

An ipywidgets' button does not work through Thebe when embedded on a Jupyter Book page.
Pressing a button after launching Thebe gives the following error in the web browser's console:

default.js:127 TypeError: Cannot read property 'emit' of undefined
    at Object.output (manager.js:54)
    at e.onIOPub (services-shim.js:97)
    at t.KernelShellFutureHandler._handleIOPub (future.js:204)
    at async t.KernelShellFutureHandler.handleMsg (future.js:173)
    at async v._handleMessage (default.js:1038)
(anonymous) @ default.js:127
Promise.catch (async)
_onWSMessage @ default.js:124

To Reproduce

Steps to reproduce the behavior:

  1. Embed an ipywidgets' button on a Jupyter Book page
  2. Launch Thebe (via Live Code)
  3. Click the button

For example, see this page with button widgets.

Expected behavior

Clicking the button should execute the connected Python function.

Environment

  • Python Version [e.g. 3.7.1]: 3.7.10
  • Package versions or output of jupyter-book --version:
    • jupyter-book 0.10.1
    • sphinx-thebe 0.0.8
  • Operating System: Ubuntu 18.04.5 LTS

Additional context

N/A

@So-Cool So-Cool added the bug label Mar 13, 2021
@welcome
Copy link

welcome bot commented Mar 13, 2021

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@moorepants
Copy link
Collaborator

Thanks. Ipywidgets has very limited functionality with thebe. Related issues are #111 and #226.

@moorepants
Copy link
Collaborator

We've just merged some fixes that improve ipywidget functionality. Can you test with the tip of the master branch to see if your issue is resolved?

@So-Cool
Copy link
Author

So-Cool commented Mar 31, 2022

Apologies for not acting upon this earlier, @moorepants. Everything appears to work now. Thanks so much!

@So-Cool So-Cool closed this as completed Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants