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

Couldn't add child view to box when rendering widgets #72

Closed
aggFTW opened this issue Nov 4, 2015 · 3 comments
Closed

Couldn't add child view to box when rendering widgets #72

aggFTW opened this issue Nov 4, 2015 · 3 comments
Milestone

Comments

@aggFTW
Copy link

aggFTW commented Nov 4, 2015

Hi,

I recently created a kernel that inherits directly from IPythonKernel: class MyKernel(IPythonKernel)
The reason I inherit directly from IPythonKernel and not KernelBase is that I was having trouble getting magics support from KernelBase out of the box.

Anyways, when I try to display a Widget in MyKernel, I get a Javascript error that I am having a very hard time debugging. Message from browser console below. Notice that the widget tabs omit the content of the widget children:
screen shot 2015-11-03 at 6 43 00 pm

When i run the same piece of code that renders the same widget on the real IPythonKernel, it looks like this, with children displaying correctly:
screen shot 2015-11-03 at 6 45 17 pm

Any help would be appreciated!

Thanks!

Javascript error message:

Uncaught (in promise) WrappedError {stack: "Error: Couldn't add child view to box↵    at new E…in.js?v=40e10638fcf65fc1c057bff31d165e9d:12785:33", message: "Couldn't add child view to box", error_stack: Array[4]}error_stack: Array[4]0: TypeError: require is not a function
    at http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12740:17
    at Object.load_class (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12736:16)
    at http://localhost:8888/nbextensions/widgets/widgets/js/manager.js?v=20151103005149:74:261: Error: Couldn't create a view for model id '5ce5e524d89f44fd84f229604853b122'
    at new Error (native)
    at Error.WrappedError (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12706:25)
    at http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12785:33message: "Couldn't create a view for model id '5ce5e524d89f44fd84f229604853b122'"stack: (...)get stack: ()set stack: ()__proto__: DefineError.bh2: Error: Couldn't create child view
    at new Error (native)
    at Error.WrappedError (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12706:25)
    at http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12785:33message: "Couldn't create child view"stack: (...)get stack: ()set stack: ()__proto__: DefineError.bh3: Error: Couldn't add child view to box
    at new Error (native)
    at Error.WrappedError (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12706:25)
    at http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12785:33length: 4__proto__: Array[0]message: "Couldn't add child view to box"stack: "Error: Couldn't add child view to box↵    at new Error (native)↵    at Error.WrappedError (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12706:25)↵    at http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12785:33"__proto__: Object
@aggFTW
Copy link
Author

aggFTW commented Nov 5, 2015

Hi, friendly ping :)
I don't know if there is an opportunity to refactor the kernel here so that magics work on kernels or if it's just a bug in ipywidgets. I'd appreciate your comments.

Thanks!

@minrk
Copy link
Member

minrk commented Nov 13, 2015

This is probably a question for ipywidgets. @jdfreder?

@jdfreder
Copy link
Member

Actually I've already been helping @aggFTW in jupyter-widgets/ipywidgets#233 , which is the same issue, in the right repo. We can close this.

@minrk minrk added this to the no action milestone Nov 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants