[IPKernelApp] ERROR | No such comm target registered: glow

617 views
Skip to first unread message

silesa...@hotmail.com

unread,
Aug 14, 2017, 6:32:27 PM8/14/17
to VPython-users

Hello
I have installed vpython7 on windows 8, python 3.5.4 .
when I load the following file, I get the error on the command line window: [IPKernelApp] ERROR | No such comm target registered: glow

from vpython import *
floor = box(length=4, height=0.5, width=4, color=color.blue)
ball = sphere(pos=vector(0,4,0), color=color.red)
ball.velocity = vector(0,-1,0)
dt = 0.01
ejecutando = False
def inicio(b):
    global ejecutando
    ejecutando = not ejecutando
    if ejecutando: b.text="PAUSA"
    else: b.text="INICIAR"
button(text="INICIAR",pos=scene.title_anchor, bind=inicio)
while 1:
    rate(100)
    if ejecutando:
        ball.pos = ball.pos + ball.velocity*dt
        if ball.pos.y < 1:
            ball.velocity.y = -ball.velocity.y
        else:
            ball.velocity.y = ball.velocity.y - 9.8*dt

However, despite the message, the program runs quite well.
When I run the demo-files from vpython7 I don't see the error message.

Is there any consequences or meaning of that error?

thanks for your time

Hugo 

Bruce Sherwood

unread,
Aug 14, 2017, 8:15:35 PM8/14/17
to VPython-users
I'm unable to reproduce the error you see, whether with or without using Jupyter notebook. Just in case this comes up again, how did you launch the program? In a Jupyter notebook? From IDLE? How?

silesa...@hotmail.com

unread,
Aug 14, 2017, 8:47:19 PM8/14/17
to VPython-users



 
 thank you Bruce,

When I run from IDLE no message at all in the python shell. The error pups up in the 'command window' when I open the program in jupyter notebook, but
as I mentioned before the program runs without any problem, I have also other programs that show the same error, but not the demo files.

 Hugo

Bruce Sherwood

unread,
Aug 14, 2017, 8:59:31 PM8/14/17
to VPython-users
Oh, now I do sometimes see that error message when I go to a VPython program in a Jupyter notebook, but before doing anything there. I don't understand what causes it, but as you've seen, it's harmless. The "glow" reference does have to do with VPython, so it's not a general issue. I particularly don't understand how "glow" can be known to Jupyter before running a VPython program. I even tried changing the notebook type from VPython to Python 3 (there being essentially no difference now between these two types, at least when using Python 3) but I still saw the error message simply by accessing the notebook, without running it. Strange.

Bruce

silesa...@hotmail.com

unread,
Aug 15, 2017, 11:19:17 AM8/15/17
to VPython-users
HI Bruce,

The strange thing is that the error pups up only with some programs, not all, just after you open the program in jupyter notebook and before you do
anything.
I will continue to investigate what may be the reason of that behavior.

Hugo


John

unread,
Aug 15, 2017, 11:28:53 AM8/15/17
to VPython-users
Hi Bruce

    It looks like jupyter notebook automatically loads and runs the javascript files that it finds in the nbextensions directory. So it might be loading the glowcomm.js file which in turn attempts to set up a Comm channel between the javascript front-end and the python kernel. You can find the documentation on setting up this Comm link here.


From the sample code provided in this link on setting up the Comm connection just replace the the wording 'my_comm_target'  with 'glow' for the target name.  As described in the documentation, you can either register the target name in the javascript code and initiate the connection from the python code, or you can register the target in the python code and initiate the connection from the javascript code. I think we are doing the latter and the error is occurring because the target has not been registered yet in the vpython code. I don't recall the reasons for doing it this way but you might try experimenting with doing it the other way to get rid of the error message.

John

Bruce Sherwood

unread,
Aug 15, 2017, 1:56:35 PM8/15/17
to VPython-users
Thanks for the tip and the careful detective work, John.

Bruce
Reply all
Reply to author
Forward
0 new messages