From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 01 17:32:45 2019 Received: (at submit) by debbugs.gnu.org; 1 Jul 2019 21:32:45 +0000 Received: from localhost ([127.0.0.1]:46185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hi3um-0000pW-2m for submit@debbugs.gnu.org; Mon, 01 Jul 2019 17:32:45 -0400 Received: from lists.gnu.org ([209.51.188.17]:54748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hi3bZ-0000Jf-EI for submit@debbugs.gnu.org; Mon, 01 Jul 2019 17:12:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50947) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hi3Rz-0002mw-II for bug-guix@gnu.org; Mon, 01 Jul 2019 17:03:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,RDNS_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hi3Rr-0002ko-DR for bug-guix@gnu.org; Mon, 01 Jul 2019 17:02:53 -0400 Received: from [31.7.186.173] (port=40312 helo=necrophcodr.me) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hi3Rp-0001WA-8q for bug-guix@gnu.org; Mon, 01 Jul 2019 17:02:50 -0400 Received: from [192.168.22.110] (static-89-239-193-119.ip.fibianet.dk [89.239.193.119]) by necrophcodr.me (Postfix) with ESMTPSA id A4CE592A0C1C for ; Mon, 1 Jul 2019 22:54:22 +0200 (CEST) To: bug-guix@gnu.org From: Steffen Rytter Postas Subject: jupyter terminal out of pty devices Openpgp: preference=signencrypt Message-ID: <618e32ff-190e-7746-cd4f-88ad13149041@scalehost.eu> Date: Mon, 1 Jul 2019 22:54:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 31.7.186.173 X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 01 Jul 2019 17:32:43 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi, I've been having a few issues with the Jupyter package. First and foremost, this is my first time trying it out with Guix. Previously I have had it running using Docker, but I prefer the modularity and programmability of Guix, not to mention the rest of the amazing concepts it brings. However, nothing is perfect, and as we'll see here, that is indeed true. Let it be known that I've tested this on my desktop and on my work laptop= . On my desktop, I've had no issues getting it running, but the terminal functionality does not work at all, for several reasons. There may very well be another issue, that I've yet to reproduce, but the above I can reproduce easily on my machines. Both environments use the same command to execute, and are using `guix environment` to start the Jupyter notebook system: `LC_ALL=3DC guix environment -C -N --pure -m env.scm -- jupyter-notebook` The `env.scm` file used, is as follows: (define-packages '( =C2=A0=C2=A0=C2=A0 "glibc-utf8-locales" =C2=A0=C2=A0=C2=A0 "coreutils-minimal" =C2=A0=C2=A0=C2=A0 "bash" =C2=A0=C2=A0=C2=A0 "python" =C2=A0=C2=A0=C2=A0 "jupyter" =C2=A0=C2=A0=C2=A0 )) (use-modules (gnu packages)) (packages->manifest (map specification->package packages)) You may notice that Python is mentioned as an explicit package, along with coreutils-minimal. These are BOTH workarounds, to even get to the bugs, mentioned above. Without python, running the notebook yields the following error: pkg_resources.DistributionNotFound: The 'six' distribution was not found and is required by traitlets However, I have not been able to reproduce this anywhere. I do believe this is a bug though. Setting python to be a required package gets me past the above error, however removing python does NOT re-introduce the error on any of my systems. Without coreutils-minimal, opening the terminal yields the following erro= r: [E 18:40:08.400 NotebookApp] Uncaught exception POST /api/terminals (127.0.0.1) =C2=A0=C2=A0=C2=A0 HTTPServerRequest(protocol=3D'http', host=3D'localhost= :8888', method=3D'POST', uri=3D'/api/terminals', version=3D'HTTP/1.1', remote_ip=3D'127.0.0.1') =C2=A0=C2=A0=C2=A0 Traceback (most recent call last): =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/varva2qk8sdmy68hm05cfk2vxdczzzhf-python-tornado-5.1.1/lib/pyt= hon3.7/site-packages/tornado/web.py", line 1590, in _execute =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 result =3D method(*self.path_a= rgs, **self.path_kwargs) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/varva2qk8sdmy68hm05cfk2vxdczzzhf-python-tornado-5.1.1/lib/pyt= hon3.7/site-packages/tornado/web.py", line 3006, in wrapper =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return method(self, *args, **k= wargs) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/zgx9l5mypyh70ywn55rjrr085pyzs61z-python-notebook-5.7.4/lib/py= thon3.7/site-packages/notebook/terminal/api_handlers.py", line 16, in post =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 name, _ =3D self.terminal_mana= ger.new_named_terminal() =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/mna9g0khcz20bpdknh65qq1bzm6rrp18-python-terminado-0.8.1/lib/p= ython3.7/site-packages/terminado/management.py", line 319, in new_named_terminal =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 term =3D self.new_terminal() =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/mna9g0khcz20bpdknh65qq1bzm6rrp18-python-terminado-0.8.1/lib/p= ython3.7/site-packages/terminado/management.py", line 171, in new_terminal =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pty =3D PtyProcessUnicode.spaw= n(argv, env=3Denv, cwd=3Doptions.get('cwd', None)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/fj5idczwb1s908b55z6jl64xmagcygva-python-ptyprocess-0.5.2/lib/= python3.7/site-packages/ptyprocess/ptyprocess.py", line 205, in spawn =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 command_with_path =3D which(co= mmand) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0/lib/python3.7/s= hutil.py", line 1129, in which =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if os.path.dirname(cmd): =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0/lib/python3.7/p= osixpath.py", line 156, in dirname =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 p =3D os.fspath(p) =C2=A0=C2=A0=C2=A0 TypeError: expected str, bytes or os.PathLike object, = not NoneType [W 18:40:08.402 NotebookApp] Unhandled error At this point I assumed this was due to missing the `which(1)` command, or at least some command missing, causing the above codepaths to return None. Adding coreutils-minimal gets me a slight bit further, and removing coreutils-minimal DOES re-introduce the error as well. However, at this point, Jupyter notebook "works". The script editing, the interface, all of this works. Opening the terminal however, now yields the following error: [E 18:56:52.376 NotebookApp] Uncaught exception POST /api/terminals (127.0.0.1) =C2=A0=C2=A0=C2=A0 HTTPServerRequest(protocol=3D'http', host=3D'localhost= :8888', method=3D'POST', uri=3D'/api/terminals', version=3D'HTTP/1.1', remote_ip=3D'127.0.0.1') =C2=A0=C2=A0=C2=A0 Traceback (most recent call last): =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/varva2qk8sdmy68hm05cfk2vxdczzzhf-python-tornado-5.1.1/lib/pyt= hon3.7/site-packages/tornado/web.py", line 1590, in _execute =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 result =3D method(*self.path_a= rgs, **self.path_kwargs) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/varva2qk8sdmy68hm05cfk2vxdczzzhf-python-tornado-5.1.1/lib/pyt= hon3.7/site-packages/tornado/web.py", line 3006, in wrapper =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return method(self, *args, **k= wargs) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/zgx9l5mypyh70ywn55rjrr085pyzs61z-python-notebook-5.7.4/lib/py= thon3.7/site-packages/notebook/terminal/api_handlers.py", line 16, in post =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 name, _ =3D self.terminal_mana= ger.new_named_terminal() =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/mna9g0khcz20bpdknh65qq1bzm6rrp18-python-terminado-0.8.1/lib/p= ython3.7/site-packages/terminado/management.py", line 319, in new_named_terminal =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 term =3D self.new_terminal() =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/mna9g0khcz20bpdknh65qq1bzm6rrp18-python-terminado-0.8.1/lib/p= ython3.7/site-packages/terminado/management.py", line 171, in new_terminal =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pty =3D PtyProcessUnicode.spaw= n(argv, env=3Denv, cwd=3Doptions.get('cwd', None)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/fj5idczwb1s908b55z6jl64xmagcygva-python-ptyprocess-0.5.2/lib/= python3.7/site-packages/ptyprocess/ptyprocess.py", line 222, in spawn =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pid, fd =3D pty.fork() =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0/lib/python3.7/p= ty.py", line 96, in fork =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 master_fd, slave_fd =3D openpt= y() =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0/lib/python3.7/p= ty.py", line 29, in openpty =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 master_fd, slave_name =3D _ope= n_terminal() =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0/lib/python3.7/p= ty.py", line 59, in _open_terminal =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 raise OSError('out of pty devi= ces') =C2=A0=C2=A0=C2=A0 OSError: out of pty devices [W 18:56:52.377 NotebookApp] Unhandled error So it seems that there's an issue with pty devices when running these systems as a container. Sincerely, Steffen Rytter Postas