Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jan 2021 10:29:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 252602] www/py-notebook: Python kernel does not work since tornado websockets use Future
Message-ID:  <bug-252602-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252602

            Bug ID: 252602
           Summary: www/py-notebook: Python kernel does not work since
                    tornado websockets use Future
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: python@FreeBSD.org
          Reporter: monwarez@mailoo.org
          Assignee: python@FreeBSD.org
             Flags: maintainer-feedback?(python@FreeBSD.org)

Since tornado websockets use python Future, the python3 kernel crash at file

/usr/local/lib/python3.7/site-packages/notebook/services/kernels/handlers.py

at the line 207

https://github.com/jupyter/notebook/blob/57db70979b677b0c47cbecfbfbc3ba5b35=
9bc0b3/notebook/services/kernels/handlers.py#L207


if self.ws_connection is None or self.ws_connection.is_closing():

Here since self.ws_connection is a Future it does not have the member:
is_closing

A fix would be to wait for the Future result (with or without a timeout) :

websocket =3D self.ws_connection.result()

And then check for
websocket.is_closing()

The dirty fix would be to ignore the test on is_closing

With the dirty fix the kernel run

The github repos have over 2k issue, it is hard to find if this error was
already reported there.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252602-7788>