-
Notifications
You must be signed in to change notification settings - Fork 192
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
pythreejs under JupyterLab 0.33.6: Error: "Could not create a model." #206
Comments
What version of the |
Working extensions are (among some): plotlywidget v0.2.0 (plotly.js 1.39.3), bqplot, etc. |
Ah, good, so you do have some ipywidgets extensions working. IIRC, widget declaration shouldn't have changed (i.e., all the other widget jlab extensions should work just fine too). |
Just to double check, try running: jupyter lab clean
jupyter lab build If that doesn't change anything, you could try to inspect the objects in the web developer console where the exception occurs, and see if you can learn anything. As it is, this is rather hard to figure out remotely, unfortunately. |
I'd done that before, and re-run these lines now. I've upgraded to JLab to 0.33.6, as also to the most recent IPython, ipykernel, etc. The error is still manifest itself, as also the absence of (some) widgets functionality. I asked on ipywidgets about the diagnostic message I'm getting from a kernel ('KeyError'). Please, feel free to suggest possible solutions and further investigations. There is no helpful messages from a debug log, the abovementioned messages from the Chrome console, and uncovered 'KeyError' (with the help of |
cf jupyter-widgets/ipywidgets#2163 for the ipywidgets issue. |
I can reproduce, I'll have a look at it. |
I'm only able to reproduce this when I forget to install the conda create -n pythree-test pythreejs jupyterlab
conda activate pythree-test
jupyter labextension install jupyterlab-kernelspy
jupyter lab
# Run the Animation example notebook from pythreejs, reproducing the issue
jupyter labextension install @jupyter-widgets/jupyterlab-manager
# After refreshing the lab page to pick up new build, issue is now gone The error message from the kernel is a continuation error: Once the comm manager in lab services fails to find the widgets comm target, it sends back a comm message without a |
I'm reinstalling ipywidgets 7.3.2 released 19 hours ago, and I will come back shortly. BTW, I likely faced the issue(s) closed in this release on |
ok, I assume @vidartf used This set is what I'm using, however, the python wheels are coming from pypi - repacked as the *.deb packages, and with I have updated
…a surprise. Quick investigation revealed the
bidi.js:19 Loaded moment locale ru
main.7c81287d92ea919043dd.js:1 TypeError: Cannot read property 'fasta' of undefined
I'm at the dead end, as |
I've just re-run the Animation example under the classic notebook, which did not, and got the following trace in the Chrome console, if it's related:
GET http://localhost:8888/nbextensions/widgets/notebook/js/extension.js?v=20180803090930 net::ERR_ABORTED 404 (Not Found)
Does it provide any clues what might be the cause of all of it? I can confirm that |
See Jupyter-contrib/jupyter_nbextensions_configurator/issues/75 for a separate issue, possibly pre-related to jupyter-widgets/ipywidgets/pull/2150/files |
Some thoughts:
I would try cleaning out all |
ok, thanks you both for your valuable suggestions; here is a follow up:
First sign after all above was that the still installed Let's start JLab, so, in the Web Console (only W's and E's are shown):
…(and no offending messages in the classic notebook). Well, let's run the Let's run the trusted opener jupyter-widgets/pythreejs/examples/Animation.ipynb – not truly fails after input 9, but nothing to see in the resized output and it shows the concluding warning:
Notice Now run the same in JLab: after input 7: :I guess this is a real bug: UPDATE: Under Chrome v70.0.3510.0 it fails in input 3, but not under Firefox Quantum v61.0.1 (64-bit)!, (double, cross-checked!) with: …but then still fails under Firefox, on input 7 as described above. Upon running other UPDATE: I've just spotted this bug on Bugzilla, marked as "resolved", but users do not agree (scroll to the bottom). In jupyter-widgets/pythreejs/examples/Geometries.ipynb it produces (as it did earlier) the actual outputs of differently shaped figures What is weird here, is that it shows Two interim questions on the road to actually get animation functionality: UPDATE on my last question about r95dev: might be related to the jupyterlab-build-process |
See jupyterlab/jupyterlab/issues/5070 for the current |
@jasongrout:
(…and then occasionally it doesn't show up on the second run; couldn't get it now after jlab/ipywidgets upgrade) Perhaps, slow/deferred on HDDs, or, on the contrary, too-speedy asynchronous initialization on SSDs like in that bug described in |
UPDATE: I've updated to {
"disabledExtensions": [
"@jupyterlab/celltags",
"@jupyter-widgets/jupyterlab-sidecar",
"@jupyterlab/git",
"@jupyterlab/vdom-experimental-extension",
"jupyterlab_vpython_test",
"jupyterlab-sos",
"jupyterlab-volume",
"jupyter-webrtc"
]
} |
Can how to install this plugin into Jupyter Lab be included in the readme as I only managed to do this by reading this issue. |
UPDATE: I've re-run in Chrome the
Debugging link opens the following snippet (line 28 starts with (function anonymous(CTOR_LIST,ORDER
) {
'use strict'
function View1dfloat32(a,b0,c0,d){this.data=a
this.shape=[b0]
this.stride=[c0]
this.offset=d|0}
var proto=View1dfloat32.prototype
proto.dtype='float32'
proto.dimension=1
Object.defineProperty(proto,'size',{get:function View1dfloat32_size(){return this.shape[0]
}})
proto.order=[0]
proto.set=function View1dfloat32_set(i0,v){
return this.data[this.offset+this.stride[0]*i0]=v}
proto.get=function View1dfloat32_get(i0){
return this.data[this.offset+this.stride[0]*i0]}
proto.index=function View1dfloat32_index(
i0
){return this.offset+this.stride[0]*i0}
proto.hi=function View1dfloat32_hi(i0){return new View1dfloat32(this.data,(typeof i0!=='number'||i0<0)?this.shape[0]:i0|0,this.stride[0],this.offset)}
proto.lo=function View1dfloat32_lo(i0){var b=this.offset,d=0,a0=this.shape[0],c0=this.stride[0]
if(typeof i0==='number'&&i0>=0){d=i0|0;b+=c0*d;a0-=d}
return new View1dfloat32(this.data,a0,c0,b)}
proto.step=function View1dfloat32_step(i0){var a0=this.shape[0],b0=this.stride[0],c=this.offset,d=0,ceil=Math.ceil
if(typeof i0==='number'){d=i0|0;if(d<0){c+=b0*(a0-1);a0=ceil(-a0/d)}else{a0=ceil(a0/d)}b0*=d}
return new View1dfloat32(this.data,a0,b0,c)}
proto.transpose=function View1dfloat32_transpose(['i0']){i0=(i0===undefined?0:i0|0)
var a=this.shape,b=this.stride;return new View1dfloat32(this.data,a[i0],b[i0],this.offset)}
proto.pick=function View1dfloat32_pick(['i0']){var a=[],b=[],c=this.offset
if(typeof i0==='number'&&i0>=0){c=(c+this.stride[0]*i0)|0}else{a.push(this.shape[0]);b.push(this.stride[0])}
var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}
return function construct_View1dfloat32(data,shape,stride,offset){return new View1dfloat32(data,shape[0],stride[0],offset)}
}) |
No longer the issue after various upgrades, closing. For future reference, I would recommend a "zero warnings" policy and also asking/posting JLab's build logs, paying special attention to the emitted warnings, which are not at all harmless. Other particular issues may arise because of JLab's behavior not strictly aligned with the related jupyterlab-build-process , namely
I have the |
@mprogram Note that semver with |
Ah, thanks for your reply, Vidar! |
Sure! Happy you got everything sorted out in the end 👍 |
I'm getting the following trace in the Chrome console under JLab 0.33.4 + ipywidgets 7.3.1 when trying to run pythreejs examples (e.g. Animation: sphere, cube, etc.). I guess widget declaration somehow has changed in this version of JLab.
The text was updated successfully, but these errors were encountered: