0s autopkgtest [03:28:59]: starting date and time: 2026-01-24 03:28:59+0000 0s autopkgtest [03:28:59]: git checkout: 508d4a25 a-v-ssh wait_for_ssh: demote "ssh connection failed" to a debug message 0s autopkgtest [03:28:59]: host juju-7f2275-prod-proposed-migration-environment-9; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.9_huq8s5/out --timeout-copy=6000 --setup-commands 'ln -s /dev/null /etc/systemd/system/bluetooth.service; printf "http_proxy=http://squid.internal:3128\nhttps_proxy=http://squid.internal:3128\nno_proxy=127.0.0.1,127.0.1.1,localhost,localdomain,internal,login.ubuntu.com,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com\n" >> /etc/environment' --apt-pocket=proposed=src:underscore --apt-upgrade jupyter-notebook --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=underscore/1.13.7~dfsg+~1.13.0-5' -- lxd -r lxd-armhf-10.145.243.227 lxd-armhf-10.145.243.227:autopkgtest/ubuntu/resolute/armhf 27s autopkgtest [03:29:26]: testbed dpkg architecture: armhf 29s autopkgtest [03:29:28]: testbed apt version: 3.1.13 33s autopkgtest [03:29:32]: @@@@@@@@@@@@@@@@@@@@ test bed setup 35s autopkgtest [03:29:34]: testbed release detected to be: None 44s autopkgtest [03:29:43]: updating testbed package index (apt update) 46s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 46s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 47s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 47s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 47s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [24.3 kB] 47s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [2820 B] 47s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1031 kB] 47s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [94.5 kB] 47s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf Packages [102 kB] 47s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe armhf Packages [833 kB] 47s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse armhf Packages [8712 B] 47s Fetched 2221 kB in 1s (2037 kB/s) 49s Reading package lists... 54s autopkgtest [03:29:53]: upgrading testbed (apt dist-upgrade and autopurge) 56s Reading package lists... 57s Building dependency tree... 57s Reading state information... 57s Calculating upgrade... 58s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 60s Reading package lists... 61s Building dependency tree... 61s Reading state information... 61s Solving dependencies... 62s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 64s autopkgtest [03:30:03]: rebooting testbed after setup commands that affected boot 109s autopkgtest [03:30:48]: testbed running kernel: Linux 6.8.0-87-generic #88~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct 14 14:00:09 UTC 2 137s autopkgtest [03:31:16]: @@@@@@@@@@@@@@@@@@@@ apt-source jupyter-notebook 139s cannot confirm that parent process is alive: Operation not permitted 139s unexpected eof from helper process 155s Get:1 http://ftpmaster.internal/ubuntu resolute/universe jupyter-notebook 6.4.13-5ubuntu0.1 (dsc) [3737 B] 155s Get:2 http://ftpmaster.internal/ubuntu resolute/universe jupyter-notebook 6.4.13-5ubuntu0.1 (tar) [8501 kB] 155s Get:3 http://ftpmaster.internal/ubuntu resolute/universe jupyter-notebook 6.4.13-5ubuntu0.1 (diff) [52.5 kB] 155s gpgv: Signature made Tue Apr 22 01:32:11 2025 UTC 155s gpgv: using RSA key 00F6164E9C2D21BAFBC47E0E58DAD120A6939167 155s gpgv: Can't check signature: No public key 155s dpkg-source: warning: cannot verify inline signature for ./jupyter-notebook_6.4.13-5ubuntu0.1.dsc: no acceptable signature found 156s autopkgtest [03:31:35]: testing package jupyter-notebook version 6.4.13-5ubuntu0.1 158s autopkgtest [03:31:37]: build not needed 161s autopkgtest [03:31:40]: test pytest: preparing testbed 163s Reading package lists... 163s Building dependency tree... 163s Reading state information... 163s Solving dependencies... 165s The following NEW packages will be installed: 165s fonts-font-awesome fonts-glyphicons-halflings fonts-lato fonts-mathjax gdb 165s jupyter-core jupyter-notebook libargon2-1 libbabeltrace1 libc6-dbg 165s libdebuginfod-common libdebuginfod1t64 libdw1t64 libjs-backbone 165s libjs-bootstrap libjs-bootstrap-tour libjs-codemirror libjs-es6-promise 165s libjs-jed libjs-jquery libjs-jquery-typeahead libjs-jquery-ui libjs-marked 165s libjs-mathjax libjs-moment libjs-requirejs libjs-requirejs-text 165s libjs-text-encoding libjs-underscore libjs-xterm libnorm1t64 libpgm-5.3-0t64 165s libpython3.13 libpython3.14-minimal libpython3.14-stdlib libsodium23 165s libsource-highlight-common libsource-highlight4t64 libzmq5 node-jed 165s python-notebook-doc python-tinycss2-common python3-all python3-argon2 165s python3-argon2-cffi-bindings python3-astroid python3-asttokens 165s python3-bleach python3-bs4 python3-cffi python3-comm python3-coverage 165s python3-debugpy python3-decorator python3-defusedxml python3-executing 165s python3-fastjsonschema python3-html5lib python3-iniconfig python3-ipykernel 165s python3-ipython python3-ipython-genutils python3-jedi python3-jupyter-client 165s python3-jupyter-core python3-jupyterlab-pygments python3-matplotlib-inline 165s python3-mistune python3-nbclient python3-nbconvert python3-nbformat 165s python3-nest-asyncio python3-notebook python3-pandocfilters python3-parso 165s python3-platformdirs python3-pluggy python3-ply python3-prometheus-client 165s python3-prompt-toolkit python3-psutil python3-pure-eval python3-pycparser 165s python3-pytest python3-requests-unixsocket python3-send2trash 165s python3-soupsieve python3-stack-data python3-terminado python3-tinycss2 165s python3-tornado python3-traitlets python3-typeshed python3-wcwidth 165s python3-webencodings python3-zmq python3.14 python3.14-minimal 165s sphinx-rtd-theme-common 165s 0 upgraded, 99 newly installed, 0 to remove and 0 not upgraded. 165s Need to get 44.7 MB of archives. 165s After this operation, 197 MB of additional disk space will be used. 165s Get:1 http://ftpmaster.internal/ubuntu resolute/main armhf fonts-lato all 2.015-1build1 [2779 kB] 167s Get:2 http://ftpmaster.internal/ubuntu resolute/main armhf libdebuginfod-common all 0.194-1 [15.1 kB] 167s Get:3 http://ftpmaster.internal/ubuntu resolute/main armhf libpython3.14-minimal armhf 3.14.2-1 [905 kB] 167s Get:4 http://ftpmaster.internal/ubuntu resolute/main armhf python3.14-minimal armhf 3.14.2-1 [2155 kB] 168s Get:5 http://ftpmaster.internal/ubuntu resolute/main armhf fonts-font-awesome all 5.0.10+really4.7.0~dfsg-4.1build1 [531 kB] 168s Get:6 http://ftpmaster.internal/ubuntu resolute/universe armhf fonts-glyphicons-halflings all 1.009~3.4.1+dfsg-6 [119 kB] 168s Get:7 http://ftpmaster.internal/ubuntu resolute/main armhf fonts-mathjax all 2.7.9+dfsg-1build1 [2283 kB] 170s Get:8 http://ftpmaster.internal/ubuntu resolute/main armhf libdw1t64 armhf 0.194-1 [254 kB] 170s Get:9 http://ftpmaster.internal/ubuntu resolute/main armhf libbabeltrace1 armhf 1.5.11-5 [155 kB] 170s Get:10 http://ftpmaster.internal/ubuntu resolute/main armhf libdebuginfod1t64 armhf 0.194-1 [18.8 kB] 170s Get:11 http://ftpmaster.internal/ubuntu resolute/main armhf libpython3.13 armhf 3.13.11-1 [2124 kB] 171s Get:12 http://ftpmaster.internal/ubuntu resolute/main armhf libsource-highlight-common all 3.1.9-4.3build2 [64.2 kB] 171s Get:13 http://ftpmaster.internal/ubuntu resolute/main armhf libsource-highlight4t64 armhf 3.1.9-4.3build2 [297 kB] 171s Get:14 http://ftpmaster.internal/ubuntu resolute/main armhf libc6-dbg armhf 2.42-2ubuntu4 [4516 kB] 174s Get:15 http://ftpmaster.internal/ubuntu resolute/main armhf gdb armhf 17.1-1ubuntu1 [3732 kB] 176s Get:16 http://ftpmaster.internal/ubuntu resolute/main armhf python3-platformdirs all 4.5.1-1 [17.1 kB] 176s Get:17 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-traitlets all 5.14.3+really5.14.3-2 [71.7 kB] 176s Get:18 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-jupyter-core all 5.9.1-1 [28.9 kB] 176s Get:19 http://ftpmaster.internal/ubuntu resolute/universe armhf jupyter-core all 5.9.1-1 [6938 B] 176s Get:20 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf libjs-underscore all 1.13.7~dfsg+~1.13.0-5 [86.6 kB] 176s Get:21 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-backbone all 1.4.1~dfsg+~1.4.15-3build1 [186 kB] 176s Get:22 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-bootstrap all 3.4.1+dfsg-6 [129 kB] 176s Get:23 http://ftpmaster.internal/ubuntu resolute/main armhf libjs-jquery all 3.7.1+dfsg+~3.5.33-1build1 [321 kB] 176s Get:24 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-bootstrap-tour all 0.12.0+dfsg-6 [21.6 kB] 176s Get:25 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-codemirror all 5.65.20+~cs5.83.25-1 [710 kB] 177s Get:26 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-es6-promise all 4.2.8-12 [14.1 kB] 177s Get:27 http://ftpmaster.internal/ubuntu resolute/universe armhf node-jed all 1.1.1-4 [15.2 kB] 177s Get:28 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-jed all 1.1.1-4 [2584 B] 177s Get:29 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-jquery-typeahead all 2.11.0+dfsg1-3build1 [48.3 kB] 177s Get:30 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-jquery-ui all 1.13.2+dfsg-1build1 [251 kB] 177s Get:31 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-marked all 4.2.3+ds+~4.0.7-4 [36.2 kB] 177s Get:32 http://ftpmaster.internal/ubuntu resolute/main armhf libjs-mathjax all 2.7.9+dfsg-1build1 [6017 kB] 180s Get:33 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-moment all 2.29.4+ds-1 [147 kB] 180s Get:34 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-requirejs all 2.3.8+ds+~2.1.37-1 [201 kB] 180s Get:35 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-requirejs-text all 2.0.12-2 [9732 B] 180s Get:36 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-text-encoding all 0.7.0-5 [140 kB] 180s Get:37 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-xterm all 5.3.0-4 [475 kB] 181s Get:38 http://ftpmaster.internal/ubuntu resolute/main armhf python3-tornado armhf 6.5.4-0.1 [306 kB] 181s Get:39 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-terminado all 0.18.1-1 [13.2 kB] 181s Get:40 http://ftpmaster.internal/ubuntu resolute/main armhf libargon2-1 armhf 0~20190702+dfsg-5 [22.3 kB] 181s Get:41 http://ftpmaster.internal/ubuntu resolute/main armhf python3-ply all 3.11-10 [45.9 kB] 181s Get:42 http://ftpmaster.internal/ubuntu resolute/main armhf python3-pycparser all 2.23-1build1 [77.3 kB] 181s Get:43 http://ftpmaster.internal/ubuntu resolute/main armhf python3-cffi all 2.0.0-2 [75.5 kB] 181s Get:44 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-argon2-cffi-bindings armhf 25.1.0-2 [13.8 kB] 181s Get:45 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-argon2 armhf 25.1.0-2 [13.8 kB] 181s Get:46 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-comm all 0.2.1-1build1 [7148 B] 181s Get:47 http://ftpmaster.internal/ubuntu resolute/main armhf libpython3.14-stdlib armhf 3.14.2-1 [2270 kB] 182s Get:48 http://ftpmaster.internal/ubuntu resolute/main armhf python3.14 armhf 3.14.2-1 [816 kB] 182s Get:49 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-coverage armhf 7.8.2+dfsg1-1ubuntu1 [158 kB] 182s Get:50 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-debugpy armhf 1.8.19+ds-1ubuntu1 [910 kB] 183s Get:51 http://ftpmaster.internal/ubuntu resolute/main armhf python3-decorator all 5.2.1-2 [28.1 kB] 183s Get:52 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-parso all 0.8.5-1 [68.0 kB] 183s Get:53 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-typeshed all 0.0~git20241223.ea91db2-4 [1554 kB] 184s Get:54 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-jedi all 0.19.1+ds1-1build1 [694 kB] 184s Get:55 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-matplotlib-inline all 0.2.1-1 [9462 B] 184s Get:56 http://ftpmaster.internal/ubuntu resolute/main armhf python3-wcwidth all 0.2.14+dfsg1-1build1 [26.5 kB] 184s Get:57 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-prompt-toolkit all 3.0.52-2 [258 kB] 184s Get:58 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-astroid all 4.0.2-1ubuntu1 [172 kB] 184s Get:59 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-asttokens all 3.0.1-1 [20.7 kB] 184s Get:60 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-executing all 2.2.1-0.1 [26.2 kB] 184s Get:61 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pure-eval all 0.2.3-1 [11.4 kB] 184s Get:62 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-stack-data all 0.6.3-3 [22.2 kB] 184s Get:63 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-ipython all 8.35.0-2 [575 kB] 185s Get:64 http://ftpmaster.internal/ubuntu resolute/main armhf python3-psutil armhf 7.1.0-1ubuntu1 [189 kB] 185s Get:65 http://ftpmaster.internal/ubuntu resolute/universe armhf libnorm1t64 armhf 1.5.9+dfsg-4 [210 kB] 185s Get:66 http://ftpmaster.internal/ubuntu resolute/universe armhf libpgm-5.3-0t64 armhf 5.3.128~dfsg-2.1build2 [173 kB] 185s Get:67 http://ftpmaster.internal/ubuntu resolute/main armhf libsodium23 armhf 1.0.18-2 [141 kB] 185s Get:68 http://ftpmaster.internal/ubuntu resolute/universe armhf libzmq5 armhf 4.3.5-1build3 [271 kB] 185s Get:69 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-zmq armhf 27.1.0-1 [223 kB] 185s Get:70 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-jupyter-client all 8.7.0-1 [78.5 kB] 185s Get:71 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-nest-asyncio all 1.6.0-1 [6686 B] 185s Get:72 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-ipykernel all 6.30.1-1 [82.8 kB] 185s Get:73 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-ipython-genutils all 0.2.0-7 [22.0 kB] 185s Get:74 http://ftpmaster.internal/ubuntu resolute/universe armhf python-tinycss2-common all 1.5.1-1 [47.3 kB] 185s Get:75 http://ftpmaster.internal/ubuntu resolute/main armhf python3-webencodings all 0.5.1-5build1 [11.7 kB] 185s Get:76 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-tinycss2 all 1.5.1-1 [23.3 kB] 185s Get:77 http://ftpmaster.internal/ubuntu resolute/main armhf python3-html5lib all 1.2-3 [90.6 kB] 185s Get:78 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-bleach all 6.3.0-1 [44.2 kB] 185s Get:79 http://ftpmaster.internal/ubuntu resolute/main armhf python3-soupsieve all 2.8.1-1 [33.7 kB] 185s Get:80 http://ftpmaster.internal/ubuntu resolute/main armhf python3-bs4 all 4.14.3-2build1 [84.8 kB] 185s Get:81 http://ftpmaster.internal/ubuntu resolute/main armhf python3-defusedxml all 0.7.1-3build1 [42.4 kB] 185s Get:82 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-jupyterlab-pygments all 0.2.2-3build1 [6188 B] 185s Get:83 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-mistune all 3.1.4-1 [35.0 kB] 185s Get:84 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-fastjsonschema all 2.21.1-1 [20.4 kB] 185s Get:85 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-nbformat all 5.10.4-1 [39.2 kB] 185s Get:86 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-nbclient all 0.10.4-1 [22.6 kB] 185s Get:87 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pandocfilters all 1.5.1-1 [23.6 kB] 185s Get:88 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-nbconvert all 7.16.6-1 [140 kB] 186s Get:89 http://ftpmaster.internal/ubuntu resolute/main armhf python3-prometheus-client all 0.21.1+ds1-1build1 [46.0 kB] 186s Get:90 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-send2trash all 1.8.3-1 [14.6 kB] 186s Get:91 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-notebook all 6.4.13-5ubuntu0.1 [1624 kB] 186s Get:92 http://ftpmaster.internal/ubuntu resolute/universe armhf jupyter-notebook all 6.4.13-5ubuntu0.1 [10.4 kB] 186s Get:93 http://ftpmaster.internal/ubuntu resolute/main armhf sphinx-rtd-theme-common all 3.0.2+dfsg-3 [1013 kB] 187s Get:94 http://ftpmaster.internal/ubuntu resolute/universe armhf python-notebook-doc all 6.4.13-5ubuntu0.1 [2545 kB] 188s Get:95 http://ftpmaster.internal/ubuntu resolute/main armhf python3-all armhf 3.13.9-3 [890 B] 188s Get:96 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-iniconfig all 2.1.0-2 [6962 B] 188s Get:97 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pluggy all 1.6.0-2 [21.1 kB] 188s Get:98 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pytest all 9.0.2-2 [277 kB] 188s Get:99 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-requests-unixsocket all 1.0.1-1 [8620 B] 188s Preconfiguring packages ... 189s Fetched 44.7 MB in 23s (1943 kB/s) 189s Selecting previously unselected package fonts-lato. 189s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 66483 files and directories currently installed.) 189s Preparing to unpack .../00-fonts-lato_2.015-1build1_all.deb ... 189s Unpacking fonts-lato (2.015-1build1) ... 189s Selecting previously unselected package libdebuginfod-common. 189s Preparing to unpack .../01-libdebuginfod-common_0.194-1_all.deb ... 189s Unpacking libdebuginfod-common (0.194-1) ... 189s Selecting previously unselected package libpython3.14-minimal:armhf. 189s Preparing to unpack .../02-libpython3.14-minimal_3.14.2-1_armhf.deb ... 189s Unpacking libpython3.14-minimal:armhf (3.14.2-1) ... 189s Selecting previously unselected package python3.14-minimal. 189s Preparing to unpack .../03-python3.14-minimal_3.14.2-1_armhf.deb ... 189s Unpacking python3.14-minimal (3.14.2-1) ... 189s Selecting previously unselected package fonts-font-awesome. 189s Preparing to unpack .../04-fonts-font-awesome_5.0.10+really4.7.0~dfsg-4.1build1_all.deb ... 189s Unpacking fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1build1) ... 189s Selecting previously unselected package fonts-glyphicons-halflings. 189s Preparing to unpack .../05-fonts-glyphicons-halflings_1.009~3.4.1+dfsg-6_all.deb ... 189s Unpacking fonts-glyphicons-halflings (1.009~3.4.1+dfsg-6) ... 189s Selecting previously unselected package fonts-mathjax. 189s Preparing to unpack .../06-fonts-mathjax_2.7.9+dfsg-1build1_all.deb ... 189s Unpacking fonts-mathjax (2.7.9+dfsg-1build1) ... 189s Selecting previously unselected package libdw1t64:armhf. 189s Preparing to unpack .../07-libdw1t64_0.194-1_armhf.deb ... 189s Unpacking libdw1t64:armhf (0.194-1) ... 190s Selecting previously unselected package libbabeltrace1:armhf. 190s Preparing to unpack .../08-libbabeltrace1_1.5.11-5_armhf.deb ... 190s Unpacking libbabeltrace1:armhf (1.5.11-5) ... 190s Selecting previously unselected package libdebuginfod1t64:armhf. 190s Preparing to unpack .../09-libdebuginfod1t64_0.194-1_armhf.deb ... 190s Unpacking libdebuginfod1t64:armhf (0.194-1) ... 190s Selecting previously unselected package libpython3.13:armhf. 190s Preparing to unpack .../10-libpython3.13_3.13.11-1_armhf.deb ... 190s Unpacking libpython3.13:armhf (3.13.11-1) ... 190s Selecting previously unselected package libsource-highlight-common. 190s Preparing to unpack .../11-libsource-highlight-common_3.1.9-4.3build2_all.deb ... 190s Unpacking libsource-highlight-common (3.1.9-4.3build2) ... 190s Selecting previously unselected package libsource-highlight4t64:armhf. 190s Preparing to unpack .../12-libsource-highlight4t64_3.1.9-4.3build2_armhf.deb ... 190s Unpacking libsource-highlight4t64:armhf (3.1.9-4.3build2) ... 190s Selecting previously unselected package libc6-dbg:armhf. 190s Preparing to unpack .../13-libc6-dbg_2.42-2ubuntu4_armhf.deb ... 190s Unpacking libc6-dbg:armhf (2.42-2ubuntu4) ... 190s Selecting previously unselected package gdb. 190s Preparing to unpack .../14-gdb_17.1-1ubuntu1_armhf.deb ... 190s Unpacking gdb (17.1-1ubuntu1) ... 190s Selecting previously unselected package python3-platformdirs. 190s Preparing to unpack .../15-python3-platformdirs_4.5.1-1_all.deb ... 190s Unpacking python3-platformdirs (4.5.1-1) ... 190s Selecting previously unselected package python3-traitlets. 190s Preparing to unpack .../16-python3-traitlets_5.14.3+really5.14.3-2_all.deb ... 190s Unpacking python3-traitlets (5.14.3+really5.14.3-2) ... 190s Selecting previously unselected package python3-jupyter-core. 190s Preparing to unpack .../17-python3-jupyter-core_5.9.1-1_all.deb ... 190s Unpacking python3-jupyter-core (5.9.1-1) ... 190s Selecting previously unselected package jupyter-core. 190s Preparing to unpack .../18-jupyter-core_5.9.1-1_all.deb ... 190s Unpacking jupyter-core (5.9.1-1) ... 190s Selecting previously unselected package libjs-underscore. 190s Preparing to unpack .../19-libjs-underscore_1.13.7~dfsg+~1.13.0-5_all.deb ... 190s Unpacking libjs-underscore (1.13.7~dfsg+~1.13.0-5) ... 190s Selecting previously unselected package libjs-backbone. 190s Preparing to unpack .../20-libjs-backbone_1.4.1~dfsg+~1.4.15-3build1_all.deb ... 190s Unpacking libjs-backbone (1.4.1~dfsg+~1.4.15-3build1) ... 190s Selecting previously unselected package libjs-bootstrap. 190s Preparing to unpack .../21-libjs-bootstrap_3.4.1+dfsg-6_all.deb ... 190s Unpacking libjs-bootstrap (3.4.1+dfsg-6) ... 190s Selecting previously unselected package libjs-jquery. 190s Preparing to unpack .../22-libjs-jquery_3.7.1+dfsg+~3.5.33-1build1_all.deb ... 190s Unpacking libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 191s Selecting previously unselected package libjs-bootstrap-tour. 191s Preparing to unpack .../23-libjs-bootstrap-tour_0.12.0+dfsg-6_all.deb ... 191s Unpacking libjs-bootstrap-tour (0.12.0+dfsg-6) ... 191s Selecting previously unselected package libjs-codemirror. 191s Preparing to unpack .../24-libjs-codemirror_5.65.20+~cs5.83.25-1_all.deb ... 191s Unpacking libjs-codemirror (5.65.20+~cs5.83.25-1) ... 191s Selecting previously unselected package libjs-es6-promise. 191s Preparing to unpack .../25-libjs-es6-promise_4.2.8-12_all.deb ... 191s Unpacking libjs-es6-promise (4.2.8-12) ... 191s Selecting previously unselected package node-jed. 191s Preparing to unpack .../26-node-jed_1.1.1-4_all.deb ... 191s Unpacking node-jed (1.1.1-4) ... 191s Selecting previously unselected package libjs-jed. 191s Preparing to unpack .../27-libjs-jed_1.1.1-4_all.deb ... 191s Unpacking libjs-jed (1.1.1-4) ... 191s Selecting previously unselected package libjs-jquery-typeahead. 191s Preparing to unpack .../28-libjs-jquery-typeahead_2.11.0+dfsg1-3build1_all.deb ... 191s Unpacking libjs-jquery-typeahead (2.11.0+dfsg1-3build1) ... 191s Selecting previously unselected package libjs-jquery-ui. 191s Preparing to unpack .../29-libjs-jquery-ui_1.13.2+dfsg-1build1_all.deb ... 191s Unpacking libjs-jquery-ui (1.13.2+dfsg-1build1) ... 191s Selecting previously unselected package libjs-marked. 191s Preparing to unpack .../30-libjs-marked_4.2.3+ds+~4.0.7-4_all.deb ... 191s Unpacking libjs-marked (4.2.3+ds+~4.0.7-4) ... 191s Selecting previously unselected package libjs-mathjax. 191s Preparing to unpack .../31-libjs-mathjax_2.7.9+dfsg-1build1_all.deb ... 191s Unpacking libjs-mathjax (2.7.9+dfsg-1build1) ... 192s Selecting previously unselected package libjs-moment. 192s Preparing to unpack .../32-libjs-moment_2.29.4+ds-1_all.deb ... 192s Unpacking libjs-moment (2.29.4+ds-1) ... 192s Selecting previously unselected package libjs-requirejs. 192s Preparing to unpack .../33-libjs-requirejs_2.3.8+ds+~2.1.37-1_all.deb ... 192s Unpacking libjs-requirejs (2.3.8+ds+~2.1.37-1) ... 192s Selecting previously unselected package libjs-requirejs-text. 192s Preparing to unpack .../34-libjs-requirejs-text_2.0.12-2_all.deb ... 192s Unpacking libjs-requirejs-text (2.0.12-2) ... 192s Selecting previously unselected package libjs-text-encoding. 192s Preparing to unpack .../35-libjs-text-encoding_0.7.0-5_all.deb ... 192s Unpacking libjs-text-encoding (0.7.0-5) ... 192s Selecting previously unselected package libjs-xterm. 192s Preparing to unpack .../36-libjs-xterm_5.3.0-4_all.deb ... 192s Unpacking libjs-xterm (5.3.0-4) ... 192s Selecting previously unselected package python3-tornado. 192s Preparing to unpack .../37-python3-tornado_6.5.4-0.1_armhf.deb ... 192s Unpacking python3-tornado (6.5.4-0.1) ... 192s Selecting previously unselected package python3-terminado. 192s Preparing to unpack .../38-python3-terminado_0.18.1-1_all.deb ... 192s Unpacking python3-terminado (0.18.1-1) ... 192s Selecting previously unselected package libargon2-1:armhf. 192s Preparing to unpack .../39-libargon2-1_0~20190702+dfsg-5_armhf.deb ... 192s Unpacking libargon2-1:armhf (0~20190702+dfsg-5) ... 192s Selecting previously unselected package python3-ply. 192s Preparing to unpack .../40-python3-ply_3.11-10_all.deb ... 192s Unpacking python3-ply (3.11-10) ... 192s Selecting previously unselected package python3-pycparser. 192s Preparing to unpack .../41-python3-pycparser_2.23-1build1_all.deb ... 192s Unpacking python3-pycparser (2.23-1build1) ... 192s Selecting previously unselected package python3-cffi. 192s Preparing to unpack .../42-python3-cffi_2.0.0-2_all.deb ... 192s Unpacking python3-cffi (2.0.0-2) ... 193s Selecting previously unselected package python3-argon2-cffi-bindings. 193s Preparing to unpack .../43-python3-argon2-cffi-bindings_25.1.0-2_armhf.deb ... 193s Unpacking python3-argon2-cffi-bindings (25.1.0-2) ... 193s Selecting previously unselected package python3-argon2. 193s Preparing to unpack .../44-python3-argon2_25.1.0-2_armhf.deb ... 193s Unpacking python3-argon2 (25.1.0-2) ... 193s Selecting previously unselected package python3-comm. 193s Preparing to unpack .../45-python3-comm_0.2.1-1build1_all.deb ... 193s Unpacking python3-comm (0.2.1-1build1) ... 193s Selecting previously unselected package libpython3.14-stdlib:armhf. 193s Preparing to unpack .../46-libpython3.14-stdlib_3.14.2-1_armhf.deb ... 193s Unpacking libpython3.14-stdlib:armhf (3.14.2-1) ... 193s Selecting previously unselected package python3.14. 193s Preparing to unpack .../47-python3.14_3.14.2-1_armhf.deb ... 193s Unpacking python3.14 (3.14.2-1) ... 193s Selecting previously unselected package python3-coverage. 193s Preparing to unpack .../48-python3-coverage_7.8.2+dfsg1-1ubuntu1_armhf.deb ... 193s Unpacking python3-coverage (7.8.2+dfsg1-1ubuntu1) ... 193s Selecting previously unselected package python3-debugpy. 193s Preparing to unpack .../49-python3-debugpy_1.8.19+ds-1ubuntu1_armhf.deb ... 193s Unpacking python3-debugpy (1.8.19+ds-1ubuntu1) ... 193s Selecting previously unselected package python3-decorator. 193s Preparing to unpack .../50-python3-decorator_5.2.1-2_all.deb ... 193s Unpacking python3-decorator (5.2.1-2) ... 193s Selecting previously unselected package python3-parso. 193s Preparing to unpack .../51-python3-parso_0.8.5-1_all.deb ... 193s Unpacking python3-parso (0.8.5-1) ... 193s Selecting previously unselected package python3-typeshed. 193s Preparing to unpack .../52-python3-typeshed_0.0~git20241223.ea91db2-4_all.deb ... 193s Unpacking python3-typeshed (0.0~git20241223.ea91db2-4) ... 194s Selecting previously unselected package python3-jedi. 194s Preparing to unpack .../53-python3-jedi_0.19.1+ds1-1build1_all.deb ... 194s Unpacking python3-jedi (0.19.1+ds1-1build1) ... 195s Selecting previously unselected package python3-matplotlib-inline. 195s Preparing to unpack .../54-python3-matplotlib-inline_0.2.1-1_all.deb ... 195s Unpacking python3-matplotlib-inline (0.2.1-1) ... 195s Selecting previously unselected package python3-wcwidth. 195s Preparing to unpack .../55-python3-wcwidth_0.2.14+dfsg1-1build1_all.deb ... 195s Unpacking python3-wcwidth (0.2.14+dfsg1-1build1) ... 195s Selecting previously unselected package python3-prompt-toolkit. 195s Preparing to unpack .../56-python3-prompt-toolkit_3.0.52-2_all.deb ... 195s Unpacking python3-prompt-toolkit (3.0.52-2) ... 195s Selecting previously unselected package python3-astroid. 195s Preparing to unpack .../57-python3-astroid_4.0.2-1ubuntu1_all.deb ... 195s Unpacking python3-astroid (4.0.2-1ubuntu1) ... 195s Selecting previously unselected package python3-asttokens. 195s Preparing to unpack .../58-python3-asttokens_3.0.1-1_all.deb ... 195s Unpacking python3-asttokens (3.0.1-1) ... 195s Selecting previously unselected package python3-executing. 195s Preparing to unpack .../59-python3-executing_2.2.1-0.1_all.deb ... 195s Unpacking python3-executing (2.2.1-0.1) ... 195s Selecting previously unselected package python3-pure-eval. 195s Preparing to unpack .../60-python3-pure-eval_0.2.3-1_all.deb ... 195s Unpacking python3-pure-eval (0.2.3-1) ... 195s Selecting previously unselected package python3-stack-data. 195s Preparing to unpack .../61-python3-stack-data_0.6.3-3_all.deb ... 195s Unpacking python3-stack-data (0.6.3-3) ... 195s Selecting previously unselected package python3-ipython. 195s Preparing to unpack .../62-python3-ipython_8.35.0-2_all.deb ... 195s Unpacking python3-ipython (8.35.0-2) ... 195s Selecting previously unselected package python3-psutil. 195s Preparing to unpack .../63-python3-psutil_7.1.0-1ubuntu1_armhf.deb ... 195s Unpacking python3-psutil (7.1.0-1ubuntu1) ... 195s Selecting previously unselected package libnorm1t64:armhf. 196s Preparing to unpack .../64-libnorm1t64_1.5.9+dfsg-4_armhf.deb ... 196s Unpacking libnorm1t64:armhf (1.5.9+dfsg-4) ... 196s Selecting previously unselected package libpgm-5.3-0t64:armhf. 196s Preparing to unpack .../65-libpgm-5.3-0t64_5.3.128~dfsg-2.1build2_armhf.deb ... 196s Unpacking libpgm-5.3-0t64:armhf (5.3.128~dfsg-2.1build2) ... 196s Selecting previously unselected package libsodium23:armhf. 196s Preparing to unpack .../66-libsodium23_1.0.18-2_armhf.deb ... 196s Unpacking libsodium23:armhf (1.0.18-2) ... 196s Selecting previously unselected package libzmq5:armhf. 196s Preparing to unpack .../67-libzmq5_4.3.5-1build3_armhf.deb ... 196s Unpacking libzmq5:armhf (4.3.5-1build3) ... 196s Selecting previously unselected package python3-zmq. 196s Preparing to unpack .../68-python3-zmq_27.1.0-1_armhf.deb ... 196s Unpacking python3-zmq (27.1.0-1) ... 196s Selecting previously unselected package python3-jupyter-client. 196s Preparing to unpack .../69-python3-jupyter-client_8.7.0-1_all.deb ... 196s Unpacking python3-jupyter-client (8.7.0-1) ... 196s Selecting previously unselected package python3-nest-asyncio. 196s Preparing to unpack .../70-python3-nest-asyncio_1.6.0-1_all.deb ... 196s Unpacking python3-nest-asyncio (1.6.0-1) ... 196s Selecting previously unselected package python3-ipykernel. 196s Preparing to unpack .../71-python3-ipykernel_6.30.1-1_all.deb ... 196s Unpacking python3-ipykernel (6.30.1-1) ... 196s Selecting previously unselected package python3-ipython-genutils. 196s Preparing to unpack .../72-python3-ipython-genutils_0.2.0-7_all.deb ... 196s Unpacking python3-ipython-genutils (0.2.0-7) ... 196s Selecting previously unselected package python-tinycss2-common. 196s Preparing to unpack .../73-python-tinycss2-common_1.5.1-1_all.deb ... 196s Unpacking python-tinycss2-common (1.5.1-1) ... 196s Selecting previously unselected package python3-webencodings. 196s Preparing to unpack .../74-python3-webencodings_0.5.1-5build1_all.deb ... 196s Unpacking python3-webencodings (0.5.1-5build1) ... 196s Selecting previously unselected package python3-tinycss2. 196s Preparing to unpack .../75-python3-tinycss2_1.5.1-1_all.deb ... 196s Unpacking python3-tinycss2 (1.5.1-1) ... 196s Selecting previously unselected package python3-html5lib. 196s Preparing to unpack .../76-python3-html5lib_1.2-3_all.deb ... 196s Unpacking python3-html5lib (1.2-3) ... 196s Selecting previously unselected package python3-bleach. 196s Preparing to unpack .../77-python3-bleach_6.3.0-1_all.deb ... 196s Unpacking python3-bleach (6.3.0-1) ... 196s Selecting previously unselected package python3-soupsieve. 196s Preparing to unpack .../78-python3-soupsieve_2.8.1-1_all.deb ... 196s Unpacking python3-soupsieve (2.8.1-1) ... 196s Selecting previously unselected package python3-bs4. 196s Preparing to unpack .../79-python3-bs4_4.14.3-2build1_all.deb ... 196s Unpacking python3-bs4 (4.14.3-2build1) ... 196s Selecting previously unselected package python3-defusedxml. 196s Preparing to unpack .../80-python3-defusedxml_0.7.1-3build1_all.deb ... 196s Unpacking python3-defusedxml (0.7.1-3build1) ... 196s Selecting previously unselected package python3-jupyterlab-pygments. 197s Preparing to unpack .../81-python3-jupyterlab-pygments_0.2.2-3build1_all.deb ... 197s Unpacking python3-jupyterlab-pygments (0.2.2-3build1) ... 197s Selecting previously unselected package python3-mistune. 197s Preparing to unpack .../82-python3-mistune_3.1.4-1_all.deb ... 197s Unpacking python3-mistune (3.1.4-1) ... 197s Selecting previously unselected package python3-fastjsonschema. 197s Preparing to unpack .../83-python3-fastjsonschema_2.21.1-1_all.deb ... 197s Unpacking python3-fastjsonschema (2.21.1-1) ... 197s Selecting previously unselected package python3-nbformat. 197s Preparing to unpack .../84-python3-nbformat_5.10.4-1_all.deb ... 197s Unpacking python3-nbformat (5.10.4-1) ... 197s Selecting previously unselected package python3-nbclient. 197s Preparing to unpack .../85-python3-nbclient_0.10.4-1_all.deb ... 197s Unpacking python3-nbclient (0.10.4-1) ... 197s Selecting previously unselected package python3-pandocfilters. 197s Preparing to unpack .../86-python3-pandocfilters_1.5.1-1_all.deb ... 197s Unpacking python3-pandocfilters (1.5.1-1) ... 197s Selecting previously unselected package python3-nbconvert. 197s Preparing to unpack .../87-python3-nbconvert_7.16.6-1_all.deb ... 197s Unpacking python3-nbconvert (7.16.6-1) ... 197s Selecting previously unselected package python3-prometheus-client. 197s Preparing to unpack .../88-python3-prometheus-client_0.21.1+ds1-1build1_all.deb ... 197s Unpacking python3-prometheus-client (0.21.1+ds1-1build1) ... 197s Selecting previously unselected package python3-send2trash. 197s Preparing to unpack .../89-python3-send2trash_1.8.3-1_all.deb ... 197s Unpacking python3-send2trash (1.8.3-1) ... 197s Selecting previously unselected package python3-notebook. 197s Preparing to unpack .../90-python3-notebook_6.4.13-5ubuntu0.1_all.deb ... 197s Unpacking python3-notebook (6.4.13-5ubuntu0.1) ... 197s Selecting previously unselected package jupyter-notebook. 197s Preparing to unpack .../91-jupyter-notebook_6.4.13-5ubuntu0.1_all.deb ... 197s Unpacking jupyter-notebook (6.4.13-5ubuntu0.1) ... 197s Selecting previously unselected package sphinx-rtd-theme-common. 197s Preparing to unpack .../92-sphinx-rtd-theme-common_3.0.2+dfsg-3_all.deb ... 197s Unpacking sphinx-rtd-theme-common (3.0.2+dfsg-3) ... 197s Selecting previously unselected package python-notebook-doc. 197s Preparing to unpack .../93-python-notebook-doc_6.4.13-5ubuntu0.1_all.deb ... 197s Unpacking python-notebook-doc (6.4.13-5ubuntu0.1) ... 197s Selecting previously unselected package python3-all. 198s Preparing to unpack .../94-python3-all_3.13.9-3_armhf.deb ... 198s Unpacking python3-all (3.13.9-3) ... 198s Selecting previously unselected package python3-iniconfig. 198s Preparing to unpack .../95-python3-iniconfig_2.1.0-2_all.deb ... 198s Unpacking python3-iniconfig (2.1.0-2) ... 198s Selecting previously unselected package python3-pluggy. 198s Preparing to unpack .../96-python3-pluggy_1.6.0-2_all.deb ... 198s Unpacking python3-pluggy (1.6.0-2) ... 198s Selecting previously unselected package python3-pytest. 198s Preparing to unpack .../97-python3-pytest_9.0.2-2_all.deb ... 198s Unpacking python3-pytest (9.0.2-2) ... 198s Selecting previously unselected package python3-requests-unixsocket. 198s Preparing to unpack .../98-python3-requests-unixsocket_1.0.1-1_all.deb ... 198s Unpacking python3-requests-unixsocket (1.0.1-1) ... 198s Setting up libpython3.13:armhf (3.13.11-1) ... 198s Setting up libjs-jquery-typeahead (2.11.0+dfsg1-3build1) ... 198s Setting up python3-iniconfig (2.1.0-2) ... 198s Setting up python3-tornado (6.5.4-0.1) ... 200s Setting up libnorm1t64:armhf (1.5.9+dfsg-4) ... 200s Setting up python3-pure-eval (0.2.3-1) ... 200s Setting up python3-send2trash (1.8.3-1) ... 200s Setting up fonts-lato (2.015-1build1) ... 200s Setting up fonts-mathjax (2.7.9+dfsg-1build1) ... 200s Setting up libsodium23:armhf (1.0.18-2) ... 200s Setting up libjs-mathjax (2.7.9+dfsg-1build1) ... 200s Setting up libdebuginfod-common (0.194-1) ... 201s Setting up libjs-requirejs-text (2.0.12-2) ... 201s Setting up python3-parso (0.8.5-1) ... 201s Setting up python3-defusedxml (0.7.1-3build1) ... 201s Setting up python3-ipython-genutils (0.2.0-7) ... 201s Setting up fonts-glyphicons-halflings (1.009~3.4.1+dfsg-6) ... 201s Setting up libargon2-1:armhf (0~20190702+dfsg-5) ... 201s Setting up python3-ply (3.11-10) ... 202s Setting up libpython3.14-minimal:armhf (3.14.2-1) ... 202s Setting up libjs-moment (2.29.4+ds-1) ... 202s Setting up python3-pandocfilters (1.5.1-1) ... 202s Setting up libjs-requirejs (2.3.8+ds+~2.1.37-1) ... 202s Setting up libjs-es6-promise (4.2.8-12) ... 202s Setting up libjs-text-encoding (0.7.0-5) ... 202s Setting up python3-webencodings (0.5.1-5build1) ... 202s Setting up python3-platformdirs (4.5.1-1) ... 203s Setting up python3-psutil (7.1.0-1ubuntu1) ... 203s Setting up libsource-highlight-common (3.1.9-4.3build2) ... 203s Setting up python3-pycparser (2.23-1build1) ... 204s Setting up libc6-dbg:armhf (2.42-2ubuntu4) ... 204s Setting up libdw1t64:armhf (0.194-1) ... 204s Setting up python3-requests-unixsocket (1.0.1-1) ... 204s Setting up python3-jupyterlab-pygments (0.2.2-3build1) ... 204s Setting up libpgm-5.3-0t64:armhf (5.3.128~dfsg-2.1build2) ... 204s Setting up python3-decorator (5.2.1-2) ... 205s Setting up python3-wcwidth (0.2.14+dfsg1-1build1) ... 205s Setting up node-jed (1.1.1-4) ... 205s Setting up python3-typeshed (0.0~git20241223.ea91db2-4) ... 205s Setting up libjs-xterm (5.3.0-4) ... 205s Setting up python3-nest-asyncio (1.6.0-1) ... 205s Setting up libjs-codemirror (5.65.20+~cs5.83.25-1) ... 205s Setting up libjs-jed (1.1.1-4) ... 205s Setting up python3-html5lib (1.2-3) ... 206s Setting up libbabeltrace1:armhf (1.5.11-5) ... 206s Setting up python3-pluggy (1.6.0-2) ... 206s Setting up python3-fastjsonschema (2.21.1-1) ... 207s Setting up python3-terminado (0.18.1-1) ... 207s Setting up python3-astroid (4.0.2-1ubuntu1) ... 208s Setting up python3-traitlets (5.14.3+really5.14.3-2) ... 208s Setting up python-tinycss2-common (1.5.1-1) ... 208s Setting up libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 208s Setting up python3-mistune (3.1.4-1) ... 209s Setting up python3-soupsieve (2.8.1-1) ... 209s Setting up fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1build1) ... 209s Setting up sphinx-rtd-theme-common (3.0.2+dfsg-3) ... 209s Setting up python3.14-minimal (3.14.2-1) ... 210s Setting up python3-jupyter-core (5.9.1-1) ... 211s Setting up libjs-bootstrap (3.4.1+dfsg-6) ... 211s Setting up libjs-underscore (1.13.7~dfsg+~1.13.0-5) ... 211s Setting up libjs-marked (4.2.3+ds+~4.0.7-4) ... 211s Setting up python3-prompt-toolkit (3.0.52-2) ... 212s Setting up libdebuginfod1t64:armhf (0.194-1) ... 212s Setting up python3-tinycss2 (1.5.1-1) ... 212s Setting up libzmq5:armhf (4.3.5-1build3) ... 212s Setting up python3-jedi (0.19.1+ds1-1build1) ... 213s Setting up libpython3.14-stdlib:armhf (3.14.2-1) ... 213s Setting up python3-asttokens (3.0.1-1) ... 213s Setting up python3-pytest (9.0.2-2) ... 214s Setting up python3-cffi (2.0.0-2) ... 215s Setting up libjs-bootstrap-tour (0.12.0+dfsg-6) ... 215s Setting up libjs-backbone (1.4.1~dfsg+~1.4.15-3build1) ... 215s Setting up libsource-highlight4t64:armhf (3.1.9-4.3build2) ... 215s Setting up python3-nbformat (5.10.4-1) ... 215s Setting up python-notebook-doc (6.4.13-5ubuntu0.1) ... 215s Setting up python3-bs4 (4.14.3-2build1) ... 216s Setting up python3-bleach (6.3.0-1) ... 216s Setting up python3-matplotlib-inline (0.2.1-1) ... 216s Setting up python3-comm (0.2.1-1build1) ... 217s Setting up python3-prometheus-client (0.21.1+ds1-1build1) ... 217s Setting up gdb (17.1-1ubuntu1) ... 217s Setting up libjs-jquery-ui (1.13.2+dfsg-1build1) ... 217s Setting up python3-executing (2.2.1-0.1) ... 217s Setting up python3-zmq (27.1.0-1) ... 218s Setting up python3-argon2-cffi-bindings (25.1.0-2) ... 218s Setting up python3-argon2 (25.1.0-2) ... 218s Setting up python3-jupyter-client (8.7.0-1) ... 219s Setting up jupyter-core (5.9.1-1) ... 219s Setting up python3.14 (3.14.2-1) ... 220s Setting up python3-stack-data (0.6.3-3) ... 221s Setting up python3-all (3.13.9-3) ... 221s Setting up python3-coverage (7.8.2+dfsg1-1ubuntu1) ... 221s Setting up python3-debugpy (1.8.19+ds-1ubuntu1) ... 223s Setting up python3-nbclient (0.10.4-1) ... 223s Setting up python3-ipython (8.35.0-2) ... 224s /usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:3141: SyntaxWarning: 'return' in a 'finally' block 224s return result 225s Setting up python3-ipykernel (6.30.1-1) ... 225s Setting up python3-nbconvert (7.16.6-1) ... 226s Setting up python3-notebook (6.4.13-5ubuntu0.1) ... 227s Setting up jupyter-notebook (6.4.13-5ubuntu0.1) ... 227s Processing triggers for systemd (259-1ubuntu2) ... 227s Processing triggers for man-db (2.13.1-1) ... 228s Processing triggers for libc-bin (2.42-2ubuntu4) ... 240s autopkgtest [03:32:59]: test pytest: [----------------------- 242s Testing with python3.14 243s *** STARTING RUN 1: python3.14 -m pytest --pyargs notebook -rsfE --ignore=/usr/lib/python3/dist-packages/notebook/tests/selenium --deselect=services/kernels/tests/test_kernels_api.py::KernelAPITest::test_connections 248s ============================= test session starts ============================== 248s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 248s rootdir: /tmp/autopkgtest.CmXq4V/autopkgtest_tmp 248s plugins: typeguard-4.4.4 248s collected 330 items / 6 deselected / 324 selected 248s 248s auth/tests/test_login.py .. [ 0%] 249s auth/tests/test_security.py .... [ 1%] 249s bundler/tests/test_bundler_api.py ..... [ 3%] 249s bundler/tests/test_bundler_tools.py ............. [ 7%] 250s bundler/tests/test_bundlerextension.py ... [ 8%] 250s nbconvert/tests/test_nbconvert_handlers.py ssssss [ 10%] 250s services/api/tests/test_api.py ... [ 11%] 250s services/config/tests/test_config_api.py ... [ 12%] 252s services/contents/tests/test_contents_api.py .s..........ss..s.......... [ 20%] 254s ................s...........ss..s......................... [ 38%] 254s services/contents/tests/test_fileio.py ... [ 39%] 254s services/contents/tests/test_largefilemanager.py . [ 39%] 256s services/contents/tests/test_manager.py .....s........ss..........ss.... [ 49%] 256s .... [ 50%] 268s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF.. [ 54%] 268s services/kernelspecs/tests/test_kernelspecs_api.py ....... [ 56%] 269s services/nbconvert/tests/test_nbconvert_api.py . [ 56%] 269s services/sessions/tests/test_sessionmanager.py ......... [ 59%] 271s services/sessions/tests/test_sessions_api.py FFFFFE.FEFE.FFFFFFFE.FEFE.F [ 65%] 272s F [ 66%] 276s terminal/tests/test_terminals_api.py ........ [ 68%] 276s tests/test_config_manager.py . [ 68%] 276s tests/test_files.py ..... [ 70%] 277s tests/test_gateway.py ...... [ 72%] 277s tests/test_i18n.py . [ 72%] 277s tests/test_log.py . [ 72%] 279s tests/test_nbextensions.py ................................... [ 83%] 280s tests/test_notebookapp.py .......................... [ 91%] 281s tests/test_paths.py ... [ 92%] 281s tests/test_serialize.py .. [ 93%] 282s tests/test_serverextensions.py ..... [ 94%] 282s tests/test_traittypes.py ........... [ 98%] 284s tests/test_utils.py ....s [ 99%] 285s tree/tests/test_tree_handler.py . [100%] 285s 285s ==================================== ERRORS ==================================== 285s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 285s 285s self = 285s 285s def tearDown(self): 285s for k in self.kern_api.list().json(): 285s > self.kern_api.shutdown(k['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/294781b2-e184-46e2-a79b-fef51cf42993 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 285s import functools 285s File "/usr/lib/python3.13/functools.py", line 18, in 285s from collections import namedtuple 285s File "/usr/lib/python3.13/collections/__init__.py", line 45, in 285s from _collections import deque 285s File "", line 1360, in _find_and_load 285s File "", line 1331, in _find_and_load_unlocked 285s File "", line 946, in _load_unlocked 285s KeyboardInterrupt 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpfhlucjn5/runtime/kernel-294781b2-e184-46e2-a79b-fef51cf42993.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54839 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50739 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 294781b2-e184-46e2-a79b-fef51cf42993, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.260000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.740000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpfhlucjn5/runtime/kernel-8e75b160-6dd5-4f03-94ed-6f6e04423de5.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56873 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44987 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8e75b160-6dd5-4f03-94ed-6f6e04423de5, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.290000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.470000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 8e75b160-6dd5-4f03-94ed-6f6e04423de5 285s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/8e75b160-6dd5-4f03-94ed-6f6e04423de5/interrupt (127.0.0.1) 2.290000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 285s yield maybe_future(km.restart_kernel(kernel_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 285s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 285s await ensure_async(kernel.restart_kernel(now=now)) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 285s await self._async_shutdown_kernel(now=now, restart=True) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/8e75b160-6dd5-4f03-94ed-6f6e04423de5/restart (127.0.0.1) 7.540000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.620000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 294781b2-e184-46e2-a79b-fef51cf42993 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 294781b2-e184-46e2-a79b-fef51cf42993 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/294781b2-e184-46e2-a79b-fef51cf42993 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/294781b2-e184-46e2-a79b-fef51cf42993', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 285s yielded = ctx_run(next, result) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 285s yield maybe_future(km.shutdown_kernel(kernel_id)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/294781b2-e184-46e2-a79b-fef51cf42993 (127.0.0.1) 10.230000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 285s import jupyter_client 285s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 285s from .asynchronous import AsyncKernelClient 285s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 285s from .client import AsyncKernelClient # noqa 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 285s import zmq.asyncio 285s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 56, in 285s from zmq.backend import * # noqa 285s ^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "", line 1390, in _handle_fromlist 285s KeyboardInterrupt 285s _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 285s 285s self = 285s 285s def tearDown(self): 285s for k in self.kern_api.list().json(): 285s > self.kern_api.shutdown(k['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/95936a5d-6d42-4588-b741-c9f6569567c7 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s in_globals, None, 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 285s import functools 285s File "/usr/lib/python3.13/functools.py", line 18, in 285s from collections import namedtuple 285s File "", line 1357, in _find_and_load 285s File "", line 421, in __exit__ 285s File "", line 378, in release 285s KeyboardInterrupt 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 285s import jupyter_client 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcc0grr35/runtime/kernel-95936a5d-6d42-4588-b741-c9f6569567c7.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53851 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47813 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 95936a5d-6d42-4588-b741-c9f6569567c7, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.610000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.730000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcc0grr35/runtime/kernel-806b518c-c2d3-4334-9952-79994adb2d6a.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56899 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36401 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 806b518c-c2d3-4334-9952-79994adb2d6a, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.710000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.640000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 806b518c-c2d3-4334-9952-79994adb2d6a 285s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/806b518c-c2d3-4334-9952-79994adb2d6a/interrupt (127.0.0.1) 2.010000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 285s yield maybe_future(km.restart_kernel(kernel_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 285s result = coro.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 285s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 285s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 285s yield self # This tells Task to wait for completion. 285s ^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 285s await ensure_async(kernel.restart_kernel(now=now)) 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 285s await self._async_shutdown_kernel(now=now, restart=True) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/806b518c-c2d3-4334-9952-79994adb2d6a/restart (127.0.0.1) 6.030000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.590000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 95936a5d-6d42-4588-b741-c9f6569567c7 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 95936a5d-6d42-4588-b741-c9f6569567c7 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/95936a5d-6d42-4588-b741-c9f6569567c7 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/95936a5d-6d42-4588-b741-c9f6569567c7', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 285s yield maybe_future(km.shutdown_kernel(kernel_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/95936a5d-6d42-4588-b741-c9f6569567c7 (127.0.0.1) 9.570000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "", line 1331, in _find_and_load_unlocked 285s File "", line 935, in _load_unlocked 285s File "", line 1019, in exec_module 285s File "", line 1115, in get_code 285s File "", line 1215, in get_data 285s KeyboardInterrupt 285s ________ ERROR at teardown of SessionAPITest.test_create_with_kernel_id ________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/22242cd5-54e0-4b2a-9a47-281e32b74b5f 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-07deba05-4523-4e99-8510-934a1377b27b.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37797 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51229 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 07deba05-4523-4e99-8510-934a1377b27b, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.200000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.070000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.070000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.440000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ff66d289-b389-4a0a-adf7-b1d38a679a20 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ff66d289-b389-4a0a-adf7-b1d38a679a20 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/fc6a8006-37b2-486f-8d36-9829c4c71779 (127.0.0.1) 3.320000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 07deba05-4523-4e99-8510-934a1377b27b 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 07deba05-4523-4e99-8510-934a1377b27b 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/22242cd5-54e0-4b2a-9a47-281e32b74b5f (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/22242cd5-54e0-4b2a-9a47-281e32b74b5f', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/22242cd5-54e0-4b2a-9a47-281e32b74b5f (127.0.0.1) 13.460000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 285s import jupyter_client 285s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 285s from .asynchronous import AsyncKernelClient 285s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 285s from .client import AsyncKernelClient # noqa 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 285s import zmq.asyncio 285s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 52, in 285s from zmq import backend 285s File "/usr/lib/python3/dist-packages/zmq/backend/__init__.py", line 25, in 285s _ns = select_backend(first) 285s File "/usr/lib/python3/dist-packages/zmq/backend/select.py", line 31, in select_backend 285s mod = import_module(name) 285s File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module 285s return _bootstrap._gcd_import(name[level:], package, level) 285s ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/zmq/backend/cython/__init__.py", line 6, in 285s from . import _zmq 285s File "", line 645, in parent 285s KeyboardInterrupt 285s __________ ERROR at teardown of SessionAPITest.test_modify_kernel_id ___________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 285s from typing import TYPE_CHECKING, Any 285s File "/usr/lib/python3.13/typing.py", line 1726, in 285s class _CallableType(_SpecialGenericAlias, _root=True): 285s ...<29 lines>... 285s return self.copy_with(params) 285s File "/usr/lib/python3.13/typing.py", line 1745, in _CallableType 285s @_tp_cache 285s ^^^^^^^^^ 285s File "/usr/lib/python3.13/typing.py", line 436, in _tp_cache 285s return decorator(func) 285s File "/usr/lib/python3.13/typing.py", line 415, in decorator 285s def decorator(func): 285s 285s KeyboardInterrupt 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-a20a370e-bd67-4640-bc2d-4b41748d7fb7.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59271 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43845 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: a20a370e-bd67-4640-bc2d-4b41748d7fb7, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 24.090000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-3d075f23-b98e-475b-82bb-18ae71ec9266.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48759 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36709 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3d075f23-b98e-475b-82bb-18ae71ec9266, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.830000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a20a370e-bd67-4640-bc2d-4b41748d7fb7 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a20a370e-bd67-4640-bc2d-4b41748d7fb7 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception PATCH /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='PATCH', uri='/a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 154, in patch 285s km.shutdown_kernel(before['kernel']['id']) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 PATCH /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 12.820000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.940000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3d075f23-b98e-475b-82bb-18ae71ec9266 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3d075f23-b98e-475b-82bb-18ae71ec9266 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 13.190000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 285s from subprocess import PIPE, Popen 285s File "/usr/lib/python3.13/subprocess.py", line 46, in 285s import locale 285s File "/usr/lib/python3.13/locale.py", line 96, in 285s if 'strxfrm' not in globals(): 285s ~~~~~~~^^ 285s KeyboardInterrupt 285s _________ ERROR at teardown of SessionAPITest.test_modify_kernel_name __________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.160000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-220c3488-f0e7-4c1a-9e2c-2350df75953b.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39739 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50541 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 220c3488-f0e7-4c1a-9e2c-2350df75953b, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3d075f23-b98e-475b-82bb-18ae71ec9266 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3d075f23-b98e-475b-82bb-18ae71ec9266 285s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 26.100000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 4.590000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.000000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 220c3488-f0e7-4c1a-9e2c-2350df75953b 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 220c3488-f0e7-4c1a-9e2c-2350df75953b 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 13.160000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 285s from ._local import * 285s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 285s class PureWindowsPath(PurePath): 285s ...<7 lines>... 285s __slots__ = () 285s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 285s import ntpath 285s File "/usr/lib/python3.13/ntpath.py", line 45, in 285s from _winapi import ( 285s ...<2 lines>... 285s LCMAP_LOWERCASE as _LCMAP_LOWERCASE) 285s File "", line 1360, in _find_and_load 285s File "", line 1322, in _find_and_load_unlocked 285s File "", line 1262, in _find_spec 285s File "", line 1556, in find_spec 285s File "", line 1530, in _get_spec 285s File "", line 1629, in find_spec 285s File "", line 152, in _path_stat 285s KeyboardInterrupt 285s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_kernel_id ______ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/9a933bca-77e2-48c0-a454-3ee26a14ba53 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-9e4fad5b-b9f1-4abe-8487-56467a90bd62.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46513 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52557 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9e4fad5b-b9f1-4abe-8487-56467a90bd62, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.460000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.790000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.760000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.710000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 14de0cda-0940-44da-89c3-51b480d8fd18 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 14de0cda-0940-44da-89c3-51b480d8fd18 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/e5f61c82-203b-4338-adf3-286b22f9dfe6 (127.0.0.1) 1.950000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9e4fad5b-b9f1-4abe-8487-56467a90bd62 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9e4fad5b-b9f1-4abe-8487-56467a90bd62 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/9a933bca-77e2-48c0-a454-3ee26a14ba53 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/9a933bca-77e2-48c0-a454-3ee26a14ba53', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/9a933bca-77e2-48c0-a454-3ee26a14ba53 (127.0.0.1) 10.520000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 285s import json 285s File "/usr/lib/python3.13/json/__init__.py", line 106, in 285s from .decoder import JSONDecoder, JSONDecodeError 285s File "/usr/lib/python3.13/json/decoder.py", line 5, in 285s from json import scanner 285s File "/usr/lib/python3.13/json/scanner.py", line 11, in 285s NUMBER_RE = re.compile( 285s r'(-?(?:0|[1-9][0-9]*))(\.[0-9]+)?([eE][-+]?[0-9]+)?', 285s (re.VERBOSE | re.MULTILINE | re.DOTALL)) 285s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 285s return _compile(pattern, flags) 285s File "/usr/lib/python3.13/re/__init__.py", line 333, in _compile 285s flags = flags.value 285s ^^^^^^^^^^^ 285s File "/usr/lib/python3.13/enum.py", line 199, in __get__ 285s def __get__(self, instance, ownerclass=None): 285s 285s KeyboardInterrupt 285s ________ ERROR at teardown of AsyncSessionAPITest.test_modify_kernel_id ________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 285s from ._local import * 285s File "", line 1360, in _find_and_load 285s File "", line 1339, in _find_and_load_unlocked 285s KeyboardInterrupt 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-a4634f00-8523-48bf-9be4-9c38d564a05a.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41147 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45875 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: a4634f00-8523-48bf-9be4-9c38d564a05a, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 20.550000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-e5fc6bd6-0dfd-4600-922b-f827699855cd.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55381 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59791 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: e5fc6bd6-0dfd-4600-922b-f827699855cd, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.740000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a4634f00-8523-48bf-9be4-9c38d564a05a 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a4634f00-8523-48bf-9be4-9c38d564a05a 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception PATCH /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='PATCH', uri='/a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 153, in patch 285s yield maybe_future( 285s km.shutdown_kernel(before['kernel']['id']) 285s ) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 PATCH /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 10.230000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.710000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e5fc6bd6-0dfd-4600-922b-f827699855cd 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e5fc6bd6-0dfd-4600-922b-f827699855cd 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 10.440000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 285s from ._local import * 285s File "/usr/lib/python3.13/pathlib/_local.py", line 6, in 285s import warnings 285s File "", line 1360, in _find_and_load 285s File "", line 1331, in _find_and_load_unlocked 285s File "", line 946, in _load_unlocked 285s KeyboardInterrupt 285s _______ ERROR at teardown of AsyncSessionAPITest.test_modify_kernel_name _______ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.960000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-8525a99d-8d9e-4b49-a5f5-62606d0373ac.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53959 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45519 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8525a99d-8d9e-4b49-a5f5-62606d0373ac, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e5fc6bd6-0dfd-4600-922b-f827699855cd 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e5fc6bd6-0dfd-4600-922b-f827699855cd 285s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 20.620000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.650000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.670000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8525a99d-8d9e-4b49-a5f5-62606d0373ac 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8525a99d-8d9e-4b49-a5f5-62606d0373ac 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 10.340000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s Traceback (most recent call last): 285s =================================== FAILURES =================================== 285s ______________________ KernelAPITest.test_default_kernel _______________________ 285s 285s self = 285s 285s def tearDown(self): 285s for k in self.kern_api.list().json(): 285s > self.kern_api.shutdown(k['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/a30dcecb-aa2b-46b7-8d02-ac349c439c6e 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log setup ------------------------------ 285s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpfhlucjn5/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpfhlucjn5/etc/jupyter'] for config files 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpfhlucjn5/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpfhlucjn5/config 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpfhlucjn5/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpfhlucjn5/config 285s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpfhlucjn5/notebooks 285s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 285s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 285s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 285s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 285s WARNING NotebookApp:handlers.py:612 Forbidden 285s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.350000ms referer=None 285s ----------------------------- Captured stderr call ----------------------------- 285s Fatal Python error: init_import_site: Failed to import the site module 285s Python runtime state: initialized 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpfhlucjn5/runtime/kernel-a30dcecb-aa2b-46b7-8d02-ac349c439c6e.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46209 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44451 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: a30dcecb-aa2b-46b7-8d02-ac349c439c6e, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 84.210000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.700000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a30dcecb-aa2b-46b7-8d02-ac349c439c6e 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a30dcecb-aa2b-46b7-8d02-ac349c439c6e 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/a30dcecb-aa2b-46b7-8d02-ac349c439c6e (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/a30dcecb-aa2b-46b7-8d02-ac349c439c6e', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 285s yielded = ctx_run(next, result) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 285s yield maybe_future(km.shutdown_kernel(kernel_id)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/a30dcecb-aa2b-46b7-8d02-ac349c439c6e (127.0.0.1) 15.560000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/site.py", line 735, in 285s main() 285s ~~~~^^ 285s File "/usr/lib/python3.13/site.py", line 728, in main 285s execsitecustomize() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.13/site.py", line 667, in execsitecustomize 285s import sitecustomize 285s File "/usr/lib/python3.13/sitecustomize.py", line 3, in 285s import apport_python_hook 285s File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 14, in 285s import types 285s File "", line 1360, in _find_and_load 285s File "", line 1331, in _find_and_load_unlocked 285s File "", line 935, in _load_unlocked 285s File "", line 1019, in exec_module 285s File "", line 1115, in get_code 285s File "", line 1214, in get_data 285s KeyboardInterrupt 285s ______________________ KernelAPITest.test_kernel_handler _______________________ 285s 285s self = 285s 285s def test_kernel_handler(self): 285s # GET kernel with given id 285s kid = self.kern_api.start().json()['id'] 285s r = self.kern_api.get(kid) 285s kern1 = r.json() 285s self.assertEqual(r.status_code, 200) 285s assert isinstance(kern1, dict) 285s self.assertIn('id', kern1) 285s self.assertEqual(kern1['id'], kid) 285s 285s # Request a bad kernel id and check that a JSON 285s # message is returned! 285s bad_id = '111-111-111-111-111' 285s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 285s self.kern_api.get(bad_id) 285s 285s # DELETE kernel with id 285s > r = self.kern_api.shutdown(kid) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/4aa65bac-ff2f-4083-ba6f-5131dec40b6f 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 285s from glob import _Globber, _no_recurse_symlinks 285s File "/usr/lib/python3.13/glob.py", line 3, in 285s import contextlib 285s File "/usr/lib/python3.13/contextlib.py", line 105, in 285s class _GeneratorContextManagerBase: 285s ...<20 lines>... 285s return self.__class__(self.func, self.args, self.kwds) 285s KeyboardInterrupt 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpfhlucjn5/runtime/kernel-4aa65bac-ff2f-4083-ba6f-5131dec40b6f.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34269 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41905 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4aa65bac-ff2f-4083-ba6f-5131dec40b6f, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.210000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/4aa65bac-ff2f-4083-ba6f-5131dec40b6f (127.0.0.1) 1.510000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 285s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 285s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 1.770000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4aa65bac-ff2f-4083-ba6f-5131dec40b6f 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4aa65bac-ff2f-4083-ba6f-5131dec40b6f 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/4aa65bac-ff2f-4083-ba6f-5131dec40b6f (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/4aa65bac-ff2f-4083-ba6f-5131dec40b6f', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 285s yielded = ctx_run(next, result) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 285s yield maybe_future(km.shutdown_kernel(kernel_id)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/4aa65bac-ff2f-4083-ba6f-5131dec40b6f (127.0.0.1) 10.630000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.530000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a30dcecb-aa2b-46b7-8d02-ac349c439c6e 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a30dcecb-aa2b-46b7-8d02-ac349c439c6e 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/a30dcecb-aa2b-46b7-8d02-ac349c439c6e (127.0.0.1) 2.470000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4aa65bac-ff2f-4083-ba6f-5131dec40b6f 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4aa65bac-ff2f-4083-ba6f-5131dec40b6f 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/4aa65bac-ff2f-4083-ba6f-5131dec40b6f (127.0.0.1) 2.340000ms 285s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 285s 285s self = 285s 285s def test_main_kernel_handler(self): 285s # POST request 285s r = self.kern_api.start() 285s kern1 = r.json() 285s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 285s self.assertEqual(r.status_code, 201) 285s self.assertIsInstance(kern1, dict) 285s 285s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 285s expected_csp = '; '.join([ 285s "frame-ancestors 'self'", 285s 'report-uri ' + report_uri, 285s "default-src 'none'" 285s ]) 285s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 285s 285s # GET request 285s r = self.kern_api.list() 285s self.assertEqual(r.status_code, 200) 285s assert isinstance(r.json(), list) 285s self.assertEqual(r.json()[0]['id'], kern1['id']) 285s self.assertEqual(r.json()[0]['name'], kern1['name']) 285s 285s # create another kernel and check that they both are added to the 285s # list of kernels from a GET request 285s kern2 = self.kern_api.start().json() 285s assert isinstance(kern2, dict) 285s r = self.kern_api.list() 285s kernels = r.json() 285s self.assertEqual(r.status_code, 200) 285s assert isinstance(kernels, list) 285s self.assertEqual(len(kernels), 2) 285s 285s # Interrupt a kernel 285s r = self.kern_api.interrupt(kern2['id']) 285s self.assertEqual(r.status_code, 204) 285s 285s # Restart a kernel 285s > r = self.kern_api.restart(kern2['id']) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 285s return self._req('POST', url_path_join(id, 'restart')) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/8e75b160-6dd5-4f03-94ed-6f6e04423de5/restart 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 285s import functools 285s File "/usr/lib/python3.13/functools.py", line 18, in 285s from collections import namedtuple 285s File "/usr/lib/python3.13/collections/__init__.py", line 45, in 285s from _collections import deque 285s File "", line 1360, in _find_and_load 285s File "", line 1331, in _find_and_load_unlocked 285s File "", line 946, in _load_unlocked 285s KeyboardInterrupt 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpfhlucjn5/runtime/kernel-294781b2-e184-46e2-a79b-fef51cf42993.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54839 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50739 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 294781b2-e184-46e2-a79b-fef51cf42993, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.260000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.740000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpfhlucjn5/runtime/kernel-8e75b160-6dd5-4f03-94ed-6f6e04423de5.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56873 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44987 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8e75b160-6dd5-4f03-94ed-6f6e04423de5, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.290000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.470000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 8e75b160-6dd5-4f03-94ed-6f6e04423de5 285s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/8e75b160-6dd5-4f03-94ed-6f6e04423de5/interrupt (127.0.0.1) 2.290000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 285s yield maybe_future(km.restart_kernel(kernel_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 285s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 285s await ensure_async(kernel.restart_kernel(now=now)) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 285s await self._async_shutdown_kernel(now=now, restart=True) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/8e75b160-6dd5-4f03-94ed-6f6e04423de5/restart (127.0.0.1) 7.540000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.620000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 294781b2-e184-46e2-a79b-fef51cf42993 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 294781b2-e184-46e2-a79b-fef51cf42993 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/294781b2-e184-46e2-a79b-fef51cf42993 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/294781b2-e184-46e2-a79b-fef51cf42993', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 285s yielded = ctx_run(next, result) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 285s yield maybe_future(km.shutdown_kernel(kernel_id)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/294781b2-e184-46e2-a79b-fef51cf42993 (127.0.0.1) 10.230000ms referer=None 285s ________________________ KernelAPITest.test_no_kernels _________________________ 285s 285s self = 285s 285s def test_no_kernels(self): 285s """Make sure there are no kernels running at the start""" 285s kernels = self.kern_api.list().json() 285s > self.assertEqual(kernels, []) 285s E AssertionError: Lists differ: [{'id': '294781b2-e184-46e2-a79b-fef51cf42[281 chars]: 0}] != [] 285s E 285s E First list contains 2 additional elements. 285s E First extra element 0: 285s E {'id': '294781b2-e184-46e2-a79b-fef51cf42993', 'name': 'python3', 'last_activity': '2026-01-24T03:33:16.184166Z', 'execution_state': 'starting', 'connections': 0} 285s E 285s E + [] 285s E - [{'connections': 0, 285s E - 'execution_state': 'starting', 285s E - 'id': '294781b2-e184-46e2-a79b-fef51cf42993', 285s E - 'last_activity': '2026-01-24T03:33:16.184166Z', 285s E - 'name': 'python3'}, 285s E - {'connections': 0, 285s E - 'execution_state': 'starting', 285s E - 'id': '8e75b160-6dd5-4f03-94ed-6f6e04423de5', 285s E - 'last_activity': '2026-01-24T03:33:16.217055Z', 285s E - 'name': 'python3'}] 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.770000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.680000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 294781b2-e184-46e2-a79b-fef51cf42993 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 294781b2-e184-46e2-a79b-fef51cf42993 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/294781b2-e184-46e2-a79b-fef51cf42993 (127.0.0.1) 2.710000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8e75b160-6dd5-4f03-94ed-6f6e04423de5 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8e75b160-6dd5-4f03-94ed-6f6e04423de5 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/8e75b160-6dd5-4f03-94ed-6f6e04423de5 (127.0.0.1) 2.730000ms 285s ---------------------------- Captured log teardown ----------------------------- 285s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 285s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 285s _____________________ AsyncKernelAPITest.test_connections ______________________ 285s 285s self = 285s 285s def tearDown(self): 285s for k in self.kern_api.list().json(): 285s > self.kern_api.shutdown(k['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log setup ------------------------------ 285s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpcc0grr35/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpcc0grr35/etc/jupyter'] for config files 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpcc0grr35/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpcc0grr35/config 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpcc0grr35/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpcc0grr35/config 285s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpcc0grr35/notebooks 285s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 285s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 285s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 285s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 285s WARNING NotebookApp:handlers.py:612 Forbidden 285s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 2.420000ms referer=None 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcc0grr35/runtime/kernel-ac002844-04a4-4fac-80b6-9c5ed1bafa46.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38891 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33135 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: ac002844-04a4-4fac-80b6-9c5ed1bafa46, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.750000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46 (127.0.0.1) 1.730000ms 285s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46/channels 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 285s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40781 285s DEBUG NotebookApp:kernelmanager.py:423 activity on ac002844-04a4-4fac-80b6-9c5ed1bafa46: status (starting) 285s DEBUG NotebookApp:kernelmanager.py:423 activity on ac002844-04a4-4fac-80b6-9c5ed1bafa46: status (busy) 285s DEBUG NotebookApp:handlers.py:306 Received kernel info: {'status': 'ok', 'protocol_version': '5.3', 'implementation': 'ipython', 'implementation_version': '8.35.0', 'language_info': {'name': 'python', 'version': '3.13.11', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': "Python 3.13.11 (main, Dec 6 2025, 13:15:20) [GCC 15.2.0]\nType 'copyright', 'credits' or 'license' for more information\nIPython 8.35.0 -- An enhanced Interactive Python. Type '?' for help.\n", 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.13'}, {'text': 'IPython Reference', 'url': 'https://ipython.org/documentation.html'}, {'text': 'NumPy Reference', 'url': 'https://docs.scipy.org/doc/numpy/reference/'}, {'text': 'SciPy Reference', 'url': 'https://docs.scipy.org/doc/scipy/reference/'}, {'text': 'Matplotlib Reference', 'url': 'https://matplotlib.org/contents.html'}, {'text': 'SymPy Reference', 'url': 'http://docs.sympy.org/latest/index.html'}, {'text': 'pandas Reference', 'url': 'https://pandas.pydata.org/pandas-docs/stable/'}]} 285s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel ac002844-04a4-4fac-80b6-9c5ed1bafa46) to 5.4 (client). 285s DEBUG NotebookApp:kernelmanager.py:423 activity on ac002844-04a4-4fac-80b6-9c5ed1bafa46: status (idle) 285s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46/channels (127.0.0.1) 981.780000ms 285s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46/channels 285s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33135 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40781 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38891 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56627 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40781 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38891 285s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 285s Setting websocket_ping_timeout=30000 285s DEBUG NotebookApp:handlers.py:255 Nudge: attempt 1 on kernel ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46 (127.0.0.1) 2.000000ms 285s DEBUG NotebookApp:handlers.py:207 Nudge: IOPub received: ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:handlers.py:210 Nudge: resolving iopub future: ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:kernelmanager.py:423 activity on ac002844-04a4-4fac-80b6-9c5ed1bafa46: status (busy) 285s DEBUG NotebookApp:kernelmanager.py:423 activity on ac002844-04a4-4fac-80b6-9c5ed1bafa46: status (busy) 285s DEBUG NotebookApp:handlers.py:195 Nudge: shell info reply received: ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:handlers.py:197 Nudge: resolving shell future: ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:handlers.py:201 Nudge: control info reply received: ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:kernelmanager.py:423 activity on ac002844-04a4-4fac-80b6-9c5ed1bafa46: status (idle) 285s DEBUG NotebookApp:kernelmanager.py:423 activity on ac002844-04a4-4fac-80b6-9c5ed1bafa46: status (idle) 285s DEBUG NotebookApp:handlers.py:579 Websocket closed ac002844-04a4-4fac-80b6-9c5ed1bafa46:b1c2028b-3f4a6bab5fd77c45284675a9 285s INFO NotebookApp:kernelmanager.py:222 Starting buffering for ac002844-04a4-4fac-80b6-9c5ed1bafa46:b1c2028b-3f4a6bab5fd77c45284675a9 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on ac002844-04a4-4fac-80b6-9c5ed1bafa46:iopub 285s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on ac002844-04a4-4fac-80b6-9c5ed1bafa46:iopub 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on ac002844-04a4-4fac-80b6-9c5ed1bafa46:iopub 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46 (127.0.0.1) 2.020000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46 (127.0.0.1) 1.660000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.660000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s INFO NotebookApp:kernelmanager.py:286 Discarding 3 buffered messages for ac002844-04a4-4fac-80b6-9c5ed1bafa46:b1c2028b-3f4a6bab5fd77c45284675a9 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 285s yield maybe_future(km.shutdown_kernel(kernel_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46 (127.0.0.1) 11.480000ms referer=None 285s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 285s 285s self = 285s 285s def tearDown(self): 285s for k in self.kern_api.list().json(): 285s > self.kern_api.shutdown(k['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/95b7378d-3ec9-4bf9-a605-29aaff2c8af1 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcc0grr35/runtime/kernel-95b7378d-3ec9-4bf9-a605-29aaff2c8af1.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50563 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35243 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 95b7378d-3ec9-4bf9-a605-29aaff2c8af1, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.920000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.670000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/ac002844-04a4-4fac-80b6-9c5ed1bafa46 (127.0.0.1) 1.840000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 95b7378d-3ec9-4bf9-a605-29aaff2c8af1 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 95b7378d-3ec9-4bf9-a605-29aaff2c8af1 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/95b7378d-3ec9-4bf9-a605-29aaff2c8af1 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/95b7378d-3ec9-4bf9-a605-29aaff2c8af1', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 285s yield maybe_future(km.shutdown_kernel(kernel_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/95b7378d-3ec9-4bf9-a605-29aaff2c8af1 (127.0.0.1) 10.040000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 285s from glob import _Globber, _no_recurse_symlinks 285s File "/usr/lib/python3.13/glob.py", line 5, in 285s import re 285s File "/usr/lib/python3.13/re/__init__.py", line 143, in 285s @enum._simple_enum(enum.IntFlag, boundary=enum.KEEP) 285s ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/enum.py", line 1844, in convert_class 285s contained._add_alias_(name) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.13/enum.py", line 1221, in _add_alias_ 285s self.__class__._add_member_(name, self) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/enum.py", line 1059, in _add_member_ 285s def _add_member_(cls, name, member): 285s 285s KeyboardInterrupt 285s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 285s 285s self = 285s 285s def test_kernel_handler(self): 285s # GET kernel with given id 285s kid = self.kern_api.start().json()['id'] 285s r = self.kern_api.get(kid) 285s kern1 = r.json() 285s self.assertEqual(r.status_code, 200) 285s assert isinstance(kern1, dict) 285s self.assertIn('id', kern1) 285s self.assertEqual(kern1['id'], kid) 285s 285s # Request a bad kernel id and check that a JSON 285s # message is returned! 285s bad_id = '111-111-111-111-111' 285s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 285s self.kern_api.get(bad_id) 285s 285s # DELETE kernel with id 285s > r = self.kern_api.shutdown(kid) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/6b926f34-2f0b-46cf-9699-e1ed19f96d7e 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 285s from glob import _Globber, _no_recurse_symlinks 285s File "/usr/lib/python3.13/glob.py", line 5, in 285s import re 285s File "/usr/lib/python3.13/re/__init__.py", line 126, in 285s from . import _compiler, _parser 285s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 285s from . import _parser 285s File "/usr/lib/python3.13/re/_parser.py", line 15, in 285s from ._constants import * 285s File "/usr/lib/python3.13/re/_constants.py", line 23, in 285s class PatternError(Exception): 285s ...<29 lines>... 285s super().__init__(msg) 285s KeyboardInterrupt 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcc0grr35/runtime/kernel-6b926f34-2f0b-46cf-9699-e1ed19f96d7e.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54407 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50419 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 6b926f34-2f0b-46cf-9699-e1ed19f96d7e, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.550000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/6b926f34-2f0b-46cf-9699-e1ed19f96d7e (127.0.0.1) 3.120000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 285s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 285s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 1.910000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 6b926f34-2f0b-46cf-9699-e1ed19f96d7e 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6b926f34-2f0b-46cf-9699-e1ed19f96d7e 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/6b926f34-2f0b-46cf-9699-e1ed19f96d7e (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/6b926f34-2f0b-46cf-9699-e1ed19f96d7e', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 285s yield maybe_future(km.shutdown_kernel(kernel_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/6b926f34-2f0b-46cf-9699-e1ed19f96d7e (127.0.0.1) 9.890000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.830000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 95b7378d-3ec9-4bf9-a605-29aaff2c8af1 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 95b7378d-3ec9-4bf9-a605-29aaff2c8af1 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/95b7378d-3ec9-4bf9-a605-29aaff2c8af1 (127.0.0.1) 1.810000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 6b926f34-2f0b-46cf-9699-e1ed19f96d7e 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6b926f34-2f0b-46cf-9699-e1ed19f96d7e 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/6b926f34-2f0b-46cf-9699-e1ed19f96d7e (127.0.0.1) 2.950000ms 285s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 285s 285s self = 285s 285s def test_main_kernel_handler(self): 285s # POST request 285s r = self.kern_api.start() 285s kern1 = r.json() 285s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 285s self.assertEqual(r.status_code, 201) 285s self.assertIsInstance(kern1, dict) 285s 285s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 285s expected_csp = '; '.join([ 285s "frame-ancestors 'self'", 285s 'report-uri ' + report_uri, 285s "default-src 'none'" 285s ]) 285s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 285s 285s # GET request 285s r = self.kern_api.list() 285s self.assertEqual(r.status_code, 200) 285s assert isinstance(r.json(), list) 285s self.assertEqual(r.json()[0]['id'], kern1['id']) 285s self.assertEqual(r.json()[0]['name'], kern1['name']) 285s 285s # create another kernel and check that they both are added to the 285s # list of kernels from a GET request 285s kern2 = self.kern_api.start().json() 285s assert isinstance(kern2, dict) 285s r = self.kern_api.list() 285s kernels = r.json() 285s self.assertEqual(r.status_code, 200) 285s assert isinstance(kernels, list) 285s self.assertEqual(len(kernels), 2) 285s 285s # Interrupt a kernel 285s r = self.kern_api.interrupt(kern2['id']) 285s self.assertEqual(r.status_code, 204) 285s 285s # Restart a kernel 285s > r = self.kern_api.restart(kern2['id']) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 285s return self._req('POST', url_path_join(id, 'restart')) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/806b518c-c2d3-4334-9952-79994adb2d6a/restart 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s in_globals, None, 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 285s import functools 285s File "/usr/lib/python3.13/functools.py", line 18, in 285s from collections import namedtuple 285s File "", line 1357, in _find_and_load 285s File "", line 421, in __exit__ 285s File "", line 378, in release 285s KeyboardInterrupt 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 285s import jupyter_client 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcc0grr35/runtime/kernel-95936a5d-6d42-4588-b741-c9f6569567c7.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53851 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47813 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 95936a5d-6d42-4588-b741-c9f6569567c7, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.610000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.730000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcc0grr35/runtime/kernel-806b518c-c2d3-4334-9952-79994adb2d6a.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56899 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36401 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 806b518c-c2d3-4334-9952-79994adb2d6a, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.710000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.640000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 806b518c-c2d3-4334-9952-79994adb2d6a 285s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/806b518c-c2d3-4334-9952-79994adb2d6a/interrupt (127.0.0.1) 2.010000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 285s yield maybe_future(km.restart_kernel(kernel_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 285s result = coro.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 285s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 285s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 285s yield self # This tells Task to wait for completion. 285s ^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 285s await ensure_async(kernel.restart_kernel(now=now)) 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 285s await self._async_shutdown_kernel(now=now, restart=True) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/806b518c-c2d3-4334-9952-79994adb2d6a/restart (127.0.0.1) 6.030000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.590000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 95936a5d-6d42-4588-b741-c9f6569567c7 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 95936a5d-6d42-4588-b741-c9f6569567c7 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/95936a5d-6d42-4588-b741-c9f6569567c7 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/95936a5d-6d42-4588-b741-c9f6569567c7', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 285s yield maybe_future(km.shutdown_kernel(kernel_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/95936a5d-6d42-4588-b741-c9f6569567c7 (127.0.0.1) 9.570000ms referer=None 285s ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 285s 285s self = 285s 285s def test_no_kernels(self): 285s """Make sure there are no kernels running at the start""" 285s kernels = self.kern_api.list().json() 285s > self.assertEqual(kernels, []) 285s E AssertionError: Lists differ: [{'id': '95936a5d-6d42-4588-b741-c9f656956[281 chars]: 0}] != [] 285s E 285s E First list contains 2 additional elements. 285s E First extra element 0: 285s E {'id': '95936a5d-6d42-4588-b741-c9f6569567c7', 'name': 'python3', 'last_activity': '2026-01-24T03:33:17.837694Z', 'execution_state': 'starting', 'connections': 0} 285s E 285s E + [] 285s E - [{'connections': 0, 285s E - 'execution_state': 'starting', 285s E - 'id': '95936a5d-6d42-4588-b741-c9f6569567c7', 285s E - 'last_activity': '2026-01-24T03:33:17.837694Z', 285s E - 'name': 'python3'}, 285s E - {'connections': 0, 285s E - 'execution_state': 'starting', 285s E - 'id': '806b518c-c2d3-4334-9952-79994adb2d6a', 285s E - 'last_activity': '2026-01-24T03:33:17.868890Z', 285s E - 'name': 'python3'}] 285s 285s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.830000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.710000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 95936a5d-6d42-4588-b741-c9f6569567c7 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 95936a5d-6d42-4588-b741-c9f6569567c7 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/95936a5d-6d42-4588-b741-c9f6569567c7 (127.0.0.1) 1.820000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 806b518c-c2d3-4334-9952-79994adb2d6a 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 806b518c-c2d3-4334-9952-79994adb2d6a 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/806b518c-c2d3-4334-9952-79994adb2d6a (127.0.0.1) 3.310000ms 285s ---------------------------- Captured log teardown ----------------------------- 285s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 95936a5d-6d42-4588-b741-c9f6569567c7 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 95b7378d-3ec9-4bf9-a605-29aaff2c8af1 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ac002844-04a4-4fac-80b6-9c5ed1bafa46 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6b926f34-2f0b-46cf-9699-e1ed19f96d7e 285s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 285s __________________________ SessionAPITest.test_create __________________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/b5cb75f4-6cd6-4327-89d4-40bec605d626 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log setup ------------------------------ 285s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp0ui80b_a/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp0ui80b_a/etc/jupyter'] for config files 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp0ui80b_a/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp0ui80b_a/config 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp0ui80b_a/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp0ui80b_a/config 285s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp0ui80b_a/notebooks 285s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 285s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 285s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 285s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 285s WARNING NotebookApp:handlers.py:612 Forbidden 285s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.510000ms referer=None 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.420000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-475c3454-7979-4bc2-bdc3-6ea3760114e3.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47121 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36653 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 475c3454-7979-4bc2-bdc3-6ea3760114e3, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 28.630000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.120000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/b5cb75f4-6cd6-4327-89d4-40bec605d626 (127.0.0.1) 3.310000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.970000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 475c3454-7979-4bc2-bdc3-6ea3760114e3 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 475c3454-7979-4bc2-bdc3-6ea3760114e3 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/b5cb75f4-6cd6-4327-89d4-40bec605d626 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b5cb75f4-6cd6-4327-89d4-40bec605d626', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/b5cb75f4-6cd6-4327-89d4-40bec605d626 (127.0.0.1) 15.110000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 285s from subprocess import PIPE, Popen 285s File "/usr/lib/python3.13/subprocess.py", line 46, in 285s import locale 285s File "/usr/lib/python3.13/locale.py", line 180, in 285s _percent_re = re.compile(r'%(?:\((?P.*?)\))?' 285s r'(?P[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]') 285s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 285s return _compile(pattern, flags) 285s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 285s p = _compiler.compile(pattern, flags) 285s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 285s code = _code(p, flags) 285s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 285s _compile(code, p.data, flags) 285s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/re/_compiler.py", line 117, in _compile 285s _compile(code, av[2], flags) 285s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/re/_compiler.py", line 126, in _compile 285s _compile(code, p, _combine_flags(flags, add_flags, del_flags)) 285s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/re/_compiler.py", line 109, in _compile 285s _compile(code, av[2], flags) 285s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/re/_compiler.py", line 102, in _compile 285s emit(ANY) 285s ~~~~^^^^^ 285s KeyboardInterrupt 285s __________________ SessionAPITest.test_create_console_session __________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/24d4e53e-062c-4ad1-b507-7b57fe1a1c57 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-27fef6fb-013b-4407-9dff-6bbc813a3ad2.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56767 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47075 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 27fef6fb-013b-4407-9dff-6bbc813a3ad2, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 24.370000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.250000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 475c3454-7979-4bc2-bdc3-6ea3760114e3 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 475c3454-7979-4bc2-bdc3-6ea3760114e3 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b5cb75f4-6cd6-4327-89d4-40bec605d626 (127.0.0.1) 4.520000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 27fef6fb-013b-4407-9dff-6bbc813a3ad2 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 27fef6fb-013b-4407-9dff-6bbc813a3ad2 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/24d4e53e-062c-4ad1-b507-7b57fe1a1c57 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/24d4e53e-062c-4ad1-b507-7b57fe1a1c57', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/24d4e53e-062c-4ad1-b507-7b57fe1a1c57 (127.0.0.1) 12.890000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 285s from ._local import * 285s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 285s class PureWindowsPath(PurePath): 285s ...<7 lines>... 285s __slots__ = () 285s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 285s import ntpath 285s File "/usr/lib/python3.13/ntpath.py", line 861, in 285s from nt import _path_isdevdrive 285s File "", line 1360, in _find_and_load 285s File "", line 1322, in _find_and_load_unlocked 285s File "", line 1262, in _find_spec 285s File "", line 1556, in find_spec 285s File "", line 1530, in _get_spec 285s File "", line 1629, in find_spec 285s File "", line 152, in _path_stat 285s KeyboardInterrupt 285s ____________________ SessionAPITest.test_create_deprecated _____________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/6ac1bcea-8c6b-4605-b5bb-036e9c16b13a 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-752ca14d-d394-4cd8-94ad-9d41e6f9897b.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41767 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54773 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 752ca14d-d394-4cd8-94ad-9d41e6f9897b, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 25.940000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.890000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 27fef6fb-013b-4407-9dff-6bbc813a3ad2 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 27fef6fb-013b-4407-9dff-6bbc813a3ad2 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/24d4e53e-062c-4ad1-b507-7b57fe1a1c57 (127.0.0.1) 4.400000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 752ca14d-d394-4cd8-94ad-9d41e6f9897b 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 752ca14d-d394-4cd8-94ad-9d41e6f9897b 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/6ac1bcea-8c6b-4605-b5bb-036e9c16b13a (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/6ac1bcea-8c6b-4605-b5bb-036e9c16b13a', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/6ac1bcea-8c6b-4605-b5bb-036e9c16b13a (127.0.0.1) 13.190000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 285s from ._local import * 285s File "/usr/lib/python3.13/pathlib/_local.py", line 29, in 285s class _PathParents(Sequence): 285s ...<25 lines>... 285s return "<{}.parents>".format(type(self._path).__name__) 285s File "/usr/lib/python3.13/abc.py", line 106, in __new__ 285s cls = super().__new__(mcls, name, bases, namespace, **kwargs) 285s KeyboardInterrupt 285s ___________________ SessionAPITest.test_create_file_session ____________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/fc6a8006-37b2-486f-8d36-9829c4c71779 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-ff66d289-b389-4a0a-adf7-b1d38a679a20.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51191 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34795 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: ff66d289-b389-4a0a-adf7-b1d38a679a20, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 24.210000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.090000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 752ca14d-d394-4cd8-94ad-9d41e6f9897b 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 752ca14d-d394-4cd8-94ad-9d41e6f9897b 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/6ac1bcea-8c6b-4605-b5bb-036e9c16b13a (127.0.0.1) 3.120000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ff66d289-b389-4a0a-adf7-b1d38a679a20 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ff66d289-b389-4a0a-adf7-b1d38a679a20 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/fc6a8006-37b2-486f-8d36-9829c4c71779 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/fc6a8006-37b2-486f-8d36-9829c4c71779', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/fc6a8006-37b2-486f-8d36-9829c4c71779 (127.0.0.1) 12.790000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 285s from ._local import * 285s File "/usr/lib/python3.13/pathlib/_local.py", line 6, in 285s import warnings 285s File "/usr/lib/python3.13/warnings.py", line 207, in 285s class _OptionError(Exception): 285s """Exception used by option processing helpers.""" 285s pass 285s KeyboardInterrupt 285s __________________ SessionAPITest.test_create_with_kernel_id ___________________ 285s 285s self = 285s 285s def test_create_with_kernel_id(self): 285s # create a new kernel 285s r = self.request('POST', 'api/kernels') 285s r.raise_for_status() 285s kernel = r.json() 285s 285s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 285s self.assertEqual(resp.status_code, 201) 285s newsession = resp.json() 285s self.assertIn('id', newsession) 285s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 285s self.assertEqual(newsession['kernel']['id'], kernel['id']) 285s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 285s 285s sessions = self.sess_api.list().json() 285s > self.assertEqual(sessions, [newsession]) 285s E AssertionError: Lists differ: [{'id': 'fc6a8006-37b2-486f-8d36-9829c4c71779', 'p[553 chars]ne}}] != [{'id': '22242cd5-54e0-4b2a-9a47-281e32b74b5f', 'p[279 chars]ne}}] 285s E 285s E First differing element 0: 285s E {'id': 'fc6a8006-37b2-486f-8d36-9829c4c71779', 'p[218 chars]: 0}} 285s E {'id': '22242cd5-54e0-4b2a-9a47-281e32b74b5f', 'p[278 chars]one}} 285s E 285s E First list contains 1 additional elements. 285s E First extra element 1: 285s E {'id': '22242cd5-54e0-4b2a-9a47-281e32b74b5f', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '07deba05-4523-4e99-8510-934a1377b27b', 'name': 'python3', 'last_activity': '2026-01-24T03:33:28.898980Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 285s E 285s E Diff is 830 characters long. Set self.maxDiff to None to see it. 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-07deba05-4523-4e99-8510-934a1377b27b.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37797 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51229 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 07deba05-4523-4e99-8510-934a1377b27b, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.200000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.070000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.070000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.440000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ff66d289-b389-4a0a-adf7-b1d38a679a20 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ff66d289-b389-4a0a-adf7-b1d38a679a20 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/fc6a8006-37b2-486f-8d36-9829c4c71779 (127.0.0.1) 3.320000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 07deba05-4523-4e99-8510-934a1377b27b 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 07deba05-4523-4e99-8510-934a1377b27b 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/22242cd5-54e0-4b2a-9a47-281e32b74b5f (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/22242cd5-54e0-4b2a-9a47-281e32b74b5f', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/22242cd5-54e0-4b2a-9a47-281e32b74b5f (127.0.0.1) 13.460000ms referer=None 285s _____________________ SessionAPITest.test_modify_kernel_id _____________________ 285s 285s self = 285s 285s def test_modify_kernel_id(self): 285s before = self.sess_api.create('foo/nb1.ipynb').json() 285s sid = before['id'] 285s 285s # create a new kernel 285s r = self.request('POST', 'api/kernels') 285s r.raise_for_status() 285s kernel = r.json() 285s 285s # Attach our session to the existing kernel 285s > after = self.sess_api.modify_kernel_id(sid, kernel['id']).json() 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:250: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:82: in modify_kernel_id 285s return self._req('PATCH', id, body) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 285s from typing import TYPE_CHECKING, Any 285s File "/usr/lib/python3.13/typing.py", line 1726, in 285s class _CallableType(_SpecialGenericAlias, _root=True): 285s ...<29 lines>... 285s return self.copy_with(params) 285s File "/usr/lib/python3.13/typing.py", line 1745, in _CallableType 285s @_tp_cache 285s ^^^^^^^^^ 285s File "/usr/lib/python3.13/typing.py", line 436, in _tp_cache 285s return decorator(func) 285s File "/usr/lib/python3.13/typing.py", line 415, in decorator 285s def decorator(func): 285s 285s KeyboardInterrupt 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-a20a370e-bd67-4640-bc2d-4b41748d7fb7.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59271 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43845 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: a20a370e-bd67-4640-bc2d-4b41748d7fb7, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 24.090000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-3d075f23-b98e-475b-82bb-18ae71ec9266.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48759 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36709 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3d075f23-b98e-475b-82bb-18ae71ec9266, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.830000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a20a370e-bd67-4640-bc2d-4b41748d7fb7 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a20a370e-bd67-4640-bc2d-4b41748d7fb7 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception PATCH /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='PATCH', uri='/a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 154, in patch 285s km.shutdown_kernel(before['kernel']['id']) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 PATCH /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 12.820000ms referer=None 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.940000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3d075f23-b98e-475b-82bb-18ae71ec9266 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3d075f23-b98e-475b-82bb-18ae71ec9266 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 13.190000ms referer=None 285s ____________________ SessionAPITest.test_modify_kernel_name ____________________ 285s 285s self = 285s 285s def test_modify_kernel_name(self): 285s before = self.sess_api.create('foo/nb1.ipynb').json() 285s sid = before['id'] 285s 285s after = self.sess_api.modify_kernel_name(sid, before['kernel']['name']).json() 285s self.assertEqual(after['id'], sid) 285s self.assertEqual(after['path'], before['path']) 285s self.assertEqual(after['type'], before['type']) 285s self.assertNotEqual(after['kernel']['id'], before['kernel']['id']) 285s 285s # check kernel list, to be sure previous kernel was cleaned up 285s r = self.request('GET', 'api/kernels') 285s r.raise_for_status() 285s kernel_list = r.json() 285s after['kernel'].pop('last_activity') 285s [ k.pop('last_activity') for k in kernel_list ] 285s > self.assertEqual(kernel_list, [after['kernel']]) 285s E AssertionError: Lists differ: [{'id': 'a20a370e-bd67-4640-bc2d-4b41748d7fb7', 'n[177 chars]: 0}] != [{'id': '220c3488-f0e7-4c1a-9e2c-2350df75953b', 'n[61 chars]: 0}] 285s E 285s E First differing element 0: 285s E {'id': 'a20a370e-bd67-4640-bc2d-4b41748d7fb7', 'n[60 chars]': 0} 285s E {'id': '220c3488-f0e7-4c1a-9e2c-2350df75953b', 'n[60 chars]': 0} 285s E 285s E First list contains 1 additional elements. 285s E First extra element 1: 285s E {'id': '220c3488-f0e7-4c1a-9e2c-2350df75953b', 'name': 'python3', 'execution_state': 'starting', 'connections': 0} 285s E 285s E [{'connections': 0, 285s E - 'execution_state': 'starting', 285s E - 'id': 'a20a370e-bd67-4640-bc2d-4b41748d7fb7', 285s E - 'name': 'python3'}, 285s E - {'connections': 0, 285s E 'execution_state': 'starting', 285s E 'id': '220c3488-f0e7-4c1a-9e2c-2350df75953b', 285s E 'name': 'python3'}] 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:238: AssertionError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.160000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-220c3488-f0e7-4c1a-9e2c-2350df75953b.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39739 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50541 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 220c3488-f0e7-4c1a-9e2c-2350df75953b, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3d075f23-b98e-475b-82bb-18ae71ec9266 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3d075f23-b98e-475b-82bb-18ae71ec9266 285s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 26.100000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 4.590000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.000000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 220c3488-f0e7-4c1a-9e2c-2350df75953b 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 220c3488-f0e7-4c1a-9e2c-2350df75953b 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f65a9ee9-47b4-4dfa-8710-dbe048b63a16 (127.0.0.1) 13.160000ms referer=None 285s __________________ SessionAPITest.test_modify_path_deprecated __________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/030647c8-373f-457a-92f1-51ad9fa984a0 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-abde58a5-1ad9-43e0-9e19-f2600c0e63fe.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48265 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47263 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: abde58a5-1ad9-43e0-9e19-f2600c0e63fe, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 23.850000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s WARNING NotebookApp:handlers.py:124 Sessions API changed, see updated swagger docs 285s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/030647c8-373f-457a-92f1-51ad9fa984a0 (127.0.0.1) 2.430000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.820000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for abde58a5-1ad9-43e0-9e19-f2600c0e63fe 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: abde58a5-1ad9-43e0-9e19-f2600c0e63fe 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/030647c8-373f-457a-92f1-51ad9fa984a0 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/030647c8-373f-457a-92f1-51ad9fa984a0', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/030647c8-373f-457a-92f1-51ad9fa984a0 (127.0.0.1) 13.510000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 285s from ._local import * 285s File "/usr/lib/python3.13/pathlib/_local.py", line 6, in 285s import warnings 285s File "", line 1360, in _find_and_load 285s File "", line 1331, in _find_and_load_unlocked 285s File "", line 935, in _load_unlocked 285s File "", line 1019, in exec_module 285s File "", line 1152, in get_code 285s File "", line 781, in _compile_bytecode 285s KeyboardInterrupt 285s _______________________ SessionAPITest.test_modify_type ________________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/22fda416-2c96-4592-b425-b52e55e4c7de 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0ui80b_a/runtime/kernel-9de4e7db-a863-4f16-ae93-cbc0781a042c.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53485 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33637 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9de4e7db-a863-4f16-ae93-cbc0781a042c, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0ui80b_a/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 26.060000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/22fda416-2c96-4592-b425-b52e55e4c7de (127.0.0.1) 2.210000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.830000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for abde58a5-1ad9-43e0-9e19-f2600c0e63fe 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: abde58a5-1ad9-43e0-9e19-f2600c0e63fe 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/030647c8-373f-457a-92f1-51ad9fa984a0 (127.0.0.1) 3.160000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9de4e7db-a863-4f16-ae93-cbc0781a042c 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9de4e7db-a863-4f16-ae93-cbc0781a042c 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/22fda416-2c96-4592-b425-b52e55e4c7de (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/22fda416-2c96-4592-b425-b52e55e4c7de', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 285s yielded = self.gen.send(value) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 285s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 285s stopper = ensure_async(km.shutdown_kernel(now, restart)) 285s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 285s return _runner_map[name].run(inner) 285s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 285s return fut.result(None) 285s ~~~~~~~~~~^^^^^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 285s return self.__get_result() 285s ~~~~~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 285s raise self._exception 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/22fda416-2c96-4592-b425-b52e55e4c7de (127.0.0.1) 12.710000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 285s from ipykernel import kernelapp as app 285s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 285s from .connect import * # noqa: F403 285s ^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 285s from subprocess import PIPE, Popen 285s File "/usr/lib/python3.13/subprocess.py", line 46, in 285s import locale 285s File "/usr/lib/python3.13/locale.py", line 180, in 285s _percent_re = re.compile(r'%(?:\((?P.*?)\))?' 285s r'(?P[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]') 285s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 285s return _compile(pattern, flags) 285s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 285s p = _compiler.compile(pattern, flags) 285s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 285s code = _code(p, flags) 285s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 285s _compile(code, p.data, flags) 285s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/re/_compiler.py", line 117, in _compile 285s _compile(code, av[2], flags) 285s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/re/_compiler.py", line 126, in _compile 285s _compile(code, p, _combine_flags(flags, add_flags, del_flags)) 285s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/re/_compiler.py", line 109, in _compile 285s _compile(code, av[2], flags) 285s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3.13/re/_compiler.py", line 102, in _compile 285s emit(ANY) 285s ~~~~^^^^^ 285s KeyboardInterrupt 285s ---------------------------- Captured log teardown ----------------------------- 285s INFO NotebookApp:notebookapp.py:2164 Shutting down 2 kernels 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9de4e7db-a863-4f16-ae93-cbc0781a042c 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a20a370e-bd67-4640-bc2d-4b41748d7fb7 285s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 285s _______________________ AsyncSessionAPITest.test_create ________________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/1bd3c8cb-76b4-4185-bdfd-047acbc7e139 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log setup ------------------------------ 285s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpbpu6sf4n/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpbpu6sf4n/etc/jupyter'] for config files 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpbpu6sf4n/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpbpu6sf4n/config 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpbpu6sf4n/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 285s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpbpu6sf4n/config 285s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpbpu6sf4n/notebooks 285s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 285s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 285s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 285s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 285s WARNING NotebookApp:handlers.py:612 Forbidden 285s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.180000ms referer=None 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.260000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-53971750-ea3f-4ddd-80ca-6ca4c8a88532.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37997 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44779 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 53971750-ea3f-4ddd-80ca-6ca4c8a88532, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.430000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.610000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/1bd3c8cb-76b4-4185-bdfd-047acbc7e139 (127.0.0.1) 1.640000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.580000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 53971750-ea3f-4ddd-80ca-6ca4c8a88532 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 53971750-ea3f-4ddd-80ca-6ca4c8a88532 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/1bd3c8cb-76b4-4185-bdfd-047acbc7e139 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/1bd3c8cb-76b4-4185-bdfd-047acbc7e139', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/1bd3c8cb-76b4-4185-bdfd-047acbc7e139 (127.0.0.1) 10.340000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 285s from glob import _Globber, _no_recurse_symlinks 285s File "/usr/lib/python3.13/glob.py", line 6, in 285s import fnmatch 285s File "", line 1360, in _find_and_load 285s File "", line 1322, in _find_and_load_unlocked 285s File "", line 1262, in _find_spec 285s File "/usr/lib/python3/dist-packages/_distutils_hack/__init__.py", line 107, in find_spec 285s method_name = 'spec_for_{fullname}'.format(**locals()) 285s KeyboardInterrupt 285s _______________ AsyncSessionAPITest.test_create_console_session ________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/9daf380a-5dcb-48c5-b060-491dbc0f32e1 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-4372cfcb-5eab-43ab-a671-349142110141.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56149 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33247 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4372cfcb-5eab-43ab-a671-349142110141, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 20.420000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.800000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 53971750-ea3f-4ddd-80ca-6ca4c8a88532 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 53971750-ea3f-4ddd-80ca-6ca4c8a88532 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/1bd3c8cb-76b4-4185-bdfd-047acbc7e139 (127.0.0.1) 2.210000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4372cfcb-5eab-43ab-a671-349142110141 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4372cfcb-5eab-43ab-a671-349142110141 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/9daf380a-5dcb-48c5-b060-491dbc0f32e1 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/9daf380a-5dcb-48c5-b060-491dbc0f32e1', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/9daf380a-5dcb-48c5-b060-491dbc0f32e1 (127.0.0.1) 10.710000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 285s from glob import _Globber, _no_recurse_symlinks 285s File "/usr/lib/python3.13/glob.py", line 5, in 285s import re 285s File "/usr/lib/python3.13/re/__init__.py", line 125, in 285s import enum 285s File "/usr/lib/python3.13/enum.py", line 1398, in 285s class FlagBoundary(StrEnum): 285s ...<10 lines>... 285s KEEP = auto() 285s File "/usr/lib/python3.13/enum.py", line 1406, in FlagBoundary 285s STRICT = auto() 285s ^^^^^^ 285s File "/usr/lib/python3.13/enum.py", line 424, in __setitem__ 285s elif isinstance(value, member): 285s ~~~~~~~~~~^^^^^^^^^^^^^^^ 285s KeyboardInterrupt 285s __________________ AsyncSessionAPITest.test_create_deprecated __________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/21b07bf3-709f-48ae-8c32-01bb3299785d 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-61908f30-c4c6-4bc9-942b-5573d9d1a24e.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52809 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34003 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 61908f30-c4c6-4bc9-942b-5573d9d1a24e, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 20.670000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.730000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4372cfcb-5eab-43ab-a671-349142110141 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4372cfcb-5eab-43ab-a671-349142110141 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/9daf380a-5dcb-48c5-b060-491dbc0f32e1 (127.0.0.1) 2.040000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 61908f30-c4c6-4bc9-942b-5573d9d1a24e 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 61908f30-c4c6-4bc9-942b-5573d9d1a24e 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/21b07bf3-709f-48ae-8c32-01bb3299785d (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/21b07bf3-709f-48ae-8c32-01bb3299785d', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/21b07bf3-709f-48ae-8c32-01bb3299785d (127.0.0.1) 10.410000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 285s from glob import _Globber, _no_recurse_symlinks 285s File "/usr/lib/python3.13/glob.py", line 5, in 285s import re 285s File "/usr/lib/python3.13/re/__init__.py", line 125, in 285s import enum 285s File "/usr/lib/python3.13/enum.py", line 339, in 285s class EnumDict(dict): 285s ...<134 lines>... 285s self[name] = value 285s File "/usr/lib/python3.13/enum.py", line 238, in __set_name__ 285s def __set_name__(self, ownerclass, name): 285s 285s KeyboardInterrupt 285s Error calling __set_name__ on 'property' instance 'member_names' in 'EnumDict' 285s _________________ AsyncSessionAPITest.test_create_file_session _________________ 285s 285s @self.addCleanup 285s def cleanup_sessions(): 285s for session in self.sess_api.list().json(): 285s > self.sess_api.delete(session['id']) 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 285s return self._req('DELETE', id) 285s ^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/e5f61c82-203b-4338-adf3-286b22f9dfe6 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-14de0cda-0940-44da-89c3-51b480d8fd18.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52931 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47907 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 14de0cda-0940-44da-89c3-51b480d8fd18, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 20.550000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.750000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 61908f30-c4c6-4bc9-942b-5573d9d1a24e 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 61908f30-c4c6-4bc9-942b-5573d9d1a24e 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/21b07bf3-709f-48ae-8c32-01bb3299785d (127.0.0.1) 2.060000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 14de0cda-0940-44da-89c3-51b480d8fd18 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 14de0cda-0940-44da-89c3-51b480d8fd18 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/e5f61c82-203b-4338-adf3-286b22f9dfe6 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/e5f61c82-203b-4338-adf3-286b22f9dfe6', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/e5f61c82-203b-4338-adf3-286b22f9dfe6 (127.0.0.1) 10.910000ms referer=None 285s --------------------------- Captured stderr teardown --------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 285s from ._abc import * 285s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 285s from glob import _Globber, _no_recurse_symlinks 285s File "/usr/lib/python3.13/glob.py", line 5, in 285s import re 285s File "/usr/lib/python3.13/re/__init__.py", line 125, in 285s import enum 285s File "/usr/lib/python3.13/enum.py", line 339, in 285s class EnumDict(dict): 285s ...<134 lines>... 285s self[name] = value 285s File "/usr/lib/python3.13/enum.py", line 238, in __set_name__ 285s def __set_name__(self, ownerclass, name): 285s 285s KeyboardInterrupt 285s Error calling __set_name__ on 'property' instance 'member_names' in 'EnumDict' 285s ________________ AsyncSessionAPITest.test_create_with_kernel_id ________________ 285s 285s self = 285s 285s def test_create_with_kernel_id(self): 285s # create a new kernel 285s r = self.request('POST', 'api/kernels') 285s r.raise_for_status() 285s kernel = r.json() 285s 285s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 285s self.assertEqual(resp.status_code, 201) 285s newsession = resp.json() 285s self.assertIn('id', newsession) 285s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 285s self.assertEqual(newsession['kernel']['id'], kernel['id']) 285s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 285s 285s sessions = self.sess_api.list().json() 285s > self.assertEqual(sessions, [newsession]) 285s E AssertionError: Lists differ: [{'id': 'e5f61c82-203b-4338-adf3-286b22f9dfe6', 'p[553 chars]ne}}] != [{'id': '9a933bca-77e2-48c0-a454-3ee26a14ba53', 'p[279 chars]ne}}] 285s E 285s E First differing element 0: 285s E {'id': 'e5f61c82-203b-4338-adf3-286b22f9dfe6', 'p[218 chars]: 0}} 285s E {'id': '9a933bca-77e2-48c0-a454-3ee26a14ba53', 'p[278 chars]one}} 285s E 285s E First list contains 1 additional elements. 285s E First extra element 1: 285s E {'id': '9a933bca-77e2-48c0-a454-3ee26a14ba53', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '9e4fad5b-b9f1-4abe-8487-56467a90bd62', 'name': 'python3', 'last_activity': '2026-01-24T03:33:30.237990Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 285s E 285s E Diff is 830 characters long. Set self.maxDiff to None to see it. 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 285s ------------------------------ Captured log call ------------------------------- 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 285s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-9e4fad5b-b9f1-4abe-8487-56467a90bd62.json'] 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46513 285s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52557 285s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9e4fad5b-b9f1-4abe-8487-56467a90bd62, name: python3 285s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.460000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.790000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.760000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.710000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 14de0cda-0940-44da-89c3-51b480d8fd18 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 14de0cda-0940-44da-89c3-51b480d8fd18 285s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/e5f61c82-203b-4338-adf3-286b22f9dfe6 (127.0.0.1) 1.950000ms 285s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 285s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9e4fad5b-b9f1-4abe-8487-56467a90bd62 285s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9e4fad5b-b9f1-4abe-8487-56467a90bd62 285s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/9a933bca-77e2-48c0-a454-3ee26a14ba53 (127.0.0.1) 285s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/9a933bca-77e2-48c0-a454-3ee26a14ba53', version='HTTP/1.1', remote_ip='127.0.0.1') 285s Traceback (most recent call last): 285s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 285s result = await result 285s ^^^^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 285s future.result() 285s ~~~~~~~~~~~~~^^ 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 285s yield maybe_future(sm.delete_session(session_id)) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 285s yielded = self.gen.throw(exc) 285s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 285s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 285s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 285s value = future.result() 285s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 285s raise self._exception.with_traceback(self._exception_tb) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 285s result = coro.send(None) 285s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 285s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 285s raise km.ready.exception() # type: ignore[misc] 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 285s await kernel_awaitable 285s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 285s result = await obj 285s ^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 285s raise e 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 285s out = await method(self, *args, **kwargs) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 285s await self._async_finish_shutdown(restart=restart) 285s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 285s await asyncio.wait_for( 285s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 285s ) 285s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 285s async with timeouts.timeout(timeout): 285s ~~~~~~~~~~~~~~~~^^^^^^^^^ 285s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 285s raise RuntimeError("Timeout should be used inside a task") 285s RuntimeError: Timeout should be used inside a task 285s WARNING NotebookApp:handlers.py:612 Unhandled error 285s ERROR NotebookApp:log.py:55 { 285s "Host": "localhost:12341", 285s "Accept": "*/*", 285s "User-Agent": "python-requests/2.32.5" 285s } 285s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/9a933bca-77e2-48c0-a454-3ee26a14ba53 (127.0.0.1) 10.520000ms referer=None 285s __________________ AsyncSessionAPITest.test_modify_kernel_id ___________________ 285s 285s self = 285s 285s def test_modify_kernel_id(self): 285s before = self.sess_api.create('foo/nb1.ipynb').json() 285s sid = before['id'] 285s 285s # create a new kernel 285s r = self.request('POST', 'api/kernels') 285s r.raise_for_status() 285s kernel = r.json() 285s 285s # Attach our session to the existing kernel 285s > after = self.sess_api.modify_kernel_id(sid, kernel['id']).json() 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:250: 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:82: in modify_kernel_id 285s return self._req('PATCH', id, body) 285s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 285s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 285s response.raise_for_status() 285s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 285s 285s self = 285s 285s def raise_for_status(self): 285s """Raises :class:`HTTPError`, if one occurred.""" 285s 285s http_error_msg = "" 285s if isinstance(self.reason, bytes): 285s # We attempt to decode utf-8 first because some servers 285s # choose to localize their reason strings. If the string 285s # isn't utf-8, we fall back to iso-8859-1 for all other 285s # encodings. (See PR #3538) 285s try: 285s reason = self.reason.decode("utf-8") 285s except UnicodeDecodeError: 285s reason = self.reason.decode("iso-8859-1") 285s else: 285s reason = self.reason 285s 285s if 400 <= self.status_code < 500: 285s http_error_msg = ( 285s f"{self.status_code} Client Error: {reason} for url: {self.url}" 285s ) 285s 285s elif 500 <= self.status_code < 600: 285s http_error_msg = ( 285s f"{self.status_code} Server Error: {reason} for url: {self.url}" 285s ) 285s 285s if http_error_msg: 285s > raise HTTPError(http_error_msg, response=self) 285s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 285s 285s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 285s ----------------------------- Captured stderr call ----------------------------- 285s Traceback (most recent call last): 285s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 285s return _run_code(code, main_globals, None, 285s "__main__", mod_spec) 285s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 285s exec(code, run_globals) 285s ~~~~^^^^^^^^^^^^^^^^^^^ 285s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 285s from pathlib import Path 285s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 285s from ._local import * 285s File "", line 1360, in _find_and_load 285s File "", line 1339, in _find_and_load_unlocked 285s KeyboardInterrupt 285s Traceback (most recent call last): 285s ------------------------------ Captured log call ------------------------------- 285s /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 285s gc.collect() 285s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 286s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-a4634f00-8523-48bf-9be4-9c38d564a05a.json'] 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41147 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45875 286s INFO NotebookApp:kernelmanager.py:179 Kernel started: a4634f00-8523-48bf-9be4-9c38d564a05a, name: python3 286s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 286s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 20.550000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 286s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-e5fc6bd6-0dfd-4600-922b-f827699855cd.json'] 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55381 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59791 286s INFO NotebookApp:kernelmanager.py:179 Kernel started: e5fc6bd6-0dfd-4600-922b-f827699855cd, name: python3 286s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 286s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.740000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a4634f00-8523-48bf-9be4-9c38d564a05a 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a4634f00-8523-48bf-9be4-9c38d564a05a 286s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:web.py:1945 Uncaught exception PATCH /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 286s HTTPServerRequest(protocol='http', host='localhost:12341', method='PATCH', uri='/a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222', version='HTTP/1.1', remote_ip='127.0.0.1') 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 286s result = await result 286s ^^^^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 286s future.result() 286s ~~~~~~~~~~~~~^^ 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 286s yielded = self.gen.throw(exc) 286s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 153, in patch 286s yield maybe_future( 286s km.shutdown_kernel(before['kernel']['id']) 286s ) 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 286s value = future.result() 286s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 286s raise self._exception.with_traceback(self._exception_tb) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 286s result = coro.send(None) 286s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 286s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 286s raise km.ready.exception() # type: ignore[misc] 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s WARNING NotebookApp:handlers.py:612 Unhandled error 286s ERROR NotebookApp:log.py:55 { 286s "Host": "localhost:12341", 286s "Accept": "*/*", 286s "User-Agent": "python-requests/2.32.5" 286s } 286s ERROR NotebookApp:log.py:59 500 PATCH /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 10.230000ms referer=None 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.710000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e5fc6bd6-0dfd-4600-922b-f827699855cd 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e5fc6bd6-0dfd-4600-922b-f827699855cd 286s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 286s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222', version='HTTP/1.1', remote_ip='127.0.0.1') 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 286s result = await result 286s ^^^^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 286s future.result() 286s ~~~~~~~~~~~~~^^ 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 286s yielded = self.gen.throw(exc) 286s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 286s yield maybe_future(sm.delete_session(session_id)) 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 286s value = future.result() 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 286s yielded = self.gen.throw(exc) 286s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 286s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 286s value = future.result() 286s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 286s raise self._exception.with_traceback(self._exception_tb) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 286s result = coro.send(None) 286s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 286s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 286s raise km.ready.exception() # type: ignore[misc] 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s WARNING NotebookApp:handlers.py:612 Unhandled error 286s ERROR NotebookApp:log.py:55 { 286s "Host": "localhost:12341", 286s "Accept": "*/*", 286s "User-Agent": "python-requests/2.32.5" 286s } 286s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 10.440000ms referer=None 286s _________________ AsyncSessionAPITest.test_modify_kernel_name __________________ 286s 286s self = 286s 286s def test_modify_kernel_name(self): 286s before = self.sess_api.create('foo/nb1.ipynb').json() 286s sid = before['id'] 286s 286s after = self.sess_api.modify_kernel_name(sid, before['kernel']['name']).json() 286s self.assertEqual(after['id'], sid) 286s self.assertEqual(after['path'], before['path']) 286s self.assertEqual(after['type'], before['type']) 286s self.assertNotEqual(after['kernel']['id'], before['kernel']['id']) 286s 286s # check kernel list, to be sure previous kernel was cleaned up 286s r = self.request('GET', 'api/kernels') 286s r.raise_for_status() 286s kernel_list = r.json() 286s after['kernel'].pop('last_activity') 286s [ k.pop('last_activity') for k in kernel_list ] 286s > self.assertEqual(kernel_list, [after['kernel']]) 286s E AssertionError: Lists differ: [{'id': 'a4634f00-8523-48bf-9be4-9c38d564a05a', 'n[177 chars]: 0}] != [{'id': '8525a99d-8d9e-4b49-a5f5-62606d0373ac', 'n[61 chars]: 0}] 286s E 286s E First differing element 0: 286s E {'id': 'a4634f00-8523-48bf-9be4-9c38d564a05a', 'n[60 chars]': 0} 286s E {'id': '8525a99d-8d9e-4b49-a5f5-62606d0373ac', 'n[60 chars]': 0} 286s E 286s E First list contains 1 additional elements. 286s E First extra element 1: 286s E {'id': '8525a99d-8d9e-4b49-a5f5-62606d0373ac', 'name': 'python3', 'execution_state': 'starting', 'connections': 0} 286s E 286s E [{'connections': 0, 286s E - 'execution_state': 'starting', 286s E - 'id': 'a4634f00-8523-48bf-9be4-9c38d564a05a', 286s E - 'name': 'python3'}, 286s E - {'connections': 0, 286s E 'execution_state': 'starting', 286s E 'id': '8525a99d-8d9e-4b49-a5f5-62606d0373ac', 286s E 'name': 'python3'}] 286s 286s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:238: AssertionError 286s ------------------------------ Captured log call ------------------------------- 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.960000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 286s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-8525a99d-8d9e-4b49-a5f5-62606d0373ac.json'] 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53959 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45519 286s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8525a99d-8d9e-4b49-a5f5-62606d0373ac, name: python3 286s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 286s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e5fc6bd6-0dfd-4600-922b-f827699855cd 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e5fc6bd6-0dfd-4600-922b-f827699855cd 286s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 20.620000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.650000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.670000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8525a99d-8d9e-4b49-a5f5-62606d0373ac 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8525a99d-8d9e-4b49-a5f5-62606d0373ac 286s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 286s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222', version='HTTP/1.1', remote_ip='127.0.0.1') 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 286s result = await result 286s ^^^^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 286s future.result() 286s ~~~~~~~~~~~~~^^ 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 286s yielded = self.gen.throw(exc) 286s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 286s yield maybe_future(sm.delete_session(session_id)) 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 286s value = future.result() 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 286s yielded = self.gen.throw(exc) 286s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 286s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 286s value = future.result() 286s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 286s raise self._exception.with_traceback(self._exception_tb) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 286s result = coro.send(None) 286s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 286s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 286s raise km.ready.exception() # type: ignore[misc] 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s WARNING NotebookApp:handlers.py:612 Unhandled error 286s ERROR NotebookApp:log.py:55 { 286s "Host": "localhost:12341", 286s "Accept": "*/*", 286s "User-Agent": "python-requests/2.32.5" 286s } 286s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/d284d837-23ed-4a0d-9eae-64575edb9222 (127.0.0.1) 10.340000ms referer=None 286s _______________ AsyncSessionAPITest.test_modify_path_deprecated ________________ 286s 286s @self.addCleanup 286s def cleanup_sessions(): 286s for session in self.sess_api.list().json(): 286s > self.sess_api.delete(session['id']) 286s 286s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 286s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 286s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 286s return self._req('DELETE', id) 286s ^^^^^^^^^^^^^^^^^^^^^^^ 286s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 286s response.raise_for_status() 286s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 286s 286s self = 286s 286s def raise_for_status(self): 286s """Raises :class:`HTTPError`, if one occurred.""" 286s 286s http_error_msg = "" 286s if isinstance(self.reason, bytes): 286s # We attempt to decode utf-8 first because some servers 286s # choose to localize their reason strings. If the string 286s # isn't utf-8, we fall back to iso-8859-1 for all other 286s # encodings. (See PR #3538) 286s try: 286s reason = self.reason.decode("utf-8") 286s except UnicodeDecodeError: 286s reason = self.reason.decode("iso-8859-1") 286s else: 286s reason = self.reason 286s 286s if 400 <= self.status_code < 500: 286s http_error_msg = ( 286s f"{self.status_code} Client Error: {reason} for url: {self.url}" 286s ) 286s 286s elif 500 <= self.status_code < 600: 286s http_error_msg = ( 286s f"{self.status_code} Server Error: {reason} for url: {self.url}" 286s ) 286s 286s if http_error_msg: 286s > raise HTTPError(http_error_msg, response=self) 286s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/e248188e-c28a-4fb7-b172-28424629eed3 286s 286s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 286s ------------------------------ Captured log call ------------------------------- 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 286s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-dd09e44f-a255-4162-bd60-5c5eabecc0da.json'] 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50813 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48361 286s INFO NotebookApp:kernelmanager.py:179 Kernel started: dd09e44f-a255-4162-bd60-5c5eabecc0da, name: python3 286s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 286s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.150000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s WARNING NotebookApp:handlers.py:124 Sessions API changed, see updated swagger docs 286s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/e248188e-c28a-4fb7-b172-28424629eed3 (127.0.0.1) 2.770000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.690000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dd09e44f-a255-4162-bd60-5c5eabecc0da 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dd09e44f-a255-4162-bd60-5c5eabecc0da 286s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/e248188e-c28a-4fb7-b172-28424629eed3 (127.0.0.1) 286s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/e248188e-c28a-4fb7-b172-28424629eed3', version='HTTP/1.1', remote_ip='127.0.0.1') 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 286s result = await result 286s ^^^^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 286s future.result() 286s ~~~~~~~~~~~~~^^ 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 286s yielded = self.gen.throw(exc) 286s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 286s yield maybe_future(sm.delete_session(session_id)) 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 286s value = future.result() 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 286s yielded = self.gen.throw(exc) 286s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 286s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 286s value = future.result() 286s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 286s raise self._exception.with_traceback(self._exception_tb) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 286s result = coro.send(None) 286s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 286s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 286s raise km.ready.exception() # type: ignore[misc] 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s WARNING NotebookApp:handlers.py:612 Unhandled error 286s ERROR NotebookApp:log.py:55 { 286s "Host": "localhost:12341", 286s "Accept": "*/*", 286s "User-Agent": "python-requests/2.32.5" 286s } 286s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/e248188e-c28a-4fb7-b172-28424629eed3 (127.0.0.1) 10.910000ms referer=None 286s --------------------------- Captured stderr teardown --------------------------- 286s Traceback (most recent call last): 286s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 286s return _run_code(code, main_globals, None, 286s "__main__", mod_spec) 286s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 286s exec(code, run_globals) 286s ~~~~^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 286s from pathlib import Path 286s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 286s from ._abc import * 286s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 286s from glob import _Globber, _no_recurse_symlinks 286s File "/usr/lib/python3.13/glob.py", line 5, in 286s import re 286s File "/usr/lib/python3.13/re/__init__.py", line 125, in 286s import enum 286s File "/usr/lib/python3.13/enum.py", line 1932, in 286s @_simple_enum(StrEnum) 286s ~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.13/enum.py", line 1737, in _simple_enum 286s def _simple_enum(etype=Enum, *, boundary=None, use_args=None): 286s 286s KeyboardInterrupt 286s _____________________ AsyncSessionAPITest.test_modify_type _____________________ 286s 286s @self.addCleanup 286s def cleanup_sessions(): 286s for session in self.sess_api.list().json(): 286s > self.sess_api.delete(session['id']) 286s 286s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 286s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 286s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 286s return self._req('DELETE', id) 286s ^^^^^^^^^^^^^^^^^^^^^^^ 286s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 286s response.raise_for_status() 286s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 286s 286s self = 286s 286s def raise_for_status(self): 286s """Raises :class:`HTTPError`, if one occurred.""" 286s 286s http_error_msg = "" 286s if isinstance(self.reason, bytes): 286s # We attempt to decode utf-8 first because some servers 286s # choose to localize their reason strings. If the string 286s # isn't utf-8, we fall back to iso-8859-1 for all other 286s # encodings. (See PR #3538) 286s try: 286s reason = self.reason.decode("utf-8") 286s except UnicodeDecodeError: 286s reason = self.reason.decode("iso-8859-1") 286s else: 286s reason = self.reason 286s 286s if 400 <= self.status_code < 500: 286s http_error_msg = ( 286s f"{self.status_code} Client Error: {reason} for url: {self.url}" 286s ) 286s 286s elif 500 <= self.status_code < 600: 286s http_error_msg = ( 286s f"{self.status_code} Server Error: {reason} for url: {self.url}" 286s ) 286s 286s if http_error_msg: 286s > raise HTTPError(http_error_msg, response=self) 286s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/12f0c63c-84ca-4a00-ae8d-b751c773f920 286s 286s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 286s ----------------------------- Captured stderr call ----------------------------- 286s Traceback (most recent call last): 286s ------------------------------ Captured log call ------------------------------- 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 286s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpbpu6sf4n/runtime/kernel-4762ed5d-2e02-4228-9ff8-bc14ebb2722d.json'] 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50741 286s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35111 286s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4762ed5d-2e02-4228-9ff8-bc14ebb2722d, name: python3 286s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpbpu6sf4n/notebooks/foo'} 286s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 20.790000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/12f0c63c-84ca-4a00-ae8d-b751c773f920 (127.0.0.1) 2.410000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.720000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dd09e44f-a255-4162-bd60-5c5eabecc0da 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dd09e44f-a255-4162-bd60-5c5eabecc0da 286s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/e248188e-c28a-4fb7-b172-28424629eed3 (127.0.0.1) 2.080000ms 286s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 286s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4762ed5d-2e02-4228-9ff8-bc14ebb2722d 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4762ed5d-2e02-4228-9ff8-bc14ebb2722d 286s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/12f0c63c-84ca-4a00-ae8d-b751c773f920 (127.0.0.1) 286s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/12f0c63c-84ca-4a00-ae8d-b751c773f920', version='HTTP/1.1', remote_ip='127.0.0.1') 286s Traceback (most recent call last): 286s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 286s result = await result 286s ^^^^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 286s future.result() 286s ~~~~~~~~~~~~~^^ 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 286s yielded = self.gen.throw(exc) 286s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 286s yield maybe_future(sm.delete_session(session_id)) 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 286s value = future.result() 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 286s yielded = self.gen.throw(exc) 286s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 286s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 286s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 286s value = future.result() 286s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 286s raise self._exception.with_traceback(self._exception_tb) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 286s result = coro.send(None) 286s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 286s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 286s raise km.ready.exception() # type: ignore[misc] 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 286s await kernel_awaitable 286s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 286s result = await obj 286s ^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 286s raise e 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 286s out = await method(self, *args, **kwargs) 286s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 286s await self._async_finish_shutdown(restart=restart) 286s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 286s await asyncio.wait_for( 286s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 286s ) 286s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 286s async with timeouts.timeout(timeout): 286s ~~~~~~~~~~~~~~~~^^^^^^^^^ 286s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 286s raise RuntimeError("Timeout should be used inside a task") 286s RuntimeError: Timeout should be used inside a task 286s WARNING NotebookApp:handlers.py:612 Unhandled error 286s ERROR NotebookApp:log.py:55 { 286s "Host": "localhost:12341", 286s "Accept": "*/*", 286s "User-Agent": "python-requests/2.32.5" 286s } 286s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/12f0c63c-84ca-4a00-ae8d-b751c773f920 (127.0.0.1) 10.450000ms referer=None 286s --------------------------- Captured stderr teardown --------------------------- 286s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 286s return _run_code(code, main_globals, None, 286s "__main__", mod_spec) 286s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 286s exec(code, run_globals) 286s ~~~~^^^^^^^^^^^^^^^^^^^ 286s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 286s from pathlib import Path 286s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 286s from ._abc import * 286s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 286s from glob import _Globber, _no_recurse_symlinks 286s File "/usr/lib/python3.13/glob.py", line 5, in 286s import re 286s File "/usr/lib/python3.13/re/__init__.py", line 381, in 286s import copyreg 286s File "", line 1360, in _find_and_load 286s File "", line 1331, in _find_and_load_unlocked 286s File "", line 935, in _load_unlocked 286s File "", line 1019, in exec_module 286s File "", line 1109, in get_code 286s File "", line 1232, in path_stats 286s File "", line 152, in _path_stat 286s KeyboardInterrupt 286s ---------------------------- Captured log teardown ----------------------------- 286s INFO NotebookApp:notebookapp.py:2164 Shutting down 2 kernels 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e5fc6bd6-0dfd-4600-922b-f827699855cd 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8525a99d-8d9e-4b49-a5f5-62606d0373ac 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 53971750-ea3f-4ddd-80ca-6ca4c8a88532 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9e4fad5b-b9f1-4abe-8487-56467a90bd62 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4762ed5d-2e02-4228-9ff8-bc14ebb2722d 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a4634f00-8523-48bf-9be4-9c38d564a05a 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 14de0cda-0940-44da-89c3-51b480d8fd18 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4372cfcb-5eab-43ab-a671-349142110141 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 61908f30-c4c6-4bc9-942b-5573d9d1a24e 286s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dd09e44f-a255-4162-bd60-5c5eabecc0da 286s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 286s =============================== warnings summary =============================== 286s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 286s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 286s /usr/lib/python3/dist-packages/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. 286s return LooseVersion(v) >= LooseVersion(check) 286s 286s ../../../usr/lib/python3/dist-packages/notebook/_tz.py:29: 1 warning 286s auth/tests/test_login.py: 2 warnings 286s bundler/tests/test_bundler_api.py: 2 warnings 286s services/api/tests/test_api.py: 4 warnings 286s services/config/tests/test_config_api.py: 7 warnings 286s services/contents/tests/test_contents_api.py: 318 warnings 286s services/kernels/tests/test_kernels_api.py: 113 warnings 286s services/kernelspecs/tests/test_kernelspecs_api.py: 7 warnings 286s services/nbconvert/tests/test_nbconvert_api.py: 3 warnings 286s services/sessions/tests/test_sessionmanager.py: 9 warnings 286s services/sessions/tests/test_sessions_api.py: 128 warnings 286s terminal/tests/test_terminals_api.py: 50 warnings 286s tests/test_files.py: 2 warnings 286s tests/test_gateway.py: 21 warnings 286s tests/test_notebookapp.py: 8 warnings 286s tests/test_paths.py: 2 warnings 286s tree/tests/test_tree_handler.py: 2 warnings 286s /usr/lib/python3/dist-packages/notebook/_tz.py:29: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). 286s dt = unaware(*args, **kwargs) 286s 286s ../../../usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14 286s /usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.integration_tests - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 286s pytestmark = pytest.mark.integration_tests 286s 286s auth/tests/test_login.py: 3 warnings 286s bundler/tests/test_bundler_api.py: 3 warnings 286s services/api/tests/test_api.py: 3 warnings 286s services/config/tests/test_config_api.py: 3 warnings 286s services/contents/tests/test_contents_api.py: 6 warnings 286s services/kernels/tests/test_kernels_api.py: 12 warnings 286s services/kernelspecs/tests/test_kernelspecs_api.py: 3 warnings 286s services/nbconvert/tests/test_nbconvert_api.py: 3 warnings 286s services/sessions/tests/test_sessions_api.py: 6 warnings 286s terminal/tests/test_terminals_api.py: 6 warnings 286s tests/test_files.py: 3 warnings 286s tests/test_gateway.py: 3 warnings 286s tests/test_notebookapp.py: 11 warnings 286s tests/test_paths.py: 3 warnings 286s tree/tests/test_tree_handler.py: 3 warnings 286s /usr/lib/python3/dist-packages/nest_asyncio.py:71: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 286s policy = events.get_event_loop_policy() 286s 286s auth/tests/test_login.py: 8 warnings 286s bundler/tests/test_bundler_api.py: 8 warnings 286s services/api/tests/test_api.py: 8 warnings 286s services/config/tests/test_config_api.py: 8 warnings 286s services/contents/tests/test_contents_api.py: 16 warnings 286s services/kernels/tests/test_kernels_api.py: 43 warnings 286s services/kernelspecs/tests/test_kernelspecs_api.py: 8 warnings 286s services/nbconvert/tests/test_nbconvert_api.py: 8 warnings 286s services/sessions/tests/test_sessionmanager.py: 18 warnings 286s services/sessions/tests/test_sessions_api.py: 17 warnings 286s terminal/tests/test_terminals_api.py: 16 warnings 286s tests/test_files.py: 8 warnings 286s tests/test_gateway.py: 8 warnings 286s tests/test_notebookapp.py: 26 warnings 286s tests/test_paths.py: 8 warnings 286s tree/tests/test_tree_handler.py: 8 warnings 286s /usr/lib/python3/dist-packages/nest_asyncio.py:40: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 286s loop = events.get_event_loop_policy().get_event_loop() 286s 286s bundler/tests/test_bundler_api.py: 6 warnings 286s services/api/tests/test_api.py: 6 warnings 286s services/contents/tests/test_contents_api.py: 806 warnings 286s services/contents/tests/test_largefilemanager.py: 42 warnings 286s services/contents/tests/test_manager.py: 526 warnings 286s tests/test_files.py: 8 warnings 286s tree/tests/test_tree_handler.py: 6 warnings 286s /usr/lib/python3/dist-packages/notebook/_tz.py:29: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC). 286s dt = unaware(*args, **kwargs) 286s 286s services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 286s services/kernels/tests/test_kernels_api.py::KernelCullingTest::test_culling 286s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first 286s loop.make_current() 286s 286s services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs 286s services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs_bad 286s /usr/lib/python3/dist-packages/jupyter_client/kernelspec.py:302: UserWarning: Invalid kernelspec directory name (Kernel names can only contain ASCII letters and numbers and these separators: - . _ (hyphen, period, and underscore).): /tmp/tmpgs530p92/data/kernels/sample 2 286s d = self.find_kernel_specs() 286s 286s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal 286s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal_via_get 286s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal_via_get 286s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal_with_name 286s terminal/tests/test_terminals_api.py::TerminalAPITest::test_terminal_handler 286s terminal/tests/test_terminals_api.py::TerminalAPITest::test_terminal_root_handler 286s terminal/tests/test_terminals_api.py::TerminalAPITest::test_terminal_root_handler 286s terminal/tests/test_terminals_api.py::TerminalCullingTest::test_culling 286s /usr/lib/python3.14/pty.py:66: DeprecationWarning: This process (pid=2546) is multi-threaded, use of forkpty() may lead to deadlocks in the child. 286s pid, fd = os.forkpty() 286s 286s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal_via_get 286s /usr/lib/python3/dist-packages/jinja2/nodes.py:143: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 286s for name, arg in zip(self.fields, fields): 286s Enable tracemalloc to get traceback where the object was allocated. 286s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 286s 286s tests/test_gateway.py::TestGateway::test_gateway_kernel_lifecycle 286s tests/test_gateway.py::TestGateway::test_gateway_session_lifecycle 286s /usr/lib/python3/dist-packages/notebook/tests/test_gateway.py:34: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). 286s dt = datetime.utcnow().isoformat() + 'Z' 286s 286s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 286s =========================== short test summary info ============================ 286s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:86: Pandoc wasn't found. Skipping this test. 286s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:101: Pandoc wasn't found. Skipping this test. 286s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:109: Pandoc wasn't found. Skipping this test. 286s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:119: Pandoc wasn't found. Skipping this test. 286s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:128: Pandoc wasn't found. Skipping this test. 286s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:145: Pandoc wasn't found. Skipping this test. 286s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_contents_api.py:682: skip send2trash tests 286s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_contents_api.py:592: skip send2trash tests 286s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_contents_api.py:606: skip send2trash tests 286s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_contents_api.py:616: skip send2trash tests 286s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_manager.py:332: skip send2trash tests 286s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_manager.py:658: skip send2trash tests 286s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_manager.py:727: skip send2trash tests 286s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/tests/test_utils.py:83: run on windows only 286s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_default_kernel 286s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_kernel_handler 286s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 286s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_no_kernels 286s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 286s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_default_kernel 286s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_kernel_handler 286s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 286s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_no_kernels 286s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 286s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_console_session 286s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_deprecated 286s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_file_session 286s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 286s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 286s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 286s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_path_deprecated 286s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_type 286s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create 286s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_console_session 286s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_deprecated 286s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_file_session 286s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 286s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 286s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 286s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_path_deprecated 286s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_type 286s ERROR services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 286s ERROR services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 286s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 286s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 286s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 286s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 286s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 286s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 286s = 27 failed, 277 passed, 20 skipped, 6 deselected, 2384 warnings, 8 errors in 41.84s = 287s *** END OF RUN 1: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 287s *** STARTING RUN 2: python3.14 -m pytest --pyargs notebook -rfE --last-failed --last-failed-no-failures none --ignore=/usr/lib/python3/dist-packages/notebook/tests/selenium --deselect=services/kernels/tests/test_kernels_api.py::KernelAPITest::test_connections 292s ============================= test session starts ============================== 292s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 292s rootdir: /tmp/autopkgtest.CmXq4V/autopkgtest_tmp 292s plugins: typeguard-4.4.4 292s collected 330 items / 303 deselected / 27 selected 292s run-last-failure: rerun previous 27 failures 292s 295s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF [ 33%] 297s services/sessions/tests/test_sessions_api.py FFFFFEFF.FFFFFFEFF.F [100%] 297s 297s ==================================== ERRORS ==================================== 297s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 297s 297s self = 297s 297s def tearDown(self): 297s for k in self.kern_api.list().json(): 297s > self.kern_api.shutdown(k['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/4f9f39cc-88b8-44b3-9041-e2012ae1a5ac 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 3, in 297s import contextlib 297s File "/usr/lib/python3.13/contextlib.py", line 631, in 297s class AsyncExitStack(_BaseExitStack, AbstractAsyncContextManager): 297s File "/usr/lib/python3.13/abc.py", line 106, in __new__ 297s cls = super().__new__(mcls, name, bases, namespace, **kwargs) 297s KeyboardInterrupt 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp_85opmiz/runtime/kernel-4f9f39cc-88b8-44b3-9041-e2012ae1a5ac.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47379 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39737 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4f9f39cc-88b8-44b3-9041-e2012ae1a5ac, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.140000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.700000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp_85opmiz/runtime/kernel-8ee24557-6cb1-4fd1-9966-5071765a5119.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47269 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57983 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8ee24557-6cb1-4fd1-9966-5071765a5119, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.620000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.770000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 8ee24557-6cb1-4fd1-9966-5071765a5119 297s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/8ee24557-6cb1-4fd1-9966-5071765a5119/interrupt (127.0.0.1) 4.430000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 297s yield maybe_future(km.restart_kernel(kernel_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 297s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 297s await ensure_async(kernel.restart_kernel(now=now)) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 297s await self._async_shutdown_kernel(now=now, restart=True) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/8ee24557-6cb1-4fd1-9966-5071765a5119/restart (127.0.0.1) 9.980000ms referer=None 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.990000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4f9f39cc-88b8-44b3-9041-e2012ae1a5ac 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4f9f39cc-88b8-44b3-9041-e2012ae1a5ac 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/4f9f39cc-88b8-44b3-9041-e2012ae1a5ac (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/4f9f39cc-88b8-44b3-9041-e2012ae1a5ac', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 297s yielded = ctx_run(next, result) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 297s yield maybe_future(km.shutdown_kernel(kernel_id)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/4f9f39cc-88b8-44b3-9041-e2012ae1a5ac (127.0.0.1) 12.940000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 297s from ipykernel import kernelapp as app 297s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 297s from .connect import * # noqa: F403 297s ^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 297s import jupyter_client 297s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 297s from .asynchronous import AsyncKernelClient 297s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 297s from .client import AsyncKernelClient # noqa 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 297s import zmq.asyncio 297s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 297s import asyncio 297s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 297s from .base_events import * 297s File "/usr/lib/python3.13/asyncio/base_events.py", line 23, in 297s import socket 297s File "/usr/lib/python3.13/socket.py", line 76, in 297s IntEnum._convert_( 297s ~~~~~~~~~~~~~~~~~^ 297s 'AddressFamily', 297s ^^^^^^^^^^^^^^^^ 297s __name__, 297s ^^^^^^^^^ 297s lambda C: C.isupper() and C.startswith('AF_')) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3.13/enum.py", line 928, in _convert_ 297s cls = _simple_enum(etype=cls, boundary=boundary or KEEP)(tmp_cls) 297s File "/usr/lib/python3.13/enum.py", line 1891, in convert_class 297s contained = value2member_map.get(member._value_) 297s KeyboardInterrupt 297s _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 297s 297s self = 297s 297s def tearDown(self): 297s for k in self.kern_api.list().json(): 297s > self.kern_api.shutdown(k['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/a2ef22b4-9d89-4c15-8f41-320ed947626d 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 297s import functools 297s File "/usr/lib/python3.13/functools.py", line 18, in 297s from collections import namedtuple 297s File "/usr/lib/python3.13/collections/__init__.py", line 41, in 297s from reprlib import recursive_repr as _recursive_repr 297s File "", line 1360, in _find_and_load 297s File "", line 1331, in _find_and_load_unlocked 297s File "", line 935, in _load_unlocked 297s File "", line 1019, in exec_module 297s File "", line 1152, in get_code 297s File "", line 781, in _compile_bytecode 297s KeyboardInterrupt 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpxreb1ziv/runtime/kernel-a2ef22b4-9d89-4c15-8f41-320ed947626d.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45217 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52359 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: a2ef22b4-9d89-4c15-8f41-320ed947626d, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.860000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.600000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpxreb1ziv/runtime/kernel-2c5e4cc3-9c3c-44f0-958f-161876660542.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41307 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36165 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2c5e4cc3-9c3c-44f0-958f-161876660542, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.480000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.540000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 2c5e4cc3-9c3c-44f0-958f-161876660542 297s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/2c5e4cc3-9c3c-44f0-958f-161876660542/interrupt (127.0.0.1) 1.780000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 297s yield maybe_future(km.restart_kernel(kernel_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 297s result = coro.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 297s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 297s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 297s yield self # This tells Task to wait for completion. 297s ^^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 297s future.result() 297s ~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 297s await ensure_async(kernel.restart_kernel(now=now)) 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 297s await self._async_shutdown_kernel(now=now, restart=True) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/2c5e4cc3-9c3c-44f0-958f-161876660542/restart (127.0.0.1) 5.620000ms referer=None 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.570000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a2ef22b4-9d89-4c15-8f41-320ed947626d 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a2ef22b4-9d89-4c15-8f41-320ed947626d 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/a2ef22b4-9d89-4c15-8f41-320ed947626d (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/a2ef22b4-9d89-4c15-8f41-320ed947626d', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 297s future.result() 297s ~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 297s yield maybe_future(km.shutdown_kernel(kernel_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 297s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 297s raise km.ready.exception() # type: ignore[misc] 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/a2ef22b4-9d89-4c15-8f41-320ed947626d (127.0.0.1) 9.830000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 297s from ipykernel import kernelapp as app 297s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 297s from .connect import * # noqa: F403 297s ^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 297s import jupyter_client 297s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 297s from .asynchronous import AsyncKernelClient 297s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 297s from .client import AsyncKernelClient # noqa 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 297s import zmq.asyncio 297s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 57, in 297s from zmq import sugar 297s File "/usr/lib/python3/dist-packages/zmq/sugar/__init__.py", line 11, in 297s from zmq.sugar import context, frame, poll, socket, tracker, version 297s File "/usr/lib/python3/dist-packages/zmq/sugar/context.py", line 23, in 297s from .socket import Socket, SyncSocket 297s File "/usr/lib/python3/dist-packages/zmq/sugar/socket.py", line 35, in 297s from .poll import Poller 297s File "", line 1360, in _find_and_load 297s File "", line 1331, in _find_and_load_unlocked 297s File "", line 935, in _load_unlocked 297s File "", line 1019, in exec_module 297s File "", line 1152, in get_code 297s File "", line 781, in _compile_bytecode 297s KeyboardInterrupt 297s ________ ERROR at teardown of SessionAPITest.test_create_with_kernel_id ________ 297s 297s @self.addCleanup 297s def cleanup_sessions(): 297s for session in self.sess_api.list().json(): 297s > self.sess_api.delete(session['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0v39b0f0/runtime/kernel-3044d0a4-28e3-447f-948a-05ab7dca67d0.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34101 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43397 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3044d0a4-28e3-447f-948a-05ab7dca67d0, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.180000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.980000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.820000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.860000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e71962f1-dc2e-4550-bdd9-cbb73bf85643 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e71962f1-dc2e-4550-bdd9-cbb73bf85643 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/028ddd19-0c52-46a8-a03a-a963e0f6b97f (127.0.0.1) 3.030000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3044d0a4-28e3-447f-948a-05ab7dca67d0 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3044d0a4-28e3-447f-948a-05ab7dca67d0 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 297s yielded = self.gen.send(value) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 13.040000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 297s from ipykernel import kernelapp as app 297s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 297s from .connect import * # noqa: F403 297s ^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 297s from subprocess import PIPE, Popen 297s File "/usr/lib/python3.13/subprocess.py", line 125, in 297s import selectors 297s File "/usr/lib/python3.13/selectors.py", line 11, in 297s import math 297s KeyboardInterrupt 297s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_kernel_id ______ 297s 297s @self.addCleanup 297s def cleanup_sessions(): 297s for session in self.sess_api.list().json(): 297s > self.sess_api.delete(session['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkux3myp7/runtime/kernel-7cd9ab41-bd0c-4b51-8a2c-388114761fea.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40829 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49131 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 7cd9ab41-bd0c-4b51-8a2c-388114761fea, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.280000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.100000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.940000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.920000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0d46c794-1d42-423a-ad76-814940d6e781 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0d46c794-1d42-423a-ad76-814940d6e781 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/96aba347-c440-4176-a26a-0016f4ba7f24 (127.0.0.1) 2.260000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7cd9ab41-bd0c-4b51-8a2c-388114761fea 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7cd9ab41-bd0c-4b51-8a2c-388114761fea 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 297s future.result() 297s ~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 297s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 297s raise km.ready.exception() # type: ignore[misc] 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 10.770000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 297s from ipykernel import kernelapp as app 297s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 297s from .connect import * # noqa: F403 297s ^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 297s from subprocess import PIPE, Popen 297s File "/usr/lib/python3.13/subprocess.py", line 51, in 297s import threading 297s File "/usr/lib/python3.13/threading.py", line 859, in 297s class Thread: 297s ...<355 lines>... 297s self.name = name 297s KeyboardInterrupt 297s =================================== FAILURES =================================== 297s ______________________ KernelAPITest.test_default_kernel _______________________ 297s 297s self = 297s 297s def tearDown(self): 297s for k in self.kern_api.list().json(): 297s > self.kern_api.shutdown(k['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/66a9147f-b81f-448c-ac29-94c3f1495035 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ------------------------------ Captured log setup ------------------------------ 297s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp_85opmiz/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp_85opmiz/etc/jupyter'] for config files 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp_85opmiz/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp_85opmiz/config 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp_85opmiz/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp_85opmiz/config 297s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp_85opmiz/notebooks 297s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 297s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 297s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 297s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 297s WARNING NotebookApp:handlers.py:612 Forbidden 297s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 3.480000ms referer=None 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp_85opmiz/runtime/kernel-66a9147f-b81f-448c-ac29-94c3f1495035.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36013 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33039 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 66a9147f-b81f-448c-ac29-94c3f1495035, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 86.870000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 3.680000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 66a9147f-b81f-448c-ac29-94c3f1495035 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 66a9147f-b81f-448c-ac29-94c3f1495035 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/66a9147f-b81f-448c-ac29-94c3f1495035 (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/66a9147f-b81f-448c-ac29-94c3f1495035', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 297s yielded = ctx_run(next, result) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 297s yield maybe_future(km.shutdown_kernel(kernel_id)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/66a9147f-b81f-448c-ac29-94c3f1495035 (127.0.0.1) 16.640000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 5, in 297s import re 297s File "/usr/lib/python3.13/re/__init__.py", line 125, in 297s import enum 297s File "", line 1360, in _find_and_load 297s File "", line 1331, in _find_and_load_unlocked 297s File "", line 935, in _load_unlocked 297s File "", line 1017, in exec_module 297s KeyboardInterrupt 297s ______________________ KernelAPITest.test_kernel_handler _______________________ 297s 297s self = 297s 297s def test_kernel_handler(self): 297s # GET kernel with given id 297s kid = self.kern_api.start().json()['id'] 297s r = self.kern_api.get(kid) 297s kern1 = r.json() 297s self.assertEqual(r.status_code, 200) 297s assert isinstance(kern1, dict) 297s self.assertIn('id', kern1) 297s self.assertEqual(kern1['id'], kid) 297s 297s # Request a bad kernel id and check that a JSON 297s # message is returned! 297s bad_id = '111-111-111-111-111' 297s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 297s self.kern_api.get(bad_id) 297s 297s # DELETE kernel with id 297s > r = self.kern_api.shutdown(kid) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/d56db812-5772-41be-93dd-f010de1a27b4 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 5, in 297s import re 297s File "/usr/lib/python3.13/re/__init__.py", line 126, in 297s from . import _compiler, _parser 297s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 297s from . import _parser 297s File "/usr/lib/python3.13/re/_parser.py", line 15, in 297s from ._constants import * 297s File "/usr/lib/python3.13/re/_constants.py", line 130, in 297s ATCODES = _makecodes( 297s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 297s ...<5 lines>... 297s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 297s ) 297s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 297s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 297s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 297s KeyboardInterrupt 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp_85opmiz/runtime/kernel-d56db812-5772-41be-93dd-f010de1a27b4.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39609 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60325 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: d56db812-5772-41be-93dd-f010de1a27b4, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 24.090000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/d56db812-5772-41be-93dd-f010de1a27b4 (127.0.0.1) 4.270000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 297s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 297s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 1.990000ms referer=None 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d56db812-5772-41be-93dd-f010de1a27b4 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d56db812-5772-41be-93dd-f010de1a27b4 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/d56db812-5772-41be-93dd-f010de1a27b4 (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/d56db812-5772-41be-93dd-f010de1a27b4', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 297s yielded = ctx_run(next, result) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 297s yield maybe_future(km.shutdown_kernel(kernel_id)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/d56db812-5772-41be-93dd-f010de1a27b4 (127.0.0.1) 11.940000ms referer=None 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.730000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 66a9147f-b81f-448c-ac29-94c3f1495035 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 66a9147f-b81f-448c-ac29-94c3f1495035 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/66a9147f-b81f-448c-ac29-94c3f1495035 (127.0.0.1) 3.990000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d56db812-5772-41be-93dd-f010de1a27b4 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d56db812-5772-41be-93dd-f010de1a27b4 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/d56db812-5772-41be-93dd-f010de1a27b4 (127.0.0.1) 2.690000ms 297s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 297s 297s self = 297s 297s def test_main_kernel_handler(self): 297s # POST request 297s r = self.kern_api.start() 297s kern1 = r.json() 297s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 297s self.assertEqual(r.status_code, 201) 297s self.assertIsInstance(kern1, dict) 297s 297s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 297s expected_csp = '; '.join([ 297s "frame-ancestors 'self'", 297s 'report-uri ' + report_uri, 297s "default-src 'none'" 297s ]) 297s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 297s 297s # GET request 297s r = self.kern_api.list() 297s self.assertEqual(r.status_code, 200) 297s assert isinstance(r.json(), list) 297s self.assertEqual(r.json()[0]['id'], kern1['id']) 297s self.assertEqual(r.json()[0]['name'], kern1['name']) 297s 297s # create another kernel and check that they both are added to the 297s # list of kernels from a GET request 297s kern2 = self.kern_api.start().json() 297s assert isinstance(kern2, dict) 297s r = self.kern_api.list() 297s kernels = r.json() 297s self.assertEqual(r.status_code, 200) 297s assert isinstance(kernels, list) 297s self.assertEqual(len(kernels), 2) 297s 297s # Interrupt a kernel 297s r = self.kern_api.interrupt(kern2['id']) 297s self.assertEqual(r.status_code, 204) 297s 297s # Restart a kernel 297s > r = self.kern_api.restart(kern2['id']) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 297s return self._req('POST', url_path_join(id, 'restart')) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/8ee24557-6cb1-4fd1-9966-5071765a5119/restart 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ---------/usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 297s gc.collect() 297s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 297s -------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 3, in 297s import contextlib 297s File "/usr/lib/python3.13/contextlib.py", line 631, in 297s class AsyncExitStack(_BaseExitStack, AbstractAsyncContextManager): 297s File "/usr/lib/python3.13/abc.py", line 106, in __new__ 297s cls = super().__new__(mcls, name, bases, namespace, **kwargs) 297s KeyboardInterrupt 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp_85opmiz/runtime/kernel-4f9f39cc-88b8-44b3-9041-e2012ae1a5ac.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47379 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39737 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4f9f39cc-88b8-44b3-9041-e2012ae1a5ac, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.140000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.700000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp_85opmiz/runtime/kernel-8ee24557-6cb1-4fd1-9966-5071765a5119.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47269 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57983 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8ee24557-6cb1-4fd1-9966-5071765a5119, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.620000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.770000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 8ee24557-6cb1-4fd1-9966-5071765a5119 297s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/8ee24557-6cb1-4fd1-9966-5071765a5119/interrupt (127.0.0.1) 4.430000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 297s yield maybe_future(km.restart_kernel(kernel_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 297s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 297s await ensure_async(kernel.restart_kernel(now=now)) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 297s await self._async_shutdown_kernel(now=now, restart=True) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/8ee24557-6cb1-4fd1-9966-5071765a5119/restart (127.0.0.1) 9.980000ms referer=None 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.990000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4f9f39cc-88b8-44b3-9041-e2012ae1a5ac 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4f9f39cc-88b8-44b3-9041-e2012ae1a5ac 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/4f9f39cc-88b8-44b3-9041-e2012ae1a5ac (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/4f9f39cc-88b8-44b3-9041-e2012ae1a5ac', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 297s yielded = ctx_run(next, result) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 297s yield maybe_future(km.shutdown_kernel(kernel_id)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/4f9f39cc-88b8-44b3-9041-e2012ae1a5ac (127.0.0.1) 12.940000ms referer=None 297s ________________________ KernelAPITest.test_no_kernels _________________________ 297s 297s self = 297s 297s def test_no_kernels(self): 297s """Make sure there are no kernels running at the start""" 297s kernels = self.kern_api.list().json() 297s > self.assertEqual(kernels, []) 297s E AssertionError: Lists differ: [{'id': '4f9f39cc-88b8-44b3-9041-e2012ae1a[281 chars]: 0}] != [] 297s E 297s E First list contains 2 additional elements. 297s E First extra element 0: 297s E {'id': '4f9f39cc-88b8-44b3-9041-e2012ae1a5ac', 'name': 'python3', 'last_activity': '2026-01-24T03:33:52.519250Z', 'execution_state': 'starting', 'connections': 0} 297s E 297s E + [] 297s E - [{'connections': 0, 297s E - 'execution_state': 'starting', 297s E - 'id': '4f9f39cc-88b8-44b3-9041-e2012ae1a5ac', 297s E - 'last_activity': '2026-01-24T03:33:52.519250Z', 297s E - 'name': 'python3'}, 297s E - {'connections': 0, 297s E - 'execution_state': 'starting', 297s E - 'id': '8ee24557-6cb1-4fd1-9966-5071765a5119', 297s E - 'last_activity': '2026-01-24T03:33:52.552425Z', 297s E - 'name': 'python3'}] 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.910000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.860000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4f9f39cc-88b8-44b3-9041-e2012ae1a5ac 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4f9f39cc-88b8-44b3-9041-e2012ae1a5ac 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/4f9f39cc-88b8-44b3-9041-e2012ae1a5ac (127.0.0.1) 3.020000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8ee24557-6cb1-4fd1-9966-5071765a5119 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8ee24557-6cb1-4fd1-9966-5071765a5119 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/8ee24557-6cb1-4fd1-9966-5071765a5119 (127.0.0.1) 2.920000ms 297s ---------------------------- Captured log teardown ----------------------------- 297s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 297s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 297s _____________________ AsyncKernelAPITest.test_connections ______________________ 297s 297s self = 297s 297s def tearDown(self): 297s for k in self.kern_api.list().json(): 297s > self.kern_api.shutdown(k['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ------------------------------ Captured log setup ------------------------------ 297s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpxreb1ziv/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpxreb1ziv/etc/jupyter'] for config files 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpxreb1ziv/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpxreb1ziv/config 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpxreb1ziv/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpxreb1ziv/config 297s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpxreb1ziv/notebooks 297s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 297s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 297s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 297s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 297s WARNING NotebookApp:handlers.py:612 Forbidden 297s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.310000ms referer=None 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpxreb1ziv/runtime/kernel-8ac62a17-71be-4461-b9f1-32a9761bc4c1.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43457 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51583 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8ac62a17-71be-4461-b9f1-32a9761bc4c1, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.810000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1 (127.0.0.1) 1.640000ms 297s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1/channels 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 297s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58419 297s DEBUG NotebookApp:kernelmanager.py:423 activity on 8ac62a17-71be-4461-b9f1-32a9761bc4c1: status (starting) 297s DEBUG NotebookApp:kernelmanager.py:423 activity on 8ac62a17-71be-4461-b9f1-32a9761bc4c1: status (busy) 297s DEBUG NotebookApp:handlers.py:306 Received kernel info: {'status': 'ok', 'protocol_version': '5.3', 'implementation': 'ipython', 'implementation_version': '8.35.0', 'language_info': {'name': 'python', 'version': '3.13.11', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': "Python 3.13.11 (main, Dec 6 2025, 13:15:20) [GCC 15.2.0]\nType 'copyright', 'credits' or 'license' for more information\nIPython 8.35.0 -- An enhanced Interactive Python. Type '?' for help.\n", 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.13'}, {'text': 'IPython Reference', 'url': 'https://ipython.org/documentation.html'}, {'text': 'NumPy Reference', 'url': 'https://docs.scipy.org/doc/numpy/reference/'}, {'text': 'SciPy Reference', 'url': 'https://docs.scipy.org/doc/scipy/reference/'}, {'text': 'Matplotlib Reference', 'url': 'https://matplotlib.org/contents.html'}, {'text': 'SymPy Reference', 'url': 'http://docs.sympy.org/latest/index.html'}, {'text': 'pandas Reference', 'url': 'https://pandas.pydata.org/pandas-docs/stable/'}]} 297s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel 8ac62a17-71be-4461-b9f1-32a9761bc4c1) to 5.4 (client). 297s DEBUG NotebookApp:kernelmanager.py:423 activity on 8ac62a17-71be-4461-b9f1-32a9761bc4c1: status (idle) 297s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1/channels (127.0.0.1) 1031.590000ms 297s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1/channels 297s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51583 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58419 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43457 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33299 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58419 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43457 297s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 297s Setting websocket_ping_timeout=30000 297s DEBUG NotebookApp:handlers.py:255 Nudge: attempt 1 on kernel 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:kernelmanager.py:423 activity on 8ac62a17-71be-4461-b9f1-32a9761bc4c1: status (busy) 297s DEBUG NotebookApp:handlers.py:207 Nudge: IOPub received: 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:handlers.py:210 Nudge: resolving iopub future: 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:423 activity on 8ac62a17-71be-4461-b9f1-32a9761bc4c1: status (busy) 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1 (127.0.0.1) 2.080000ms 297s DEBUG NotebookApp:kernelmanager.py:423 activity on 8ac62a17-71be-4461-b9f1-32a9761bc4c1: status (idle) 297s DEBUG NotebookApp:handlers.py:195 Nudge: shell info reply received: 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:handlers.py:197 Nudge: resolving shell future: 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:handlers.py:201 Nudge: control info reply received: 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:kernelmanager.py:423 activity on 8ac62a17-71be-4461-b9f1-32a9761bc4c1: status (idle) 297s DEBUG NotebookApp:handlers.py:579 Websocket closed 8ac62a17-71be-4461-b9f1-32a9761bc4c1:c8ad73df-0bae6099ee465dc76d250122 297s INFO NotebookApp:kernelmanager.py:222 Starting buffering for 8ac62a17-71be-4461-b9f1-32a9761bc4c1:c8ad73df-0bae6099ee465dc76d250122 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 8ac62a17-71be-4461-b9f1-32a9761bc4c1:iopub 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1 (127.0.0.1) 1.470000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1 (127.0.0.1) 1.530000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.530000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s INFO NotebookApp:kernelmanager.py:286 Discarding 1 buffered messages for 8ac62a17-71be-4461-b9f1-32a9761bc4c1:c8ad73df-0bae6099ee465dc76d250122 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1 (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 297s future.result() 297s ~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 297s yield maybe_future(km.shutdown_kernel(kernel_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 297s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 297s raise km.ready.exception() # type: ignore[misc] 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1 (127.0.0.1) 10.040000ms referer=None 297s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 297s 297s self = 297s 297s def tearDown(self): 297s for k in self.kern_api.list().json(): 297s > self.kern_api.shutdown(k['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/fa519e35-8918-4b92-95d9-c2be0ea0917a 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpxreb1ziv/runtime/kernel-fa519e35-8918-4b92-95d9-c2be0ea0917a.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36677 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47951 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: fa519e35-8918-4b92-95d9-c2be0ea0917a, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.900000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.600000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/8ac62a17-71be-4461-b9f1-32a9761bc4c1 (127.0.0.1) 1.750000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fa519e35-8918-4b92-95d9-c2be0ea0917a 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fa519e35-8918-4b92-95d9-c2be0ea0917a 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/fa519e35-8918-4b92-95d9-c2be0ea0917a (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/fa519e35-8918-4b92-95d9-c2be0ea0917a', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 297s future.result() 297s ~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 297s yield maybe_future(km.shutdown_kernel(kernel_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 297s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 297s raise km.ready.exception() # type: ignore[misc] 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/fa519e35-8918-4b92-95d9-c2be0ea0917a (127.0.0.1) 9.620000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s Traceback (most recent call last): 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 5, in 297s import re 297s File "/usr/lib/python3.13/re/__init__.py", line 126, in 297s from . import _compiler, _parser 297s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 297s from . import _parser 297s File "/usr/lib/python3.13/re/_parser.py", line 15, in 297s from ._constants import * 297s File "/usr/lib/python3.13/re/_constants.py", line 130, in 297s ATCODES = _makecodes( 297s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 297s ...<5 lines>... 297s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 297s ) 297s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 297s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 297s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 297s KeyboardInterrupt 297s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 297s 297s self = 297s 297s def test_kernel_handler(self): 297s # GET kernel with given id 297s kid = self.kern_api.start().json()['id'] 297s r = self.kern_api.get(kid) 297s kern1 = r.json() 297s self.assertEqual(r.status_code, 200) 297s assert isinstance(kern1, dict) 297s self.assertIn('id', kern1) 297s self.assertEqual(kern1['id'], kid) 297s 297s # Request a bad kernel id and check that a JSON 297s # message is returned! 297s bad_id = '111-111-111-111-111' 297s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 297s self.kern_api.get(bad_id) 297s 297s # DELETE kernel with id 297s > r = self.kern_api.shutdown(kid) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/69d583f9-3b2f-437b-8661-0a961e6400c7 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 5, in 297s import re 297s File "/usr/lib/python3.13/re/__init__.py", line 126, in 297s from . import _compiler, _parser 297s File "", line 1360, in _find_and_load 297s File "", line 1331, in _find_and_load_unlocked 297s File "", line 935, in _load_unlocked 297s File "", line 1019, in exec_module 297s File "", line 1115, in get_code 297s File "", line 1214, in get_data 297s KeyboardInterrupt 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpxreb1ziv/runtime/kernel-69d583f9-3b2f-437b-8661-0a961e6400c7.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50901 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43491 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 69d583f9-3b2f-437b-8661-0a961e6400c7, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.930000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/69d583f9-3b2f-437b-8661-0a961e6400c7 (127.0.0.1) 3.120000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 297s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 297s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 1.740000ms referer=None 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 69d583f9-3b2f-437b-8661-0a961e6400c7 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 69d583f9-3b2f-437b-8661-0a961e6400c7 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/69d583f9-3b2f-437b-8661-0a961e6400c7 (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/69d583f9-3b2f-437b-8661-0a961e6400c7', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 297s future.result() 297s ~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 297s yield maybe_future(km.shutdown_kernel(kernel_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 297s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 297s raise km.ready.exception() # type: ignore[misc] 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/69d583f9-3b2f-437b-8661-0a961e6400c7 (127.0.0.1) 9.510000ms referer=None 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.590000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fa519e35-8918-4b92-95d9-c2be0ea0917a 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fa519e35-8918-4b92-95d9-c2be0ea0917a 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/fa519e35-8918-4b92-95d9-c2be0ea0917a (127.0.0.1) 1.720000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 69d583f9-3b2f-437b-8661-0a961e6400c7 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 69d583f9-3b2f-437b-8661-0a961e6400c7 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/69d583f9-3b2f-437b-8661-0a961e6400c7 (127.0.0.1) 2.770000ms 297s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 297s 297s self = 297s 297s def test_main_kernel_handler(self): 297s # POST request 297s r = self.kern_api.start() 297s kern1 = r.json() 297s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 297s self.assertEqual(r.status_code, 201) 297s self.assertIsInstance(kern1, dict) 297s 297s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 297s expected_csp = '; '.join([ 297s "frame-ancestors 'self'", 297s 'report-uri ' + report_uri, 297s "default-src 'none'" 297s ]) 297s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 297s 297s # GET request 297s r = self.kern_api.list() 297s self.assertEqual(r.status_code, 200) 297s assert isinstance(r.json(), list) 297s self.assertEqual(r.json()[0]['id'], kern1['id']) 297s self.assertEqual(r.json()[0]['name'], kern1['name']) 297s 297s # create another kernel and check that they both are added to the 297s # list of kernels from a GET request 297s kern2 = self.kern_api.start().json() 297s assert isinstance(kern2, dict) 297s r = self.kern_api.list() 297s kernels = r.json() 297s self.assertEqual(r.status_code, 200) 297s assert isinstance(kernels, list) 297s self.assertEqual(len(kernels), 2) 297s 297s # Interrupt a kernel 297s r = self.kern_api.interrupt(kern2['id']) 297s self.assertEqual(r.status_code, 204) 297s 297s # Restart a kernel 297s > r = self.kern_api.restart(kern2['id']) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 297s return self._req('POST', url_path_join(id, 'restart')) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/2c5e4cc3-9c3c-44f0-958f-161876660542/restart 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 297s import functools 297s File "/usr/lib/python3.13/functools.py", line 18, in 297s from collections import namedtuple 297s File "/usr/lib/python3.13/collections/__init__.py", line 41, in 297s from reprlib import recursive_repr as _recursive_repr 297s File "", line 1360, in _find_and_load 297s File "", line 1331, in _find_and_load_unlocked 297s File "", line 935, in _load_unlocked 297s File "", line 1019, in exec_module 297s File "", line 1152, in get_code 297s File "", line 781, in _compile_bytecode 297s KeyboardInterrupt 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpxreb1ziv/runtime/kernel-a2ef22b4-9d89-4c15-8f41-320ed947626d.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45217 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52359 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: a2ef22b4-9d89-4c15-8f41-320ed947626d, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.860000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.600000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpxreb1ziv/runtime/kernel-2c5e4cc3-9c3c-44f0-958f-161876660542.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41307 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36165 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2c5e4cc3-9c3c-44f0-958f-161876660542, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.480000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.540000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 2c5e4cc3-9c3c-44f0-958f-161876660542 297s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/2c5e4cc3-9c3c-44f0-958f-161876660542/interrupt (127.0.0.1) 1.780000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 297s yield maybe_future(km.restart_kernel(kernel_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 297s result = coro.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 297s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 297s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 297s yield self # This tells Task to wait for completion. 297s ^^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 297s future.result() 297s ~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 297s await ensure_async(kernel.restart_kernel(now=now)) 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 297s await self._async_shutdown_kernel(now=now, restart=True) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/2c5e4cc3-9c3c-44f0-958f-161876660542/restart (127.0.0.1) 5.620000ms referer=None 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.570000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a2ef22b4-9d89-4c15-8f41-320ed947626d 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a2ef22b4-9d89-4c15-8f41-320ed947626d 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/a2ef22b4-9d89-4c15-8f41-320ed947626d (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/a2ef22b4-9d89-4c15-8f41-320ed947626d', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 297s future.result() 297s ~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 297s yield maybe_future(km.shutdown_kernel(kernel_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 297s raise self._exception.with_traceback(self._exception_tb) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 297s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 297s raise km.ready.exception() # type: ignore[misc] 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 297s await kernel_awaitable 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 297s result = await obj 297s ^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/a2ef22b4-9d89-4c15-8f41-320ed947626d (127.0.0.1) 9.830000ms referer=None 297s ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 297s 297s self = 297s 297s def test_no_kernels(self): 297s """Make sure there are no kernels running at the start""" 297s kernels = self.kern_api.list().json() 297s > self.assertEqual(kernels, []) 297s E AssertionError: Lists differ: [{'id': 'a2ef22b4-9d89-4c15-8f41-320ed9476[281 chars]: 0}] != [] 297s E 297s E First list contains 2 additional elements. 297s E First extra element 0: 297s E {'id': 'a2ef22b4-9d89-4c15-8f41-320ed947626d', 'name': 'python3', 'last_activity': '2026-01-24T03:33:54.187314Z', 'execution_state': 'starting', 'connections': 0} 297s E 297s E + [] 297s E - [{'connections': 0, 297s E - 'execution_state': 'starting', 297s E - 'id': 'a2ef22b4-9d89-4c15-8f41-320ed947626d', 297s E - 'last_activity': '2026-01-24T03:33:54.187314Z', 297s E - 'name': 'python3'}, 297s E - {'connections': 0, 297s E - 'execution_state': 'starting', 297s E - 'id': '2c5e4cc3-9c3c-44f0-958f-161876660542', 297s E - 'last_activity': '2026-01-24T03:33:54.217605Z', 297s E - 'name': 'python3'}] 297s 297s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.800000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.550000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a2ef22b4-9d89-4c15-8f41-320ed947626d 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a2ef22b4-9d89-4c15-8f41-320ed947626d 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/a2ef22b4-9d89-4c15-8f41-320ed947626d (127.0.0.1) 1.840000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2c5e4cc3-9c3c-44f0-958f-161876660542 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2c5e4cc3-9c3c-44f0-958f-161876660542 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/2c5e4cc3-9c3c-44f0-958f-161876660542 (127.0.0.1) 2.020000ms 297s ---------------------------- Captured log teardown ----------------------------- 297s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8ac62a17-71be-4461-b9f1-32a9761bc4c1 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 69d583f9-3b2f-437b-8661-0a961e6400c7 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fa519e35-8918-4b92-95d9-c2be0ea0917a 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a2ef22b4-9d89-4c15-8f41-320ed947626d 297s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 297s __________________________ SessionAPITest.test_create __________________________ 297s 297s @self.addCleanup 297s def cleanup_sessions(): 297s for session in self.sess_api.list().json(): 297s > self.sess_api.delete(session['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/495766e6-e4af-462f-b57f-b02077f83653 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ------------------------------ Captured log setup ------------------------------ 297s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp0v39b0f0/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp0v39b0f0/etc/jupyter'] for config files 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp0v39b0f0/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp0v39b0f0/config 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp0v39b0f0/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 297s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp0v39b0f0/config 297s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp0v39b0f0/notebooks 297s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 297s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 297s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 297s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 297s WARNING NotebookApp:handlers.py:612 Forbidden 297s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.200000ms referer=None 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 297s from ipykernel import kernelapp as app 297s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 297s from .connect import * # noqa: F403 297s ^^^^^^^^^^^^^^^^^^^^^^ 297s File "", line 1360, in _find_and_load 297s File "", line 1331, in _find_and_load_unlocked 297s File "", line 935, in _load_unlocked 297s File "", line 1019, in exec_module 297s File "", line 1152, in get_code 297s File "", line 781, in _compile_bytecode 297s KeyboardInterrupt 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.200000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0v39b0f0/runtime/kernel-ca444ea7-e608-4f32-bde9-7e2439dc2e91.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34755 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39189 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: ca444ea7-e608-4f32-bde9-7e2439dc2e91, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0v39b0f0/notebooks/foo'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 31.590000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.750000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/495766e6-e4af-462f-b57f-b02077f83653 (127.0.0.1) 1.690000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.550000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ca444ea7-e608-4f32-bde9-7e2439dc2e91 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ca444ea7-e608-4f32-bde9-7e2439dc2e91 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/495766e6-e4af-462f-b57f-b02077f83653 (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/495766e6-e4af-462f-b57f-b02077f83653', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 297s yielded = self.gen.send(value) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/495766e6-e4af-462f-b57f-b02077f83653 (127.0.0.1) 12.560000ms referer=None 297s __________________ SessionAPITest.test_create_console_session __________________ 297s 297s @self.addCleanup 297s def cleanup_sessions(): 297s for session in self.sess_api.list().json(): 297s > self.sess_api.delete(session['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/dcbd6a85-a710-4af2-94df-a097db2df5e8 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0v39b0f0/runtime/kernel-ea124e59-9530-4e00-b1dc-7cc23d898c94.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45299 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33335 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: ea124e59-9530-4e00-b1dc-7cc23d898c94, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0v39b0f0/notebooks/foo'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 23.210000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.730000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ca444ea7-e608-4f32-bde9-7e2439dc2e91 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ca444ea7-e608-4f32-bde9-7e2439dc2e91 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/495766e6-e4af-462f-b57f-b02077f83653 (127.0.0.1) 2.810000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ea124e59-9530-4e00-b1dc-7cc23d898c94 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ea124e59-9530-4e00-b1dc-7cc23d898c94 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/dcbd6a85-a710-4af2-94df-a097db2df5e8 (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/dcbd6a85-a710-4af2-94df-a097db2df5e8', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 297s yielded = self.gen.send(value) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/dcbd6a85-a710-4af2-94df-a097db2df5e8 (127.0.0.1) 11.680000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s Traceback (most recent call last): 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 5, in 297s import re 297s File "/usr/lib/python3.13/re/__init__.py", line 126, in 297s from . import _compiler, _parser 297s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 297s from . import _parser 297s File "/usr/lib/python3.13/re/_parser.py", line 15, in 297s from ._constants import * 297s File "/usr/lib/python3.13/re/_constants.py", line 130, in 297s ATCODES = _makecodes( 297s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 297s ...<5 lines>... 297s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 297s ) 297s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 297s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 297s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 297s KeyboardInterrupt 297s ____________________ SessionAPITest.test_create_deprecated _____________________ 297s 297s @self.addCleanup 297s def cleanup_sessions(): 297s for session in self.sess_api.list().json(): 297s > self.sess_api.delete(session['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/4b514038-73ae-4a2e-9803-bbe5393a72c9 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0v39b0f0/runtime/kernel-2ffa3443-2c10-4082-b9ca-8f897bee696d.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37175 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54257 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2ffa3443-2c10-4082-b9ca-8f897bee696d, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0v39b0f0/notebooks/foo'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 23.620000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.720000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ea124e59-9530-4e00-b1dc-7cc23d898c94 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ea124e59-9530-4e00-b1dc-7cc23d898c94 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/dcbd6a85-a710-4af2-94df-a097db2df5e8 (127.0.0.1) 2.760000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2ffa3443-2c10-4082-b9ca-8f897bee696d 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2ffa3443-2c10-4082-b9ca-8f897bee696d 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/4b514038-73ae-4a2e-9803-bbe5393a72c9 (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/4b514038-73ae-4a2e-9803-bbe5393a72c9', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 297s yielded = self.gen.send(value) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/4b514038-73ae-4a2e-9803-bbe5393a72c9 (127.0.0.1) 11.740000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 5, in 297s import re 297s File "/usr/lib/python3.13/re/__init__.py", line 381, in 297s import copyreg 297s File "", line 1360, in _find_and_load 297s File "", line 1322, in _find_and_load_unlocked 297s File "", line 1262, in _find_spec 297s File "", line 1556, in find_spec 297s File "", line 1530, in _get_spec 297s File "", line 1629, in find_spec 297s File "", line 152, in _path_stat 297s KeyboardInterrupt 297s ___________________ SessionAPITest.test_create_file_session ____________________ 297s 297s @self.addCleanup 297s def cleanup_sessions(): 297s for session in self.sess_api.list().json(): 297s > self.sess_api.delete(session['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/028ddd19-0c52-46a8-a03a-a963e0f6b97f 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0v39b0f0/runtime/kernel-e71962f1-dc2e-4550-bdd9-cbb73bf85643.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43989 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42473 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: e71962f1-dc2e-4550-bdd9-cbb73bf85643, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0v39b0f0/notebooks/foo'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 23.700000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.750000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2ffa3443-2c10-4082-b9ca-8f897bee696d 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2ffa3443-2c10-4082-b9ca-8f897bee696d 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/4b514038-73ae-4a2e-9803-bbe5393a72c9 (127.0.0.1) 2.720000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e71962f1-dc2e-4550-bdd9-cbb73bf85643 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e71962f1-dc2e-4550-bdd9-cbb73bf85643 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/028ddd19-0c52-46a8-a03a-a963e0f6b97f (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/028ddd19-0c52-46a8-a03a-a963e0f6b97f', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 297s yielded = self.gen.send(value) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/028ddd19-0c52-46a8-a03a-a963e0f6b97f (127.0.0.1) 12.190000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 5, in 297s import re 297s File "/usr/lib/python3.13/re/__init__.py", line 126, in 297s from . import _compiler, _parser 297s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 297s from . import _parser 297s File "/usr/lib/python3.13/re/_parser.py", line 20, in 297s DIGITS = frozenset("0123456789") 297s KeyboardInterrupt 297s __________________ SessionAPITest.test_create_with_kernel_id ___________________ 297s 297s self = 297s 297s def test_create_with_kernel_id(self): 297s # create a new kernel 297s r = self.request('POST', 'api/kernels') 297s r.raise_for_status() 297s kernel = r.json() 297s 297s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 297s self.assertEqual(resp.status_code, 201) 297s newsession = resp.json() 297s self.assertIn('id', newsession) 297s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 297s self.assertEqual(newsession['kernel']['id'], kernel['id']) 297s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 297s 297s sessions = self.sess_api.list().json() 297s > self.assertEqual(sessions, [newsession]) 297s E AssertionError: Lists differ: [{'id': '028ddd19-0c52-46a8-a03a-a963e0f6b97f', 'p[553 chars]ne}}] != [{'id': '46c463da-11cf-45d8-9965-be87941eb0ab', 'p[279 chars]ne}}] 297s E 297s E First differing element 0: 297s E {'id': '028ddd19-0c52-46a8-a03a-a963e0f6b97f', 'p[218 chars]: 0}} 297s E {'id': '46c463da-11cf-45d8-9965-be87941eb0ab', 'p[278 chars]one}} 297s E 297s E First list contains 1 additional elements. 297s E First extra element 1: 297s E {'id': '46c463da-11cf-45d8-9965-be87941eb0ab', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '3044d0a4-28e3-447f-948a-05ab7dca67d0', 'name': 'python3', 'last_activity': '2026-01-24T03:33:54.949426Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 297s E 297s E Diff is 830 characters long. Set self.maxDiff to None to see it. 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0v39b0f0/runtime/kernel-3044d0a4-28e3-447f-948a-05ab7dca67d0.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34101 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43397 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3044d0a4-28e3-447f-948a-05ab7dca67d0, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.180000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.980000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.820000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.860000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e71962f1-dc2e-4550-bdd9-cbb73bf85643 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e71962f1-dc2e-4550-bdd9-cbb73bf85643 297s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/028ddd19-0c52-46a8-a03a-a963e0f6b97f (127.0.0.1) 3.030000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3044d0a4-28e3-447f-948a-05ab7dca67d0 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3044d0a4-28e3-447f-948a-05ab7dca67d0 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 297s yielded = self.gen.send(value) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 13.040000ms referer=None 297s _____________________ SessionAPITest.test_modify_kernel_id _____________________ 297s 297s @self.addCleanup 297s def cleanup_sessions(): 297s for session in self.sess_api.list().json(): 297s > self.sess_api.delete(session['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.990000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0v39b0f0/runtime/kernel-68c40bb2-8296-4ca6-a6d7-4b554bed62c4.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59079 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34885 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 68c40bb2-8296-4ca6-a6d7-4b554bed62c4, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 26.010000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3044d0a4-28e3-447f-948a-05ab7dca67d0 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3044d0a4-28e3-447f-948a-05ab7dca67d0 297s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 3.210000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.620000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.530000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 68c40bb2-8296-4ca6-a6d7-4b554bed62c4 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 68c40bb2-8296-4ca6-a6d7-4b554bed62c4 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 297s yielded = self.gen.send(value) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 12.520000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 297s from ipykernel import kernelapp as app 297s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 297s from .connect import * # noqa: F403 297s ^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 297s import json 297s File "", line 1360, in _find_and_load 297s File "", line 1322, in _find_and_load_unlocked 297s File "", line 1262, in _find_spec 297s File "", line 1556, in find_spec 297s File "", line 1530, in _get_spec 297s File "", line 1629, in find_spec 297s File "", line 152, in _path_stat 297s KeyboardInterrupt 297s ____________________ SessionAPITest.test_modify_kernel_name ____________________ 297s 297s @self.addCleanup 297s def cleanup_sessions(): 297s for session in self.sess_api.list().json(): 297s > self.sess_api.delete(session['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.980000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0v39b0f0/runtime/kernel-44373a14-3bc2-40ff-b7e3-ac0ef4db9387.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52661 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35147 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: 44373a14-3bc2-40ff-b7e3-ac0ef4db9387, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmp0v39b0f0/notebooks/foo'} 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 68c40bb2-8296-4ca6-a6d7-4b554bed62c4 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 68c40bb2-8296-4ca6-a6d7-4b554bed62c4 297s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 24.760000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.530000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.530000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 44373a14-3bc2-40ff-b7e3-ac0ef4db9387 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 44373a14-3bc2-40ff-b7e3-ac0ef4db9387 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 297s yielded = self.gen.send(value) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 297s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/46c463da-11cf-45d8-9965-be87941eb0ab (127.0.0.1) 11.750000ms referer=None 297s --------------------------- Captured stderr teardown --------------------------- 297s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 297s return _run_code(code, main_globals, None, 297s "__main__", mod_spec) 297s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 297s exec(code, run_globals) 297s ~~~~^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 297s from pathlib import Path 297s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 297s from ._abc import * 297s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 297s from glob import _Globber, _no_recurse_symlinks 297s File "/usr/lib/python3.13/glob.py", line 5, in 297s import re 297s File "/usr/lib/python3.13/re/__init__.py", line 143, in 297s @enum._simple_enum(enum.IntFlag, boundary=enum.KEEP) 297s ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3.13/enum.py", line 1794, in convert_class 297s if _is_dunder(name) or _is_private(cls_name, name) or _is_sunder(name) or _is_descriptor(obj): 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.13/enum.py", line 47, in _is_dunder 297s def _is_dunder(name): 297s 297s KeyboardInterrupt 297s _______________________ SessionAPITest.test_modify_type ________________________ 297s 297s @self.addCleanup 297s def cleanup_sessions(): 297s for session in self.sess_api.list().json(): 297s > self.sess_api.delete(session['id']) 297s 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 297s return self._req('DELETE', id) 297s ^^^^^^^^^^^^^^^^^^^^^^^ 297s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 297s response.raise_for_status() 297s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 297s 297s self = 297s 297s def raise_for_status(self): 297s """Raises :class:`HTTPError`, if one occurred.""" 297s 297s http_error_msg = "" 297s if isinstance(self.reason, bytes): 297s # We attempt to decode utf-8 first because some servers 297s # choose to localize their reason strings. If the string 297s # isn't utf-8, we fall back to iso-8859-1 for all other 297s # encodings. (See PR #3538) 297s try: 297s reason = self.reason.decode("utf-8") 297s except UnicodeDecodeError: 297s reason = self.reason.decode("iso-8859-1") 297s else: 297s reason = self.reason 297s 297s if 400 <= self.status_code < 500: 297s http_error_msg = ( 297s f"{self.status_code} Client Error: {reason} for url: {self.url}" 297s ) 297s 297s elif 500 <= self.status_code < 600: 297s http_error_msg = ( 297s f"{self.status_code} Server Error: {reason} for url: {self.url}" 297s ) 297s 297s if http_error_msg: 297s > raise HTTPError(http_error_msg, response=self) 297s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/b7bdbb0f-49c9-4ea8-ac93-b4bd5cd41900 297s 297s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 297s ----------------------------- Captured stderr call ----------------------------- 297s Traceback (most recent call last): 297s ------------------------------ Captured log call ------------------------------- 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 297s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp0v39b0f0/runtime/kernel-f7ccf0fa-326b-4619-b251-1496c841d673.json'] 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47589 297s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55889 297s INFO NotebookApp:kernelmanager.py:179 Kernel started: f7ccf0fa-326b-4619-b251-1496c841d673, name: python3 297s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp0v39b0f0/notebooks/foo'} 297s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 23.800000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/b7bdbb0f-49c9-4ea8-ac93-b4bd5cd41900 (127.0.0.1) 2.130000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.750000ms 297s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 297s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f7ccf0fa-326b-4619-b251-1496c841d673 297s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f7ccf0fa-326b-4619-b251-1496c841d673 297s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/b7bdbb0f-49c9-4ea8-ac93-b4bd5cd41900 (127.0.0.1) 297s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b7bdbb0f-49c9-4ea8-ac93-b4bd5cd41900', version='HTTP/1.1', remote_ip='127.0.0.1') 297s Traceback (most recent call last): 297s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 297s result = await result 297s ^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 297s yielded = self.gen.throw(exc) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 297s yield maybe_future(sm.delete_session(session_id)) 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 297s value = future.result() 297s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 297s yielded = self.gen.send(value) 297s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 297s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 297s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 297s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 297s stopper = ensure_async(km.shutdown_kernel(now, restart)) 297s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 297s return _runner_map[name].run(inner) 297s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 297s return fut.result(None) 297s ~~~~~~~~~~^^^^^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 297s return self.__get_result() 297s ~~~~~~~~~~~~~~~~~^^ 297s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 297s raise self._exception 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 297s result = coro.send(None) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 297s raise e 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 297s out = await method(self, *args, **kwargs) 297s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 297s await self._async_finish_shutdown(restart=restart) 297s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 297s await asyncio.wait_for( 297s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 297s ) 297s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 297s async with timeouts.timeout(timeout): 297s ~~~~~~~~~~~~~~~~^^^^^^^^^ 297s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 297s raise RuntimeError("Timeout should be used inside a task") 297s RuntimeError: Timeout should be used inside a task 297s WARNING NotebookApp:handlers.py:612 Unhandled error 297s ERROR NotebookApp:log.py:55 { 297s "Host": "localhost:12341", 297s "Accept": "*/*", 297s "User-Agent": "python-requests/2.32.5" 297s } 298s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/b7bdbb0f-49c9-4ea8-ac93-b4bd5cd41900 (127.0.0.1) 12.040000ms referer=None 298s --------------------------- Captured stderr teardown --------------------------- 298s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 298s return _run_code(code, main_globals, None, 298s "__main__", mod_spec) 298s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 298s exec(code, run_globals) 298s ~~~~^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 298s from pathlib import Path 298s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 298s from ._abc import * 298s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 298s from glob import _Globber, _no_recurse_symlinks 298s File "/usr/lib/python3.13/glob.py", line 5, in 298s import re 298s File "", line 1360, in _find_and_load 298s File "", line 1331, in _find_and_load_unlocked 298s File "", line 946, in _load_unlocked 298s KeyboardInterrupt 298s ---------------------------- Captured log teardown ----------------------------- 298s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f7ccf0fa-326b-4619-b251-1496c841d673 298s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 298s _______________________ AsyncSessionAPITest.test_create ________________________ 298s 298s @self.addCleanup 298s def cleanup_sessions(): 298s for session in self.sess_api.list().json(): 298s > self.sess_api.delete(session['id']) 298s 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 298s return self._req('DELETE', id) 298s ^^^^^^^^^^^^^^^^^^^^^^^ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 298s response.raise_for_status() 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s 298s self = 298s 298s def raise_for_status(self): 298s """Raises :class:`HTTPError`, if one occurred.""" 298s 298s http_error_msg = "" 298s if isinstance(self.reason, bytes): 298s # We attempt to decode utf-8 first because some servers 298s # choose to localize their reason strings. If the string 298s # isn't utf-8, we fall back to iso-8859-1 for all other 298s # encodings. (See PR #3538) 298s try: 298s reason = self.reason.decode("utf-8") 298s except UnicodeDecodeError: 298s reason = self.reason.decode("iso-8859-1") 298s else: 298s reason = self.reason 298s 298s if 400 <= self.status_code < 500: 298s http_error_msg = ( 298s f"{self.status_code} Client Error: {reason} for url: {self.url}" 298s ) 298s 298s elif 500 <= self.status_code < 600: 298s http_error_msg = ( 298s f"{self.status_code} Server Error: {reason} for url: {self.url}" 298s ) 298s 298s if http_error_msg: 298s > raise HTTPError(http_error_msg, response=self) 298s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/265f41c8-e1e1-4bb1-9463-afa5a7eca21b 298s 298s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 298s ------------------------------ Captured log setup ------------------------------ 298s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpkux3myp7/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpkux3myp7/etc/jupyter'] for config files 298s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpkux3myp7/etc/jupyter 298s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 298s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 298s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpkux3myp7/config 298s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpkux3myp7/etc/jupyter 298s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 298s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 298s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpkux3myp7/config 298s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpkux3myp7/notebooks 298s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 298s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 298s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 298s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 298s WARNING NotebookApp:handlers.py:612 Forbidden 298s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.510000ms referer=None 298s ----------------------------- Captured stderr call ----------------------------- 298s Traceback (most recent call last): 298s ------------------------------ Captured log call ------------------------------- 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.380000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 298s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkux3myp7/runtime/kernel-e8982a43-f660-4ae0-bda4-051b4739cf4f.json'] 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46601 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45373 298s INFO NotebookApp:kernelmanager.py:179 Kernel started: e8982a43-f660-4ae0-bda4-051b4739cf4f, name: python3 298s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpkux3myp7/notebooks/foo'} 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 22.930000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.020000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/265f41c8-e1e1-4bb1-9463-afa5a7eca21b (127.0.0.1) 1.970000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.920000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e8982a43-f660-4ae0-bda4-051b4739cf4f 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e8982a43-f660-4ae0-bda4-051b4739cf4f 298s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/265f41c8-e1e1-4bb1-9463-afa5a7eca21b (127.0.0.1) 298s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/265f41c8-e1e1-4bb1-9463-afa5a7eca21b', version='HTTP/1.1', remote_ip='127.0.0.1') 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 298s result = await result 298s ^^^^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 298s future.result() 298s ~~~~~~~~~~~~~^^ 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 298s yield maybe_future(sm.delete_session(session_id)) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 298s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 298s raise self._exception.with_traceback(self._exception_tb) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 298s result = coro.send(None) 298s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 298s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 298s raise km.ready.exception() # type: ignore[misc] 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s WARNING NotebookApp:handlers.py:612 Unhandled error 298s ERROR NotebookApp:log.py:55 { 298s "Host": "localhost:12341", 298s "Accept": "*/*", 298s "User-Agent": "python-requests/2.32.5" 298s } 298s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/265f41c8-e1e1-4bb1-9463-afa5a7eca21b (127.0.0.1) 11.500000ms referer=None 298s --------------------------- Captured stderr teardown --------------------------- 298s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 298s return _run_code(code, main_globals, None, 298s "__main__", mod_spec) 298s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 298s exec(code, run_globals) 298s ~~~~^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 298s from ipykernel import kernelapp as app 298s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 298s from .connect import * # noqa: F403 298s ^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 298s from subprocess import PIPE, Popen 298s File "/usr/lib/python3.13/subprocess.py", line 46, in 298s import locale 298s File "/usr/lib/python3.13/locale.py", line 180, in 298s _percent_re = re.compile(r'%(?:\((?P.*?)\))?' 298s r'(?P[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]') 298s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 298s return _compile(pattern, flags) 298s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 298s p = _compiler.compile(pattern, flags) 298s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 298s code = _code(p, flags) 298s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 298s _compile(code, p.data, flags) 298s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3.13/re/_compiler.py", line 117, in _compile 298s _compile(code, av[2], flags) 298s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3.13/re/_compiler.py", line 126, in _compile 298s _compile(code, p, _combine_flags(flags, add_flags, del_flags)) 298s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3.13/re/_compiler.py", line 109, in _compile 298s _compile(code, av[2], flags) 298s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3.13/re/_compiler.py", line 102, in _compile 298s emit(ANY) 298s ~~~~^^^^^ 298s KeyboardInterrupt 298s _______________ AsyncSessionAPITest.test_create_console_session ________________ 298s 298s @self.addCleanup 298s def cleanup_sessions(): 298s for session in self.sess_api.list().json(): 298s > self.sess_api.delete(session['id']) 298s 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 298s return self._req('DELETE', id) 298s ^^^^^^^^^^^^^^^^^^^^^^^ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 298s response.raise_for_status() 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s 298s self = 298s 298s def raise_for_status(self): 298s """Raises :class:`HTTPError`, if one occurred.""" 298s 298s http_error_msg = "" 298s if isinstance(self.reason, bytes): 298s # We attempt to decode utf-8 first because some servers 298s # choose to localize their reason strings. If the string 298s # isn't utf-8, we fall back to iso-8859-1 for all other 298s # encodings. (See PR #3538) 298s try: 298s reason = self.reason.decode("utf-8") 298s except UnicodeDecodeError: 298s reason = self.reason.decode("iso-8859-1") 298s else: 298s reason = self.reason 298s 298s if 400 <= self.status_code < 500: 298s http_error_msg = ( 298s f"{self.status_code} Client Error: {reason} for url: {self.url}" 298s ) 298s 298s elif 500 <= self.status_code < 600: 298s http_error_msg = ( 298s f"{self.status_code} Server Error: {reason} for url: {self.url}" 298s ) 298s 298s if http_error_msg: 298s > raise HTTPError(http_error_msg, response=self) 298s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/7c199890-5782-4638-8da9-8dd2c2ece94f 298s 298s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 298s ----------------------------- Captured stderr call ----------------------------- 298s Traceback (most recent call last): 298s ------------------------------ Captured log call ------------------------------- 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 298s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkux3myp7/runtime/kernel-c410b415-9156-458e-bc82-ee4db099a631.json'] 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51739 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34739 298s INFO NotebookApp:kernelmanager.py:179 Kernel started: c410b415-9156-458e-bc82-ee4db099a631, name: python3 298s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpkux3myp7/notebooks/foo'} 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 22.160000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.390000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e8982a43-f660-4ae0-bda4-051b4739cf4f 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e8982a43-f660-4ae0-bda4-051b4739cf4f 298s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/265f41c8-e1e1-4bb1-9463-afa5a7eca21b (127.0.0.1) 2.560000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c410b415-9156-458e-bc82-ee4db099a631 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c410b415-9156-458e-bc82-ee4db099a631 298s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/7c199890-5782-4638-8da9-8dd2c2ece94f (127.0.0.1) 298s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/7c199890-5782-4638-8da9-8dd2c2ece94f', version='HTTP/1.1', remote_ip='127.0.0.1') 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 298s result = await result 298s ^^^^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 298s future.result() 298s ~~~~~~~~~~~~~^^ 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 298s yield maybe_future(sm.delete_session(session_id)) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 298s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 298s raise self._exception.with_traceback(self._exception_tb) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 298s result = coro.send(None) 298s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 298s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 298s raise km.ready.exception() # type: ignore[misc] 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s WARNING NotebookApp:handlers.py:612 Unhandled error 298s ERROR NotebookApp:log.py:55 { 298s "Host": "localhost:12341", 298s "Accept": "*/*", 298s "User-Agent": "python-requests/2.32.5" 298s } 298s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/7c199890-5782-4638-8da9-8dd2c2ece94f (127.0.0.1) 10.930000ms referer=None 298s --------------------------- Captured stderr teardown --------------------------- 298s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 298s return _run_code(code, main_globals, None, 298s "__main__", mod_spec) 298s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 298s exec(code, run_globals) 298s ~~~~^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 298s from pathlib import Path 298s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 298s from ._local import * 298s File "", line 1360, in _find_and_load 298s File "", line 1331, in _find_and_load_unlocked 298s File "", line 935, in _load_unlocked 298s File "", line 1019, in exec_module 298s File "", line 1152, in get_code 298s File "", line 781, in _compile_bytecode 298s KeyboardInterrupt 298s __________________ AsyncSessionAPITest.test_create_deprecated __________________ 298s 298s @self.addCleanup 298s def cleanup_sessions(): 298s for session in self.sess_api.list().json(): 298s > self.sess_api.delete(session['id']) 298s 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 298s return self._req('DELETE', id) 298s ^^^^^^^^^^^^^^^^^^^^^^^ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 298s response.raise_for_status() 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s 298s self = 298s 298s def raise_for_status(self): 298s """Raises :class:`HTTPError`, if one occurred.""" 298s 298s http_error_msg = "" 298s if isinstance(self.reason, bytes): 298s # We attempt to decode utf-8 first because some servers 298s # choose to localize their reason strings. If the string 298s # isn't utf-8, we fall back to iso-8859-1 for all other 298s # encodings. (See PR #3538) 298s try: 298s reason = self.reason.decode("utf-8") 298s except UnicodeDecodeError: 298s reason = self.reason.decode("iso-8859-1") 298s else: 298s reason = self.reason 298s 298s if 400 <= self.status_code < 500: 298s http_error_msg = ( 298s f"{self.status_code} Client Error: {reason} for url: {self.url}" 298s ) 298s 298s elif 500 <= self.status_code < 600: 298s http_error_msg = ( 298s f"{self.status_code} Server Error: {reason} for url: {self.url}" 298s ) 298s 298s if http_error_msg: 298s > raise HTTPError(http_error_msg, response=self) 298s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/9cf22986-0e2f-4143-bfe2-1dbc18877e1e 298s 298s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 298s ----------------------------- Captured stderr call ----------------------------- 298s Traceback (most recent call last): 298s ------------------------------ Captured log call ------------------------------- 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 298s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 298s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkux3myp7/runtime/kernel-1e600497-0161-43db-ad93-cd697b28b0ae.json'] 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51425 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45137 298s INFO NotebookApp:kernelmanager.py:179 Kernel started: 1e600497-0161-43db-ad93-cd697b28b0ae, name: python3 298s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpkux3myp7/notebooks/foo'} 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.910000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.420000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c410b415-9156-458e-bc82-ee4db099a631 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c410b415-9156-458e-bc82-ee4db099a631 298s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/7c199890-5782-4638-8da9-8dd2c2ece94f (127.0.0.1) 2.600000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 1e600497-0161-43db-ad93-cd697b28b0ae 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1e600497-0161-43db-ad93-cd697b28b0ae 298s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/9cf22986-0e2f-4143-bfe2-1dbc18877e1e (127.0.0.1) 298s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/9cf22986-0e2f-4143-bfe2-1dbc18877e1e', version='HTTP/1.1', remote_ip='127.0.0.1') 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 298s result = await result 298s ^^^^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 298s future.result() 298s ~~~~~~~~~~~~~^^ 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 298s yield maybe_future(sm.delete_session(session_id)) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 298s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 298s raise self._exception.with_traceback(self._exception_tb) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 298s result = coro.send(None) 298s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 298s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 298s raise km.ready.exception() # type: ignore[misc] 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s WARNING NotebookApp:handlers.py:612 Unhandled error 298s ERROR NotebookApp:log.py:55 { 298s "Host": "localhost:12341", 298s "Accept": "*/*", 298s "User-Agent": "python-requests/2.32.5" 298s } 298s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/9cf22986-0e2f-4143-bfe2-1dbc18877e1e (127.0.0.1) 11.100000ms referer=None 298s --------------------------- Captured stderr teardown --------------------------- 298s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 298s return _run_code(code, main_globals, None, 298s "__main__", mod_spec) 298s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 298s exec(code, run_globals) 298s ~~~~^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 298s from pathlib import Path 298s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 298s from ._abc import * 298s File "", line 1357, in _find_and_load 298s File "", line 421, in __exit__ 298s File "", line 378, in release 298s KeyboardInterrupt 298s _________________ AsyncSessionAPITest.test_create_file_session _________________ 298s 298s @self.addCleanup 298s def cleanup_sessions(): 298s for session in self.sess_api.list().json(): 298s > self.sess_api.delete(session['id']) 298s 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 298s return self._req('DELETE', id) 298s ^^^^^^^^^^^^^^^^^^^^^^^ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 298s response.raise_for_status() 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s 298s self = 298s 298s def raise_for_status(self): 298s """Raises :class:`HTTPError`, if one occurred.""" 298s 298s http_error_msg = "" 298s if isinstance(self.reason, bytes): 298s # We attempt to decode utf-8 first because some servers 298s # choose to localize their reason strings. If the string 298s # isn't utf-8, we fall back to iso-8859-1 for all other 298s # encodings. (See PR #3538) 298s try: 298s reason = self.reason.decode("utf-8") 298s except UnicodeDecodeError: 298s reason = self.reason.decode("iso-8859-1") 298s else: 298s reason = self.reason 298s 298s if 400 <= self.status_code < 500: 298s http_error_msg = ( 298s f"{self.status_code} Client Error: {reason} for url: {self.url}" 298s ) 298s 298s elif 500 <= self.status_code < 600: 298s http_error_msg = ( 298s f"{self.status_code} Server Error: {reason} for url: {self.url}" 298s ) 298s 298s if http_error_msg: 298s > raise HTTPError(http_error_msg, response=self) 298s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/96aba347-c440-4176-a26a-0016f4ba7f24 298s 298s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 298s ----------------------------- Captured stderr call ----------------------------- 298s Traceback (most recent call last): 298s ------------------------------ Captured log call ------------------------------- 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 298s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkux3myp7/runtime/kernel-0d46c794-1d42-423a-ad76-814940d6e781.json'] 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45501 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39357 298s INFO NotebookApp:kernelmanager.py:179 Kernel started: 0d46c794-1d42-423a-ad76-814940d6e781, name: python3 298s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpkux3myp7/notebooks/foo'} 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.600000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.920000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 1e600497-0161-43db-ad93-cd697b28b0ae 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1e600497-0161-43db-ad93-cd697b28b0ae 298s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/9cf22986-0e2f-4143-bfe2-1dbc18877e1e (127.0.0.1) 2.320000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0d46c794-1d42-423a-ad76-814940d6e781 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0d46c794-1d42-423a-ad76-814940d6e781 298s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/96aba347-c440-4176-a26a-0016f4ba7f24 (127.0.0.1) 298s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/96aba347-c440-4176-a26a-0016f4ba7f24', version='HTTP/1.1', remote_ip='127.0.0.1') 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 298s result = await result 298s ^^^^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 298s future.result() 298s ~~~~~~~~~~~~~^^ 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 298s yield maybe_future(sm.delete_session(session_id)) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 298s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 298s raise self._exception.with_traceback(self._exception_tb) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 298s result = coro.send(None) 298s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 298s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 298s raise km.ready.exception() # type: ignore[misc] 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s WARNING NotebookApp:handlers.py:612 Unhandled error 298s ERROR NotebookApp:log.py:55 { 298s "Host": "localhost:12341", 298s "Accept": "*/*", 298s "User-Agent": "python-requests/2.32.5" 298s } 298s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/96aba347-c440-4176-a26a-0016f4ba7f24 (127.0.0.1) 10.880000ms referer=None 298s --------------------------- Captured stderr teardown --------------------------- 298s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 298s return _run_code(code, main_globals, None, 298s "__main__", mod_spec) 298s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 298s exec(code, run_globals) 298s ~~~~^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 298s from pathlib import Path 298s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 298s from ._local import * 298s File "/usr/lib/python3.13/pathlib/_local.py", line 6, in 298s import warnings 298s File "", line 1360, in _find_and_load 298s File "", line 1331, in _find_and_load_unlocked 298s File "", line 935, in _load_unlocked 298s File "", line 1019, in exec_module 298s File "", line 1115, in get_code 298s File "", line 1214, in get_data 298s KeyboardInterrupt 298s ________________ AsyncSessionAPITest.test_create_with_kernel_id ________________ 298s 298s self = 298s 298s def test_create_with_kernel_id(self): 298s # create a new kernel 298s r = self.request('POST', 'api/kernels') 298s r.raise_for_status() 298s kernel = r.json() 298s 298s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 298s self.assertEqual(resp.status_code, 201) 298s newsession = resp.json() 298s self.assertIn('id', newsession) 298s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 298s self.assertEqual(newsession['kernel']['id'], kernel['id']) 298s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 298s 298s sessions = self.sess_api.list().json() 298s > self.assertEqual(sessions, [newsession]) 298s E AssertionError: Lists differ: [{'id': '96aba347-c440-4176-a26a-0016f4ba7f24', 'p[553 chars]ne}}] != [{'id': '53d5070e-df89-4bbb-bc88-53f92ff072b6', 'p[279 chars]ne}}] 298s E 298s E First differing element 0: 298s E {'id': '96aba347-c440-4176-a26a-0016f4ba7f24', 'p[218 chars]: 0}} 298s E {'id': '53d5070e-df89-4bbb-bc88-53f92ff072b6', 'p[278 chars]one}} 298s E 298s E First list contains 1 additional elements. 298s E First extra element 1: 298s E {'id': '53d5070e-df89-4bbb-bc88-53f92ff072b6', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '7cd9ab41-bd0c-4b51-8a2c-388114761fea', 'name': 'python3', 'last_activity': '2026-01-24T03:33:55.930026Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 298s E 298s E Diff is 830 characters long. Set self.maxDiff to None to see it. 298s 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 298s ----------------------------- Captured stderr call ----------------------------- 298s Traceback (most recent call last): 298s ------------------------------ Captured log call ------------------------------- 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 298s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkux3myp7/runtime/kernel-7cd9ab41-bd0c-4b51-8a2c-388114761fea.json'] 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40829 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49131 298s INFO NotebookApp:kernelmanager.py:179 Kernel started: 7cd9ab41-bd0c-4b51-8a2c-388114761fea, name: python3 298s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.280000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.100000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.940000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.920000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0d46c794-1d42-423a-ad76-814940d6e781 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0d46c794-1d42-423a-ad76-814940d6e781 298s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/96aba347-c440-4176-a26a-0016f4ba7f24 (127.0.0.1) 2.260000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7cd9ab41-bd0c-4b51-8a2c-388114761fea 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7cd9ab41-bd0c-4b51-8a2c-388114761fea 298s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 298s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6', version='HTTP/1.1', remote_ip='127.0.0.1') 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 298s result = await result 298s ^^^^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 298s future.result() 298s ~~~~~~~~~~~~~^^ 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 298s yield maybe_future(sm.delete_session(session_id)) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 298s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 298s raise self._exception.with_traceback(self._exception_tb) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 298s result = coro.send(None) 298s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 298s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 298s raise km.ready.exception() # type: ignore[misc] 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s WARNING NotebookApp:handlers.py:612 Unhandled error 298s ERROR NotebookApp:log.py:55 { 298s "Host": "localhost:12341", 298s "Accept": "*/*", 298s "User-Agent": "python-requests/2.32.5" 298s } 298s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 10.770000ms referer=None 298s __________________ AsyncSessionAPITest.test_modify_kernel_id ___________________ 298s 298s @self.addCleanup 298s def cleanup_sessions(): 298s for session in self.sess_api.list().json(): 298s > self.sess_api.delete(session['id']) 298s 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 298s return self._req('DELETE', id) 298s ^^^^^^^^^^^^^^^^^^^^^^^ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 298s response.raise_for_status() 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s 298s self = 298s 298s def raise_for_status(self): 298s """Raises :class:`HTTPError`, if one occurred.""" 298s 298s http_error_msg = "" 298s if isinstance(self.reason, bytes): 298s # We attempt to decode utf-8 first because some servers 298s # choose to localize their reason strings. If the string 298s # isn't utf-8, we fall back to iso-8859-1 for all other 298s # encodings. (See PR #3538) 298s try: 298s reason = self.reason.decode("utf-8") 298s except UnicodeDecodeError: 298s reason = self.reason.decode("iso-8859-1") 298s else: 298s reason = self.reason 298s 298s if 400 <= self.status_code < 500: 298s http_error_msg = ( 298s f"{self.status_code} Client Error: {reason} for url: {self.url}" 298s ) 298s 298s elif 500 <= self.status_code < 600: 298s http_error_msg = ( 298s f"{self.status_code} Server Error: {reason} for url: {self.url}" 298s ) 298s 298s if http_error_msg: 298s > raise HTTPError(http_error_msg, response=self) 298s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 298s 298s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 298s ----------------------------- Captured stderr call ----------------------------- 298s Traceback (most recent call last): 298s ------------------------------ Captured log call ------------------------------- 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.240000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 298s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkux3myp7/runtime/kernel-97971c24-d425-4569-a7e3-ea4944d2a1d3.json'] 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53951 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37369 298s INFO NotebookApp:kernelmanager.py:179 Kernel started: 97971c24-d425-4569-a7e3-ea4944d2a1d3, name: python3 298s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.820000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7cd9ab41-bd0c-4b51-8a2c-388114761fea 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7cd9ab41-bd0c-4b51-8a2c-388114761fea 298s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 4.050000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.720000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.730000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 97971c24-d425-4569-a7e3-ea4944d2a1d3 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 97971c24-d425-4569-a7e3-ea4944d2a1d3 298s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 298s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6', version='HTTP/1.1', remote_ip='127.0.0.1') 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 298s result = await result 298s ^^^^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 298s future.result() 298s ~~~~~~~~~~~~~^^ 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 298s yield maybe_future(sm.delete_session(session_id)) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 298s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 298s raise self._exception.with_traceback(self._exception_tb) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 298s result = coro.send(None) 298s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 298s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 298s raise km.ready.exception() # type: ignore[misc] 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s WARNING NotebookApp:handlers.py:612 Unhandled error 298s ERROR NotebookApp:log.py:55 { 298s "Host": "localhost:12341", 298s "Accept": "*/*", 298s "User-Agent": "python-requests/2.32.5" 298s } 298s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 10.300000ms referer=None 298s --------------------------- Captured stderr teardown --------------------------- 298s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 298s return _run_code(code, main_globals, None, 298s "__main__", mod_spec) 298s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 298s exec(code, run_globals) 298s ~~~~^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 298s from ipykernel import kernelapp as app 298s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 1, in 298s from ._version import ( 298s ...<4 lines>... 298s ) 298s File "/usr/lib/python3/dist-packages/ipykernel/_version.py", line 11, in 298s match = re.match(pattern, __version__) 298s File "/usr/lib/python3.13/re/__init__.py", line 167, in match 298s return _compile(pattern, flags).match(string) 298s ~~~~~~~~^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 298s p = _compiler.compile(pattern, flags) 298s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 298s code = _code(p, flags) 298s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 298s _compile(code, p.data, flags) 298s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3.13/re/_compiler.py", line 123, in _compile 298s emit(MARK) 298s ~~~~^^^^^^ 298s KeyboardInterrupt 298s _________________ AsyncSessionAPITest.test_modify_kernel_name __________________ 298s 298s @self.addCleanup 298s def cleanup_sessions(): 298s for session in self.sess_api.list().json(): 298s > self.sess_api.delete(session['id']) 298s 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 298s return self._req('DELETE', id) 298s ^^^^^^^^^^^^^^^^^^^^^^^ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 298s response.raise_for_status() 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s 298s self = 298s 298s def raise_for_status(self): 298s """Raises :class:`HTTPError`, if one occurred.""" 298s 298s http_error_msg = "" 298s if isinstance(self.reason, bytes): 298s # We attempt to decode utf-8 first because some servers 298s # choose to localize their reason strings. If the string 298s # isn't utf-8, we fall back to iso-8859-1 for all other 298s # encodings. (See PR #3538) 298s try: 298s reason = self.reason.decode("utf-8") 298s except UnicodeDecodeError: 298s reason = self.reason.decode("iso-8859-1") 298s else: 298s reason = self.reason 298s 298s if 400 <= self.status_code < 500: 298s http_error_msg = ( 298s f"{self.status_code} Client Error: {reason} for url: {self.url}" 298s ) 298s 298s elif 500 <= self.status_code < 600: 298s http_error_msg = ( 298s f"{self.status_code} Server Error: {reason} for url: {self.url}" 298s ) 298s 298s if http_error_msg: 298s > raise HTTPError(http_error_msg, response=self) 298s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 298s 298s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 298s ------------------------------ Captured log call ------------------------------- 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.070000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 298s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkux3myp7/runtime/kernel-380ac56d-d5f1-4eb1-bb36-e17cdf00274c.json'] 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53123 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57173 298s INFO NotebookApp:kernelmanager.py:179 Kernel started: 380ac56d-d5f1-4eb1-bb36-e17cdf00274c, name: python3 298s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpkux3myp7/notebooks/foo'} 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 97971c24-d425-4569-a7e3-ea4944d2a1d3 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 97971c24-d425-4569-a7e3-ea4944d2a1d3 298s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 21.720000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.620000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.790000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 380ac56d-d5f1-4eb1-bb36-e17cdf00274c 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 380ac56d-d5f1-4eb1-bb36-e17cdf00274c 298s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 298s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6', version='HTTP/1.1', remote_ip='127.0.0.1') 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 298s result = await result 298s ^^^^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 298s future.result() 298s ~~~~~~~~~~~~~^^ 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 298s yield maybe_future(sm.delete_session(session_id)) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 298s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 298s raise self._exception.with_traceback(self._exception_tb) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 298s result = coro.send(None) 298s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 298s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 298s raise km.ready.exception() # type: ignore[misc] 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s WARNING NotebookApp:handlers.py:612 Unhandled error 298s ERROR NotebookApp:log.py:55 { 298s "Host": "localhost:12341", 298s "Accept": "*/*", 298s "User-Agent": "python-requests/2.32.5" 298s } 298s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/53d5070e-df89-4bbb-bc88-53f92ff072b6 (127.0.0.1) 10.450000ms referer=None 298s --------------------------- Captured stderr teardown --------------------------- 298s Traceback (most recent call last): 298s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 298s return _run_code(code, main_globals, None, 298s "__main__", mod_spec) 298s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 298s exec(code, run_globals) 298s ~~~~^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 298s from pathlib import Path 298s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 298s from ._abc import * 298s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 298s from glob import _Globber, _no_recurse_symlinks 298s File "/usr/lib/python3.13/glob.py", line 5, in 298s import re 298s File "/usr/lib/python3.13/re/__init__.py", line 126, in 298s from . import _compiler, _parser 298s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 298s from . import _parser 298s File "/usr/lib/python3.13/re/_parser.py", line 15, in 298s from ._constants import * 298s File "/usr/lib/python3.13/re/_constants.py", line 130, in 298s ATCODES = _makecodes( 298s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 298s ...<5 lines>... 298s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 298s ) 298s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 298s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 298s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 298s KeyboardInterrupt 298s _____________________ AsyncSessionAPITest.test_modify_type _____________________ 298s 298s @self.addCleanup 298s def cleanup_sessions(): 298s for session in self.sess_api.list().json(): 298s > self.sess_api.delete(session['id']) 298s 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 298s return self._req('DELETE', id) 298s ^^^^^^^^^^^^^^^^^^^^^^^ 298s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 298s response.raise_for_status() 298s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 298s 298s self = 298s 298s def raise_for_status(self): 298s """Raises :class:`HTTPError`, if one occurred.""" 298s 298s http_error_msg = "" 298s if isinstance(self.reason, bytes): 298s # We attempt to decode utf-8 first because some servers 298s # choose to localize their reason strings. If the string 298s # isn't utf-8, we fall back to iso-8859-1 for all other 298s # encodings. (See PR #3538) 298s try: 298s reason = self.reason.decode("utf-8") 298s except UnicodeDecodeError: 298s reason = self.reason.decode("iso-8859-1") 298s else: 298s reason = self.reason 298s 298s if 400 <= self.status_code < 500: 298s http_error_msg = ( 298s f"{self.status_code} Client Error: {reason} for url: {self.url}" 298s ) 298s 298s elif 500 <= self.status_code < 600: 298s http_error_msg = ( 298s f"{self.status_code} Server Error: {reason} for url: {self.url}" 298s ) 298s 298s if http_error_msg: 298s > raise HTTPError(http_error_msg, response=self) 298s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/b18d3e2e-ebb4-4acc-bfa8-ce2ad5b2ffcb 298s 298s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 298s ----------------------------- Captured stderr call ----------------------------- 298s Traceback (most recent call last): 298s ------------------------------ Captured log call ------------------------------- 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 298s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkux3myp7/runtime/kernel-b49cc637-7caf-404d-bccf-33920a8adf01.json'] 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38329 298s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44311 298s INFO NotebookApp:kernelmanager.py:179 Kernel started: b49cc637-7caf-404d-bccf-33920a8adf01, name: python3 298s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpkux3myp7/notebooks/foo'} 298s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 22.030000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/b18d3e2e-ebb4-4acc-bfa8-ce2ad5b2ffcb (127.0.0.1) 2.290000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.950000ms 298s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 298s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for b49cc637-7caf-404d-bccf-33920a8adf01 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b49cc637-7caf-404d-bccf-33920a8adf01 298s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/b18d3e2e-ebb4-4acc-bfa8-ce2ad5b2ffcb (127.0.0.1) 298s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b18d3e2e-ebb4-4acc-bfa8-ce2ad5b2ffcb', version='HTTP/1.1', remote_ip='127.0.0.1') 298s Traceback (most recent call last): 298s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 298s result = await result 298s ^^^^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 298s future.result() 298s ~~~~~~~~~~~~~^^ 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 298s yield maybe_future(sm.delete_session(session_id)) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 298s yielded = self.gen.throw(exc) 298s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 298s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 298s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 298s value = future.result() 298s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 298s raise self._exception.with_traceback(self._exception_tb) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 298s result = coro.send(None) 298s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 298s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 298s raise km.ready.exception() # type: ignore[misc] 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 298s await kernel_awaitable 298s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 298s result = await obj 298s ^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 298s raise e 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 298s out = await method(self, *args, **kwargs) 298s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 298s await self._async_finish_shutdown(restart=restart) 298s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 298s await asyncio.wait_for( 298s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 298s ) 298s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 298s async with timeouts.timeout(timeout): 298s ~~~~~~~~~~~~~~~~^^^^^^^^^ 298s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 298s raise RuntimeError("Timeout should be used inside a task") 298s RuntimeError: Timeout should be used inside a task 298s WARNING NotebookApp:handlers.py:612 Unhandled error 298s ERROR NotebookApp:log.py:55 { 298s "Host": "localhost:12341", 298s "Accept": "*/*", 298s "User-Agent": "python-requests/2.32.5" 298s } 298s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/b18d3e2e-ebb4-4acc-bfa8-ce2ad5b2ffcb (127.0.0.1) 11.300000ms referer=None 298s --------------------------- Captured stderr teardown --------------------------- 298s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 298s return _run_code(code, main_globals, None, 298s "__main__", mod_spec) 298s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 298s exec(code, run_globals) 298s ~~~~^^^^^^^^^^^^^^^^^^^ 298s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 298s from pathlib import Path 298s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 298s from ._abc import * 298s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 298s from glob import _Globber, _no_recurse_symlinks 298s File "/usr/lib/python3.13/glob.py", line 5, in 298s import re 298s File "/usr/lib/python3.13/re/__init__.py", line 381, in 298s import copyreg 298s File "", line 1360, in _find_and_load 298s File "", line 1331, in _find_and_load_unlocked 298s File "", line 935, in _load_unlocked 298s File "", line 1019, in exec_module 298s File "", line 1115, in get_code 298s File "", line 1214, in get_data 298s KeyboardInterrupt 298s ---------------------------- Captured log teardown ----------------------------- 298s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b49cc637-7caf-404d-bccf-33920a8adf01 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e8982a43-f660-4ae0-bda4-051b4739cf4f 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1e600497-0161-43db-ad93-cd697b28b0ae 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7cd9ab41-bd0c-4b51-8a2c-388114761fea 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 380ac56d-d5f1-4eb1-bb36-e17cdf00274c 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 97971c24-d425-4569-a7e3-ea4944d2a1d3 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0d46c794-1d42-423a-ad76-814940d6e781 298s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c410b415-9156-458e-bc82-ee4db099a631 298s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 298s =============================== warnings summary =============================== 298s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 298s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 298s /usr/lib/python3/dist-packages/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. 298s return LooseVersion(v) >= LooseVersion(check) 298s 298s ../../../usr/lib/python3/dist-packages/notebook/_tz.py:29: 1 warning 298s services/kernels/tests/test_kernels_api.py: 72 warnings 298s services/sessions/tests/test_sessions_api.py: 106 warnings 298s /usr/lib/python3/dist-packages/notebook/_tz.py:29: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). 298s dt = unaware(*args, **kwargs) 298s 298s ../../../usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14 298s /usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.integration_tests - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 298s pytestmark = pytest.mark.integration_tests 298s 298s services/kernels/tests/test_kernels_api.py: 6 warnings 298s services/sessions/tests/test_sessions_api.py: 6 warnings 298s /usr/lib/python3/dist-packages/nest_asyncio.py:71: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 298s policy = events.get_event_loop_policy() 298s 298s services/kernels/tests/test_kernels_api.py: 22 warnings 298s services/sessions/tests/test_sessions_api.py: 17 warnings 298s /usr/lib/python3/dist-packages/nest_asyncio.py:40: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 298s loop = events.get_event_loop_policy().get_event_loop() 298s 298s services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 298s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first 298s loop.make_current() 298s 298s services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 298s /usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py:78: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 298s def _create_kernel_manager_factory(self) -> t.Callable: 298s Enable tracemalloc to get traceback where the object was allocated. 298s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 298s 298s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 298s =========================== short test summary info ============================ 298s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_default_kernel 298s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_kernel_handler 298s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 298s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_no_kernels 298s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 298s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_default_kernel 298s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_kernel_handler 298s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 298s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_no_kernels 298s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 298s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_console_session 298s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_deprecated 298s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_file_session 298s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 298s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 298s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 298s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_type 298s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create 298s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_console_session 298s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_deprecated 298s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_file_session 298s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 298s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 298s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 298s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_type 298s ERROR services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 298s ERROR services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 298s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 298s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 298s ===== 25 failed, 2 passed, 303 deselected, 235 warnings, 4 errors in 9.10s ===== 299s *** END OF RUN 2: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 299s *** STARTING RUN 3: python3.14 -m pytest --pyargs notebook -rfE --last-failed --last-failed-no-failures none --ignore=/usr/lib/python3/dist-packages/notebook/tests/selenium --deselect=services/kernels/tests/test_kernels_api.py::KernelAPITest::test_connections 303s ============================= test session starts ============================== 303s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 303s rootdir: /tmp/autopkgtest.CmXq4V/autopkgtest_tmp 303s plugins: typeguard-4.4.4 303s collected 330 items / 305 deselected / 25 selected 303s run-last-failure: rerun previous 25 failures 303s 306s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF [ 36%] 308s services/sessions/tests/test_sessions_api.py FFFFFEFF.FFFFFEFF. [100%] 308s 308s ==================================== ERRORS ==================================== 308s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 308s 308s self = 308s 308s def tearDown(self): 308s for k in self.kern_api.list().json(): 308s > self.kern_api.shutdown(k['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/cccf4b01-9fca-47f3-835c-a5b90653a1cb 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 308s import functools 308s File "/usr/lib/python3.13/functools.py", line 18, in 308s from collections import namedtuple 308s File "/usr/lib/python3.13/collections/__init__.py", line 45, in 308s from _collections import deque 308s KeyboardInterrupt 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmptixae05t/runtime/kernel-cccf4b01-9fca-47f3-835c-a5b90653a1cb.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41367 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51579 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: cccf4b01-9fca-47f3-835c-a5b90653a1cb, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.740000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.590000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmptixae05t/runtime/kernel-6d3ceeb0-8e9a-4dae-a041-13378927dd59.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38607 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40661 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 6d3ceeb0-8e9a-4dae-a041-13378927dd59, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.840000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.530000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 6d3ceeb0-8e9a-4dae-a041-13378927dd59 308s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/6d3ceeb0-8e9a-4dae-a041-13378927dd59/interrupt (127.0.0.1) 2.600000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 308s yield maybe_future(km.restart_kernel(kernel_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 308s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 308s await ensure_async(kernel.restart_kernel(now=now)) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 308s await self._async_shutdown_kernel(now=now, restart=True) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/6d3ceeb0-8e9a-4dae-a041-13378927dd59/restart (127.0.0.1) 9.690000ms referer=None 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.610000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for cccf4b01-9fca-47f3-835c-a5b90653a1cb 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: cccf4b01-9fca-47f3-835c-a5b90653a1cb 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/cccf4b01-9fca-47f3-835c-a5b90653a1cb (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/cccf4b01-9fca-47f3-835c-a5b90653a1cb', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 308s yielded = ctx_run(next, result) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 308s yield maybe_future(km.shutdown_kernel(kernel_id)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/cccf4b01-9fca-47f3-835c-a5b90653a1cb (127.0.0.1) 11.070000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 308s from ipykernel import kernelapp as app 308s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 308s from .connect import * # noqa: F403 308s ^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 308s import jupyter_client 308s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 308s from .asynchronous import AsyncKernelClient 308s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 308s from .client import AsyncKernelClient # noqa 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 308s import zmq.asyncio 308s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 57, in 308s from zmq import sugar 308s File "/usr/lib/python3/dist-packages/zmq/sugar/__init__.py", line 11, in 308s from zmq.sugar import context, frame, poll, socket, tracker, version 308s File "/usr/lib/python3/dist-packages/zmq/sugar/context.py", line 23, in 308s from .socket import Socket, SyncSocket 308s File "/usr/lib/python3/dist-packages/zmq/sugar/socket.py", line 42, in 308s _SocketType = TypeVar("_SocketType", bound="Socket") 308s File "/usr/lib/python3.13/typing.py", line 191, in _type_check 308s arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) 308s File "/usr/lib/python3.13/typing.py", line 169, in _type_convert 308s return ForwardRef(arg, module=module, is_class=allow_special_forms) 308s File "/usr/lib/python3.13/typing.py", line 1035, in __init__ 308s code = compile(arg_to_compile, '', 'eval') 308s KeyboardInterrupt 308s _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 308s 308s self = 308s 308s def tearDown(self): 308s for k in self.kern_api.list().json(): 308s > self.kern_api.shutdown(k['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/2d4262d6-a130-4464-b876-18e806d162e1 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 308s import functools 308s File "/usr/lib/python3.13/functools.py", line 18, in 308s from collections import namedtuple 308s File "/usr/lib/python3.13/collections/__init__.py", line 38, in 308s from keyword import iskeyword as _iskeyword 308s File "", line 1360, in _find_and_load 308s File "", line 1322, in _find_and_load_unlocked 308s File "", line 1262, in _find_spec 308s File "", line 1556, in find_spec 308s File "", line 1530, in _get_spec 308s File "", line 1657, in find_spec 308s File "", line 133, in _path_join 308s KeyboardInterrupt 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmplv2kv115/runtime/kernel-2d4262d6-a130-4464-b876-18e806d162e1.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42727 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59093 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2d4262d6-a130-4464-b876-18e806d162e1, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.300000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.730000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmplv2kv115/runtime/kernel-9c453cf7-bf71-4e88-a5ab-b74c5383600c.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46123 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38327 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9c453cf7-bf71-4e88-a5ab-b74c5383600c, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.820000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.720000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 9c453cf7-bf71-4e88-a5ab-b74c5383600c 308s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/9c453cf7-bf71-4e88-a5ab-b74c5383600c/interrupt (127.0.0.1) 1.890000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 308s yield maybe_future(km.restart_kernel(kernel_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 308s result = coro.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 308s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 308s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 308s yield self # This tells Task to wait for completion. 308s ^^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 308s future.result() 308s ~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 308s await ensure_async(kernel.restart_kernel(now=now)) 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 308s await self._async_shutdown_kernel(now=now, restart=True) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/9c453cf7-bf71-4e88-a5ab-b74c5383600c/restart (127.0.0.1) 8.300000ms referer=None 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.660000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2d4262d6-a130-4464-b876-18e806d162e1 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d4262d6-a130-4464-b876-18e806d162e1 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/2d4262d6-a130-4464-b876-18e806d162e1 (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/2d4262d6-a130-4464-b876-18e806d162e1', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 308s future.result() 308s ~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 308s yield maybe_future(km.shutdown_kernel(kernel_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 308s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 308s raise km.ready.exception() # type: ignore[misc] 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/2d4262d6-a130-4464-b876-18e806d162e1 (127.0.0.1) 9.820000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 308s from ipykernel import kernelapp as app 308s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 308s from .connect import * # noqa: F403 308s ^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 308s import jupyter_client 308s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 308s from .asynchronous import AsyncKernelClient 308s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 308s from .client import AsyncKernelClient # noqa 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 308s import zmq.asyncio 308s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 57, in 308s from zmq import sugar 308s File "/usr/lib/python3/dist-packages/zmq/sugar/__init__.py", line 11, in 308s from zmq.sugar import context, frame, poll, socket, tracker, version 308s File "/usr/lib/python3/dist-packages/zmq/sugar/context.py", line 8, in 308s import atexit 308s File "", line 1357, in _find_and_load 308s File "", line 417, in __enter__ 308s File "", line 443, in _get_module_lock 308s File "", line 232, in __init__ 308s KeyboardInterrupt 308s ________ ERROR at teardown of SessionAPITest.test_create_with_kernel_id ________ 308s 308s @self.addCleanup 308s def cleanup_sessions(): 308s for session in self.sess_api.list().json(): 308s > self.sess_api.delete(session['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkt2g9pbq/runtime/kernel-51d8130e-5ca6-4ede-b488-c3a73d8aa64d.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39023 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33859 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 51d8130e-5ca6-4ede-b488-c3a73d8aa64d, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.820000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.990000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.740000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.780000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 43d0da2c-a42e-4c39-9050-dd3b4b8e993c 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 43d0da2c-a42e-4c39-9050-dd3b4b8e993c 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/f75cf1c4-11fb-4a5e-9cd6-680c23cd1fd7 (127.0.0.1) 2.760000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 51d8130e-5ca6-4ede-b488-c3a73d8aa64d 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 51d8130e-5ca6-4ede-b488-c3a73d8aa64d 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 308s yielded = self.gen.send(value) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 11.900000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 308s from ipykernel import kernelapp as app 308s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 308s from .connect import * # noqa: F403 308s ^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 308s from subprocess import PIPE, Popen 308s File "/usr/lib/python3.13/subprocess.py", line 125, in 308s import selectors 308s File "/usr/lib/python3.13/selectors.py", line 596, in 308s elif _can_use('epoll'): 308s ~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.13/selectors.py", line 579, in _can_use 308s selector_obj = selector() 308s KeyboardInterrupt 308s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_kernel_id ______ 308s 308s @self.addCleanup 308s def cleanup_sessions(): 308s for session in self.sess_api.list().json(): 308s > self.sess_api.delete(session['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqdxsy9nw/runtime/kernel-abfd4f4a-2d85-4fe8-a50f-da1dea1e638c.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42697 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35845 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: abfd4f4a-2d85-4fe8-a50f-da1dea1e638c, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.810000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.960000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.860000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.660000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8b0b6f62-47d8-457e-90b1-204fb2648e0b 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8b0b6f62-47d8-457e-90b1-204fb2648e0b 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/c6b09b4e-567d-439b-8bd8-b850d65566f6 (127.0.0.1) 3.320000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for abfd4f4a-2d85-4fe8-a50f-da1dea1e638c 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: abfd4f4a-2d85-4fe8-a50f-da1dea1e638c 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 308s future.result() 308s ~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 308s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 308s raise km.ready.exception() # type: ignore[misc] 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 10.450000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 308s from ipykernel import kernelapp as app 308s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 308s from .connect import * # noqa: F403 308s ^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 308s from subprocess import PIPE, Popen 308s File "/usr/lib/python3.13/subprocess.py", line 46, in 308s import locale 308s File "/usr/lib/python3.13/locale.py", line 47, in 308s from _locale import * 308s KeyboardInterrupt 308s =================================== FAILURES =================================== 308s ______________________ KernelAPITest.test_default_kernel _______________________ 308s 308s self = 308s 308s def tearDown(self): 308s for k in self.kern_api.list().json(): 308s > self.kern_api.shutdown(k['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/716e3ec7-a253-48f9-8c1f-f0686709a2ba 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ------------------------------ Captured log setup ------------------------------ 308s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmptixae05t/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmptixae05t/etc/jupyter'] for config files 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmptixae05t/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmptixae05t/config 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmptixae05t/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmptixae05t/config 308s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmptixae05t/notebooks 308s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 308s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 308s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 308s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 308s WARNING NotebookApp:handlers.py:612 Forbidden 308s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 3.120000ms referer=None 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmptixae05t/runtime/kernel-716e3ec7-a253-48f9-8c1f-f0686709a2ba.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59059 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40621 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 716e3ec7-a253-48f9-8c1f-f0686709a2ba, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 87.180000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.270000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 716e3ec7-a253-48f9-8c1f-f0686709a2ba 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 716e3ec7-a253-48f9-8c1f-f0686709a2ba 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/716e3ec7-a253-48f9-8c1f-f0686709a2ba (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/716e3ec7-a253-48f9-8c1f-f0686709a2ba', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 308s yielded = ctx_run(next, result) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 308s yield maybe_future(km.shutdown_kernel(kernel_id)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/716e3ec7-a253-48f9-8c1f-f0686709a2ba (127.0.0.1) 15.710000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 308s from glob import _Globber, _no_recurse_symlinks 308s File "/usr/lib/python3.13/glob.py", line 5, in 308s import re 308s File "/usr/lib/python3.13/re/__init__.py", line 315, in 308s Pattern = type(_compiler.compile('', 0)) 308s ~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 308s code = _code(p, flags) 308s File "/usr/lib/python3.13/re/_compiler.py", line 576, in _code 308s def _code(p, flags): 308s 308s KeyboardInterrupt 308s ______________________ KernelAPITest.test_kernel_handler _______________________ 308s 308s self = 308s 308s def test_kernel_handler(self): 308s # GET kernel with given id 308s kid = self.kern_api.start().json()['id'] 308s r = self.kern_api.get(kid) 308s kern1 = r.json() 308s self.assertEqual(r.status_code, 200) 308s assert isinstance(kern1, dict) 308s self.assertIn('id', kern1) 308s self.assertEqual(kern1['id'], kid) 308s 308s # Request a bad kernel id and check that a JSON 308s # message is returned! 308s bad_id = '111-111-111-111-111' 308s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 308s self.kern_api.get(bad_id) 308s 308s # DELETE kernel with id 308s > r = self.kern_api.shutdown(kid) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/aa7b24e0-294a-4628-aa51-d0752b9e0e23 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 308s from glob import _Globber, _no_recurse_symlinks 308s File "/usr/lib/python3.13/glob.py", line 5, in 308s import re 308s File "/usr/lib/python3.13/re/__init__.py", line 126, in 308s from . import _compiler, _parser 308s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 308s from . import _parser 308s File "/usr/lib/python3.13/re/_parser.py", line 15, in 308s from ._constants import * 308s File "/usr/lib/python3.13/re/_constants.py", line 23, in 308s class PatternError(Exception): 308s ...<29 lines>... 308s super().__init__(msg) 308s File "/usr/lib/python3.13/re/_constants.py", line 23, in PatternError 308s class PatternError(Exception): 308s 308s KeyboardInterrupt 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmptixae05t/runtime/kernel-aa7b24e0-294a-4628-aa51-d0752b9e0e23.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45773 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51881 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: aa7b24e0-294a-4628-aa51-d0752b9e0e23, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.130000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/aa7b24e0-294a-4628-aa51-d0752b9e0e23 (127.0.0.1) 1.750000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 308s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 308s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 1.950000ms referer=None 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for aa7b24e0-294a-4628-aa51-d0752b9e0e23 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: aa7b24e0-294a-4628-aa51-d0752b9e0e23 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/aa7b24e0-294a-4628-aa51-d0752b9e0e23 (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/aa7b24e0-294a-4628-aa51-d0752b9e0e23', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 308s yielded = ctx_run(next, result) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 308s yield maybe_future(km.shutdown_kernel(kernel_id)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/aa7b24e0-294a-4628-aa51-d0752b9e0e23 (127.0.0.1) 11.510000ms referer=None 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.650000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 716e3ec7-a253-48f9-8c1f-f0686709a2ba 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 716e3ec7-a253-48f9-8c1f-f0686709a2ba 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/716e3ec7-a253-48f9-8c1f-f0686709a2ba (127.0.0.1) 2.580000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for aa7b24e0-294a-4628-aa51-d0752b9e0e23 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: aa7b24e0-294a-4628-aa51-d0752b9e0e23 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/aa7b24e0-294a-4628-aa51-d0752b9e0e23 (127.0.0.1) 2.620000ms 308s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 308s 308s self = 308s 308s def test_main_kernel_handler(self): 308s # POST request 308s r = self.kern_api.start() 308s kern1 = r.json() 308s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 308s self.assertEqual(r.status_code, 201) 308s self.assertIsInstance(kern1, dict) 308s 308s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 308s expected_csp = '; '.join([ 308s "frame-ancestors 'self'", 308s 'report-uri ' + report_uri, 308s "default-src 'none'" 308s ]) 308s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 308s 308s # GET request 308s r = self.kern_api.list() 308s self.assertEqual(r.status_code, 200) 308s assert isinstance(r.json(), list) 308s self.assertEqual(r.json()[0]['id'], kern1['id']) 308s self.assertEqual(r.json()[0]['name'], kern1['name']) 308s 308s # create another kernel and check that they both are added to the 308s # list of kernels from a GET request 308s kern2 = self.kern_api.start().json() 308s assert isinstance(kern2, dict) 308s r = self.kern_api.list() 308s kernels = r.json() 308s self.assertEqual(r.status_code, 200) 308s assert isinstance(kernels, list) 308s self.assertEqual(len(kernels), 2) 308s 308s # Interrupt a kernel 308s r = self.kern_api.interrupt(kern2['id']) 308s self.assertEqual(r.status_code, 204) 308s 308s # Restart a kernel 308s > r = self.kern_api.restart(kern2['id']) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 308s return self._req('POST', url_path_join(id, 'restart')) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/6d3ceeb0-8e9a-4dae-a041-13378927dd59/restart 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 308s import functools 308s File "/usr/lib/python3.13/functools.py", line 18, in 308s from collections import namedtuple 308s File "/usr/lib/python3.13/collections/__init__.py", line 45, in 308s from _collections import deque 308s KeyboardInterrupt 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmptixae05t/runtime/kernel-cccf4b01-9fca-47f3-835c-a5b90653a1cb.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41367 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51579 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: cccf4b01-9fca-47f3-835c-a5b90653a1cb, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.740000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.590000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmptixae05t/runtime/kernel-6d3ceeb0-8e9a-4dae-a041-13378927dd59.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38607 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40661 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 6d3ceeb0-8e9a-4dae-a041-13378927dd59, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.840000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.530000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 6d3ceeb0-8e9a-4dae-a041-13378927dd59 308s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/6d3ceeb0-8e9a-4dae-a041-13378927dd59/interrupt (127.0.0.1) 2.600000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 308s yield maybe_future(km.restart_kernel(kernel_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 308s gc.collect() 308s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 308s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 308s await ensure_async(kernel.restart_kernel(now=now)) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 308s await self._async_shutdown_kernel(now=now, restart=True) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/6d3ceeb0-8e9a-4dae-a041-13378927dd59/restart (127.0.0.1) 9.690000ms referer=None 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.610000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for cccf4b01-9fca-47f3-835c-a5b90653a1cb 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: cccf4b01-9fca-47f3-835c-a5b90653a1cb 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/cccf4b01-9fca-47f3-835c-a5b90653a1cb (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/cccf4b01-9fca-47f3-835c-a5b90653a1cb', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 308s yielded = ctx_run(next, result) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 308s yield maybe_future(km.shutdown_kernel(kernel_id)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/cccf4b01-9fca-47f3-835c-a5b90653a1cb (127.0.0.1) 11.070000ms referer=None 308s ________________________ KernelAPITest.test_no_kernels _________________________ 308s 308s self = 308s 308s def test_no_kernels(self): 308s """Make sure there are no kernels running at the start""" 308s kernels = self.kern_api.list().json() 308s > self.assertEqual(kernels, []) 308s E AssertionError: Lists differ: [{'id': 'cccf4b01-9fca-47f3-835c-a5b90653a[281 chars]: 0}] != [] 308s E 308s E First list contains 2 additional elements. 308s E First extra element 0: 308s E {'id': 'cccf4b01-9fca-47f3-835c-a5b90653a1cb', 'name': 'python3', 'last_activity': '2026-01-24T03:34:03.658494Z', 'execution_state': 'starting', 'connections': 0} 308s E 308s E + [] 308s E - [{'connections': 0, 308s E - 'execution_state': 'starting', 308s E - 'id': 'cccf4b01-9fca-47f3-835c-a5b90653a1cb', 308s E - 'last_activity': '2026-01-24T03:34:03.658494Z', 308s E - 'name': 'python3'}, 308s E - {'connections': 0, 308s E - 'execution_state': 'starting', 308s E - 'id': '6d3ceeb0-8e9a-4dae-a041-13378927dd59', 308s E - 'last_activity': '2026-01-24T03:34:03.690917Z', 308s E - 'name': 'python3'}] 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.610000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.530000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for cccf4b01-9fca-47f3-835c-a5b90653a1cb 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: cccf4b01-9fca-47f3-835c-a5b90653a1cb 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/cccf4b01-9fca-47f3-835c-a5b90653a1cb (127.0.0.1) 2.680000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 6d3ceeb0-8e9a-4dae-a041-13378927dd59 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6d3ceeb0-8e9a-4dae-a041-13378927dd59 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/6d3ceeb0-8e9a-4dae-a041-13378927dd59 (127.0.0.1) 2.620000ms 308s ---------------------------- Captured log teardown ----------------------------- 308s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 308s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 308s _____________________ AsyncKernelAPITest.test_connections ______________________ 308s 308s self = 308s 308s def tearDown(self): 308s for k in self.kern_api.list().json(): 308s > self.kern_api.shutdown(k['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ------------------------------ Captured log setup ------------------------------ 308s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmplv2kv115/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmplv2kv115/etc/jupyter'] for config files 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmplv2kv115/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmplv2kv115/config 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmplv2kv115/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmplv2kv115/config 308s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmplv2kv115/notebooks 308s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 308s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 308s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 308s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 308s WARNING NotebookApp:handlers.py:612 Forbidden 308s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.380000ms referer=None 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmplv2kv115/runtime/kernel-3432e6f5-0b26-4ef6-b0d0-3a86642e64b1.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41251 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54093 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.230000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 (127.0.0.1) 1.670000ms 308s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1/channels 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 308s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56889 308s DEBUG NotebookApp:kernelmanager.py:423 activity on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1: status (starting) 308s DEBUG NotebookApp:kernelmanager.py:423 activity on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1: status (busy) 308s DEBUG NotebookApp:kernelmanager.py:423 activity on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1: status (idle) 308s DEBUG NotebookApp:handlers.py:306 Received kernel info: {'status': 'ok', 'protocol_version': '5.3', 'implementation': 'ipython', 'implementation_version': '8.35.0', 'language_info': {'name': 'python', 'version': '3.13.11', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': "Python 3.13.11 (main, Dec 6 2025, 13:15:20) [GCC 15.2.0]\nType 'copyright', 'credits' or 'license' for more information\nIPython 8.35.0 -- An enhanced Interactive Python. Type '?' for help.\n", 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.13'}, {'text': 'IPython Reference', 'url': 'https://ipython.org/documentation.html'}, {'text': 'NumPy Reference', 'url': 'https://docs.scipy.org/doc/numpy/reference/'}, {'text': 'SciPy Reference', 'url': 'https://docs.scipy.org/doc/scipy/reference/'}, {'text': 'Matplotlib Reference', 'url': 'https://matplotlib.org/contents.html'}, {'text': 'SymPy Reference', 'url': 'http://docs.sympy.org/latest/index.html'}, {'text': 'pandas Reference', 'url': 'https://pandas.pydata.org/pandas-docs/stable/'}]} 308s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1) to 5.4 (client). 308s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1/channels (127.0.0.1) 899.740000ms 308s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1/channels 308s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54093 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56889 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41251 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46609 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56889 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41251 308s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 308s Setting websocket_ping_timeout=30000 308s DEBUG NotebookApp:handlers.py:255 Nudge: attempt 1 on kernel 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 (127.0.0.1) 1.730000ms 308s DEBUG NotebookApp:kernelmanager.py:423 activity on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1: status (busy) 308s DEBUG NotebookApp:kernelmanager.py:423 activity on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1: status (busy) 308s DEBUG NotebookApp:handlers.py:207 Nudge: IOPub received: 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:handlers.py:210 Nudge: resolving iopub future: 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:kernelmanager.py:423 activity on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1: status (idle) 308s DEBUG NotebookApp:kernelmanager.py:423 activity on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1: status (idle) 308s DEBUG NotebookApp:handlers.py:195 Nudge: shell info reply received: 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:handlers.py:197 Nudge: resolving shell future: 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:handlers.py:201 Nudge: control info reply received: 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:handlers.py:579 Websocket closed 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1:0657a373-5ca370eea4c9b64e7ef69304 308s INFO NotebookApp:kernelmanager.py:222 Starting buffering for 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1:0657a373-5ca370eea4c9b64e7ef69304 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1:iopub 308s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1:iopub 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1:iopub 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 (127.0.0.1) 2.150000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 (127.0.0.1) 1.650000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.710000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s INFO NotebookApp:kernelmanager.py:286 Discarding 3 buffered messages for 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1:0657a373-5ca370eea4c9b64e7ef69304 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 308s future.result() 308s ~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 308s yield maybe_future(km.shutdown_kernel(kernel_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 308s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 308s raise km.ready.exception() # type: ignore[misc] 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 (127.0.0.1) 11.080000ms referer=None 308s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 308s 308s self = 308s 308s def tearDown(self): 308s for k in self.kern_api.list().json(): 308s > self.kern_api.shutdown(k['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/a0e361b2-5a4d-4e63-a15f-60c70a6435f6 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmplv2kv115/runtime/kernel-a0e361b2-5a4d-4e63-a15f-60c70a6435f6.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47117 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53219 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: a0e361b2-5a4d-4e63-a15f-60c70a6435f6, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.990000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.610000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 (127.0.0.1) 1.920000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a0e361b2-5a4d-4e63-a15f-60c70a6435f6 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a0e361b2-5a4d-4e63-a15f-60c70a6435f6 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/a0e361b2-5a4d-4e63-a15f-60c70a6435f6 (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/a0e361b2-5a4d-4e63-a15f-60c70a6435f6', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 308s future.result() 308s ~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 308s yield maybe_future(km.shutdown_kernel(kernel_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 308s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 308s raise km.ready.exception() # type: ignore[misc] 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/a0e361b2-5a4d-4e63-a15f-60c70a6435f6 (127.0.0.1) 9.630000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 308s from glob import _Globber, _no_recurse_symlinks 308s File "/usr/lib/python3.13/glob.py", line 5, in 308s import re 308s File "/usr/lib/python3.13/re/__init__.py", line 126, in 308s from . import _compiler, _parser 308s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 308s from . import _parser 308s File "/usr/lib/python3.13/re/_parser.py", line 15, in 308s from ._constants import * 308s File "", line 1360, in _find_and_load 308s File "", line 1331, in _find_and_load_unlocked 308s File "", line 935, in _load_unlocked 308s File "", line 1019, in exec_module 308s File "", line 1152, in get_code 308s File "", line 781, in _compile_bytecode 308s KeyboardInterrupt 308s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 308s 308s self = 308s 308s def test_kernel_handler(self): 308s # GET kernel with given id 308s kid = self.kern_api.start().json()['id'] 308s r = self.kern_api.get(kid) 308s kern1 = r.json() 308s self.assertEqual(r.status_code, 200) 308s assert isinstance(kern1, dict) 308s self.assertIn('id', kern1) 308s self.assertEqual(kern1['id'], kid) 308s 308s # Request a bad kernel id and check that a JSON 308s # message is returned! 308s bad_id = '111-111-111-111-111' 308s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 308s self.kern_api.get(bad_id) 308s 308s # DELETE kernel with id 308s > r = self.kern_api.shutdown(kid) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/62c01077-5398-4807-8244-9a5f2f873295 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s File "", line 1513, in _path_importer_cache 308s KeyError: '/usr/lib/python3.13/re' 308s 308s During handling of the above exception, another exception occurred: 308s 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 308s from glob import _Globber, _no_recurse_symlinks 308s File "/usr/lib/python3.13/glob.py", line 5, in 308s import re 308s File "/usr/lib/python3.13/re/__init__.py", line 126, in 308s from . import _compiler, _parser 308s File "", line 1360, in _find_and_load 308s File "", line 1322, in _find_and_load_unlocked 308s File "", line 1262, in _find_spec 308s File "", line 1556, in find_spec 308s File "", line 1528, in _get_spec 308s File "", line 1515, in _path_importer_cache 308s File "", line 1491, in _path_hooks 308s File "", line 79, in __init__ 308s File "", line 152, in _path_stat 308s KeyboardInterrupt 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmplv2kv115/runtime/kernel-62c01077-5398-4807-8244-9a5f2f873295.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49441 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37583 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 62c01077-5398-4807-8244-9a5f2f873295, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.230000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/62c01077-5398-4807-8244-9a5f2f873295 (127.0.0.1) 1.780000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 308s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 308s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 1.810000ms referer=None 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 62c01077-5398-4807-8244-9a5f2f873295 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 62c01077-5398-4807-8244-9a5f2f873295 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/62c01077-5398-4807-8244-9a5f2f873295 (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/62c01077-5398-4807-8244-9a5f2f873295', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 308s future.result() 308s ~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 308s yield maybe_future(km.shutdown_kernel(kernel_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 308s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 308s raise km.ready.exception() # type: ignore[misc] 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/62c01077-5398-4807-8244-9a5f2f873295 (127.0.0.1) 10.200000ms referer=None 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.690000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a0e361b2-5a4d-4e63-a15f-60c70a6435f6 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a0e361b2-5a4d-4e63-a15f-60c70a6435f6 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/a0e361b2-5a4d-4e63-a15f-60c70a6435f6 (127.0.0.1) 1.840000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 62c01077-5398-4807-8244-9a5f2f873295 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 62c01077-5398-4807-8244-9a5f2f873295 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/62c01077-5398-4807-8244-9a5f2f873295 (127.0.0.1) 2.840000ms 308s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 308s 308s self = 308s 308s def test_main_kernel_handler(self): 308s # POST request 308s r = self.kern_api.start() 308s kern1 = r.json() 308s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 308s self.assertEqual(r.status_code, 201) 308s self.assertIsInstance(kern1, dict) 308s 308s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 308s expected_csp = '; '.join([ 308s "frame-ancestors 'self'", 308s 'report-uri ' + report_uri, 308s "default-src 'none'" 308s ]) 308s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 308s 308s # GET request 308s r = self.kern_api.list() 308s self.assertEqual(r.status_code, 200) 308s assert isinstance(r.json(), list) 308s self.assertEqual(r.json()[0]['id'], kern1['id']) 308s self.assertEqual(r.json()[0]['name'], kern1['name']) 308s 308s # create another kernel and check that they both are added to the 308s # list of kernels from a GET request 308s kern2 = self.kern_api.start().json() 308s assert isinstance(kern2, dict) 308s r = self.kern_api.list() 308s kernels = r.json() 308s self.assertEqual(r.status_code, 200) 308s assert isinstance(kernels, list) 308s self.assertEqual(len(kernels), 2) 308s 308s # Interrupt a kernel 308s r = self.kern_api.interrupt(kern2['id']) 308s self.assertEqual(r.status_code, 204) 308s 308s # Restart a kernel 308s > r = self.kern_api.restart(kern2['id']) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 308s return self._req('POST', url_path_join(id, 'restart')) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/9c453cf7-bf71-4e88-a5ab-b74c5383600c/restart 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 308s import functools 308s File "/usr/lib/python3.13/functools.py", line 18, in 308s from collections import namedtuple 308s File "/usr/lib/python3.13/collections/__init__.py", line 38, in 308s from keyword import iskeyword as _iskeyword 308s File "", line 1360, in _find_and_load 308s File "", line 1322, in _find_and_load_unlocked 308s File "", line 1262, in _find_spec 308s File "", line 1556, in find_spec 308s File "", line 1530, in _get_spec 308s File "", line 1657, in find_spec 308s File "", line 133, in _path_join 308s KeyboardInterrupt 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmplv2kv115/runtime/kernel-2d4262d6-a130-4464-b876-18e806d162e1.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42727 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59093 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2d4262d6-a130-4464-b876-18e806d162e1, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.300000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.730000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmplv2kv115/runtime/kernel-9c453cf7-bf71-4e88-a5ab-b74c5383600c.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46123 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38327 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9c453cf7-bf71-4e88-a5ab-b74c5383600c, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 19.820000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.720000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 9c453cf7-bf71-4e88-a5ab-b74c5383600c 308s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/9c453cf7-bf71-4e88-a5ab-b74c5383600c/interrupt (127.0.0.1) 1.890000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 308s yield maybe_future(km.restart_kernel(kernel_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 308s result = coro.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 308s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 308s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 308s yield self # This tells Task to wait for completion. 308s ^^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 308s future.result() 308s ~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 308s await ensure_async(kernel.restart_kernel(now=now)) 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 308s await self._async_shutdown_kernel(now=now, restart=True) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/9c453cf7-bf71-4e88-a5ab-b74c5383600c/restart (127.0.0.1) 8.300000ms referer=None 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.660000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2d4262d6-a130-4464-b876-18e806d162e1 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d4262d6-a130-4464-b876-18e806d162e1 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/2d4262d6-a130-4464-b876-18e806d162e1 (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/2d4262d6-a130-4464-b876-18e806d162e1', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 308s future.result() 308s ~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 308s yield maybe_future(km.shutdown_kernel(kernel_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 308s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 308s raise km.ready.exception() # type: ignore[misc] 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/2d4262d6-a130-4464-b876-18e806d162e1 (127.0.0.1) 9.820000ms referer=None 308s ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 308s 308s self = 308s 308s def test_no_kernels(self): 308s """Make sure there are no kernels running at the start""" 308s kernels = self.kern_api.list().json() 308s > self.assertEqual(kernels, []) 308s E AssertionError: Lists differ: [{'id': '2d4262d6-a130-4464-b876-18e806d16[281 chars]: 0}] != [] 308s E 308s E First list contains 2 additional elements. 308s E First extra element 0: 308s E {'id': '2d4262d6-a130-4464-b876-18e806d162e1', 'name': 'python3', 'last_activity': '2026-01-24T03:34:05.180835Z', 'execution_state': 'starting', 'connections': 0} 308s E 308s E + [] 308s E - [{'connections': 0, 308s E - 'execution_state': 'starting', 308s E - 'id': '2d4262d6-a130-4464-b876-18e806d162e1', 308s E - 'last_activity': '2026-01-24T03:34:05.180835Z', 308s E - 'name': 'python3'}, 308s E - {'connections': 0, 308s E - 'execution_state': 'starting', 308s E - 'id': '9c453cf7-bf71-4e88-a5ab-b74c5383600c', 308s E - 'last_activity': '2026-01-24T03:34:05.211469Z', 308s E - 'name': 'python3'}] 308s 308s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.730000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.860000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2d4262d6-a130-4464-b876-18e806d162e1 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d4262d6-a130-4464-b876-18e806d162e1 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/2d4262d6-a130-4464-b876-18e806d162e1 (127.0.0.1) 1.860000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9c453cf7-bf71-4e88-a5ab-b74c5383600c 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9c453cf7-bf71-4e88-a5ab-b74c5383600c 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/9c453cf7-bf71-4e88-a5ab-b74c5383600c (127.0.0.1) 2.000000ms 308s ---------------------------- Captured log teardown ----------------------------- 308s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d4262d6-a130-4464-b876-18e806d162e1 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 62c01077-5398-4807-8244-9a5f2f873295 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3432e6f5-0b26-4ef6-b0d0-3a86642e64b1 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a0e361b2-5a4d-4e63-a15f-60c70a6435f6 308s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 308s __________________________ SessionAPITest.test_create __________________________ 308s 308s @self.addCleanup 308s def cleanup_sessions(): 308s for session in self.sess_api.list().json(): 308s > self.sess_api.delete(session['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/92a21fbb-b056-4f09-a126-78b7afdbf986 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ------------------------------ Captured log setup ------------------------------ 308s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpkt2g9pbq/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpkt2g9pbq/etc/jupyter'] for config files 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpkt2g9pbq/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpkt2g9pbq/config 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpkt2g9pbq/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpkt2g9pbq/config 308s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpkt2g9pbq/notebooks 308s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 308s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 308s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 308s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 308s WARNING NotebookApp:handlers.py:612 Forbidden 308s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.300000ms referer=None 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 308s from ipykernel import kernelapp as app 308s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 308s from .connect import * # noqa: F403 308s ^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 308s from subprocess import PIPE, Popen 308s File "", line 1360, in _find_and_load 308s File "", line 1331, in _find_and_load_unlocked 308s File "", line 935, in _load_unlocked 308s File "", line 1019, in exec_module 308s File "", line 1152, in get_code 308s File "", line 781, in _compile_bytecode 308s KeyboardInterrupt 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.160000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkt2g9pbq/runtime/kernel-b4df534c-45d0-433e-bb27-0a8f57a861ee.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55493 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43693 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: b4df534c-45d0-433e-bb27-0a8f57a861ee, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpkt2g9pbq/notebooks/foo'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 32.210000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.760000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/92a21fbb-b056-4f09-a126-78b7afdbf986 (127.0.0.1) 1.800000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.790000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for b4df534c-45d0-433e-bb27-0a8f57a861ee 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b4df534c-45d0-433e-bb27-0a8f57a861ee 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/92a21fbb-b056-4f09-a126-78b7afdbf986 (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/92a21fbb-b056-4f09-a126-78b7afdbf986', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 308s yielded = self.gen.send(value) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/92a21fbb-b056-4f09-a126-78b7afdbf986 (127.0.0.1) 13.290000ms referer=None 308s __________________ SessionAPITest.test_create_console_session __________________ 308s 308s @self.addCleanup 308s def cleanup_sessions(): 308s for session in self.sess_api.list().json(): 308s > self.sess_api.delete(session['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/19b05e72-d33a-4232-8a14-858f1203b4ad 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkt2g9pbq/runtime/kernel-97bc16b9-eeab-42ec-9e4b-60ad68f27ff9.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42531 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37337 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 97bc16b9-eeab-42ec-9e4b-60ad68f27ff9, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpkt2g9pbq/notebooks/foo'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 25.340000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.850000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for b4df534c-45d0-433e-bb27-0a8f57a861ee 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b4df534c-45d0-433e-bb27-0a8f57a861ee 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/92a21fbb-b056-4f09-a126-78b7afdbf986 (127.0.0.1) 2.960000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 97bc16b9-eeab-42ec-9e4b-60ad68f27ff9 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 97bc16b9-eeab-42ec-9e4b-60ad68f27ff9 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/19b05e72-d33a-4232-8a14-858f1203b4ad (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/19b05e72-d33a-4232-8a14-858f1203b4ad', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 308s yielded = self.gen.send(value) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/19b05e72-d33a-4232-8a14-858f1203b4ad (127.0.0.1) 12.230000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 308s from ._local import * 308s File "/usr/lib/python3.13/pathlib/_local.py", line 6, in 308s import warnings 308s File "", line 1360, in _find_and_load 308s File "", line 1331, in _find_and_load_unlocked 308s File "", line 935, in _load_unlocked 308s File "", line 1019, in exec_module 308s File "", line 1152, in get_code 308s File "", line 781, in _compile_bytecode 308s KeyboardInterrupt 308s ____________________ SessionAPITest.test_create_deprecated _____________________ 308s 308s @self.addCleanup 308s def cleanup_sessions(): 308s for session in self.sess_api.list().json(): 308s > self.sess_api.delete(session['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/2c4d0d62-06a0-47f8-a524-0beb03d1e22e 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkt2g9pbq/runtime/kernel-f461d49f-34a6-4012-82cc-8497ab15be9d.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56001 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50987 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: f461d49f-34a6-4012-82cc-8497ab15be9d, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpkt2g9pbq/notebooks/foo'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 23.560000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.770000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 97bc16b9-eeab-42ec-9e4b-60ad68f27ff9 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 97bc16b9-eeab-42ec-9e4b-60ad68f27ff9 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/19b05e72-d33a-4232-8a14-858f1203b4ad (127.0.0.1) 2.830000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f461d49f-34a6-4012-82cc-8497ab15be9d 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f461d49f-34a6-4012-82cc-8497ab15be9d 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/2c4d0d62-06a0-47f8-a524-0beb03d1e22e (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/2c4d0d62-06a0-47f8-a524-0beb03d1e22e', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 308s yielded = self.gen.send(value) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/2c4d0d62-06a0-47f8-a524-0beb03d1e22e (127.0.0.1) 12.150000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 308s from ._local import * 308s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 308s class PureWindowsPath(PurePath): 308s ...<7 lines>... 308s __slots__ = () 308s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 308s import ntpath 308s File "/usr/lib/python3.13/ntpath.py", line 45, in 308s from _winapi import ( 308s ...<2 lines>... 308s LCMAP_LOWERCASE as _LCMAP_LOWERCASE) 308s File "", line 1360, in _find_and_load 308s File "", line 1322, in _find_and_load_unlocked 308s File "", line 1262, in _find_spec 308s File "", line 1556, in find_spec 308s File "", line 1530, in _get_spec 308s File "", line 1629, in find_spec 308s File "", line 152, in _path_stat 308s KeyboardInterrupt 308s ___________________ SessionAPITest.test_create_file_session ____________________ 308s 308s @self.addCleanup 308s def cleanup_sessions(): 308s for session in self.sess_api.list().json(): 308s > self.sess_api.delete(session['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f75cf1c4-11fb-4a5e-9cd6-680c23cd1fd7 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkt2g9pbq/runtime/kernel-43d0da2c-a42e-4c39-9050-dd3b4b8e993c.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50109 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51769 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 43d0da2c-a42e-4c39-9050-dd3b4b8e993c, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpkt2g9pbq/notebooks/foo'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 23.830000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.810000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f461d49f-34a6-4012-82cc-8497ab15be9d 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f461d49f-34a6-4012-82cc-8497ab15be9d 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/2c4d0d62-06a0-47f8-a524-0beb03d1e22e (127.0.0.1) 2.750000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 43d0da2c-a42e-4c39-9050-dd3b4b8e993c 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 43d0da2c-a42e-4c39-9050-dd3b4b8e993c 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f75cf1c4-11fb-4a5e-9cd6-680c23cd1fd7 (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f75cf1c4-11fb-4a5e-9cd6-680c23cd1fd7', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 308s yielded = self.gen.send(value) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f75cf1c4-11fb-4a5e-9cd6-680c23cd1fd7 (127.0.0.1) 11.930000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 308s from glob import _Globber, _no_recurse_symlinks 308s File "/usr/lib/python3.13/glob.py", line 6, in 308s import fnmatch 308s File "", line 1360, in _find_and_load 308s File "", line 1331, in _find_and_load_unlocked 308s File "", line 935, in _load_unlocked 308s File "", line 1019, in exec_module 308s File "", line 1115, in get_code 308s File "", line 1214, in get_data 308s KeyboardInterrupt 308s __________________ SessionAPITest.test_create_with_kernel_id ___________________ 308s 308s self = 308s 308s def test_create_with_kernel_id(self): 308s # create a new kernel 308s r = self.request('POST', 'api/kernels') 308s r.raise_for_status() 308s kernel = r.json() 308s 308s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 308s self.assertEqual(resp.status_code, 201) 308s newsession = resp.json() 308s self.assertIn('id', newsession) 308s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 308s self.assertEqual(newsession['kernel']['id'], kernel['id']) 308s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 308s 308s sessions = self.sess_api.list().json() 308s > self.assertEqual(sessions, [newsession]) 308s E AssertionError: Lists differ: [{'id': 'f75cf1c4-11fb-4a5e-9cd6-680c23cd1fd7', 'p[553 chars]ne}}] != [{'id': '693da6aa-f89a-409d-8055-3bc2a6bc076f', 'p[279 chars]ne}}] 308s E 308s E First differing element 0: 308s E {'id': 'f75cf1c4-11fb-4a5e-9cd6-680c23cd1fd7', 'p[218 chars]: 0}} 308s E {'id': '693da6aa-f89a-409d-8055-3bc2a6bc076f', 'p[278 chars]one}} 308s E 308s E First list contains 1 additional elements. 308s E First extra element 1: 308s E {'id': '693da6aa-f89a-409d-8055-3bc2a6bc076f', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '51d8130e-5ca6-4ede-b488-c3a73d8aa64d', 'name': 'python3', 'last_activity': '2026-01-24T03:34:05.937283Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 308s E 308s E Diff is 830 characters long. Set self.maxDiff to None to see it. 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkt2g9pbq/runtime/kernel-51d8130e-5ca6-4ede-b488-c3a73d8aa64d.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39023 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33859 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 51d8130e-5ca6-4ede-b488-c3a73d8aa64d, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.820000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.990000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.740000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.780000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 43d0da2c-a42e-4c39-9050-dd3b4b8e993c 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 43d0da2c-a42e-4c39-9050-dd3b4b8e993c 308s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/f75cf1c4-11fb-4a5e-9cd6-680c23cd1fd7 (127.0.0.1) 2.760000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 51d8130e-5ca6-4ede-b488-c3a73d8aa64d 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 51d8130e-5ca6-4ede-b488-c3a73d8aa64d 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 308s yielded = self.gen.send(value) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 11.900000ms referer=None 308s _____________________ SessionAPITest.test_modify_kernel_id _____________________ 308s 308s @self.addCleanup 308s def cleanup_sessions(): 308s for session in self.sess_api.list().json(): 308s > self.sess_api.delete(session['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.990000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkt2g9pbq/runtime/kernel-f6777c71-e1c7-40a6-a035-5f8af42de8d1.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36387 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56449 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: f6777c71-e1c7-40a6-a035-5f8af42de8d1, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.170000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 51d8130e-5ca6-4ede-b488-c3a73d8aa64d 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 51d8130e-5ca6-4ede-b488-c3a73d8aa64d 308s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 3.120000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.540000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.780000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f6777c71-e1c7-40a6-a035-5f8af42de8d1 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f6777c71-e1c7-40a6-a035-5f8af42de8d1 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 308s yielded = self.gen.send(value) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 11.890000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 308s from ipykernel import kernelapp as app 308s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 308s from .connect import * # noqa: F403 308s ^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 308s from subprocess import PIPE, Popen 308s File "", line 1360, in _find_and_load 308s File "", line 1331, in _find_and_load_unlocked 308s File "", line 935, in _load_unlocked 308s File "", line 1019, in exec_module 308s File "", line 1115, in get_code 308s File "", line 1215, in get_data 308s KeyboardInterrupt 308s ____________________ SessionAPITest.test_modify_kernel_name ____________________ 308s 308s @self.addCleanup 308s def cleanup_sessions(): 308s for session in self.sess_api.list().json(): 308s > self.sess_api.delete(session['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.740000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkt2g9pbq/runtime/kernel-26d7dbd0-943b-4115-b5d2-236cfb9aa440.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39745 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50931 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: 26d7dbd0-943b-4115-b5d2-236cfb9aa440, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpkt2g9pbq/notebooks/foo'} 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f6777c71-e1c7-40a6-a035-5f8af42de8d1 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f6777c71-e1c7-40a6-a035-5f8af42de8d1 308s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 24.300000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.370000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.520000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 26d7dbd0-943b-4115-b5d2-236cfb9aa440 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 26d7dbd0-943b-4115-b5d2-236cfb9aa440 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 308s yielded = self.gen.send(value) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 308s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 308s stopper = ensure_async(km.shutdown_kernel(now, restart)) 308s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 308s return _runner_map[name].run(inner) 308s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 308s return fut.result(None) 308s ~~~~~~~~~~^^^^^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 308s return self.__get_result() 308s ~~~~~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 308s raise self._exception 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 308s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/693da6aa-f89a-409d-8055-3bc2a6bc076f (127.0.0.1) 11.880000ms referer=None 308s --------------------------- Captured stderr teardown --------------------------- 308s Traceback (most recent call last): 308s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 308s return _run_code(code, main_globals, None, 308s "__main__", mod_spec) 308s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 308s exec(code, run_globals) 308s ~~~~^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 308s from pathlib import Path 308s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 308s from ._abc import * 308s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 308s from glob import _Globber, _no_recurse_symlinks 308s File "/usr/lib/python3.13/glob.py", line 5, in 308s import re 308s File "/usr/lib/python3.13/re/__init__.py", line 126, in 308s from . import _compiler, _parser 308s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 308s from . import _parser 308s File "/usr/lib/python3.13/re/_parser.py", line 15, in 308s from ._constants import * 308s File "", line 1360, in _find_and_load 308s File "", line 1331, in _find_and_load_unlocked 308s File "", line 935, in _load_unlocked 308s File "", line 1019, in exec_module 308s File "", line 1115, in get_code 308s File "", line 1214, in get_data 308s KeyboardInterrupt 308s _______________________ AsyncSessionAPITest.test_create ________________________ 308s 308s @self.addCleanup 308s def cleanup_sessions(): 308s for session in self.sess_api.list().json(): 308s > self.sess_api.delete(session['id']) 308s 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 308s return self._req('DELETE', id) 308s ^^^^^^^^^^^^^^^^^^^^^^^ 308s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 308s response.raise_for_status() 308s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 308s 308s self = 308s 308s def raise_for_status(self): 308s """Raises :class:`HTTPError`, if one occurred.""" 308s 308s http_error_msg = "" 308s if isinstance(self.reason, bytes): 308s # We attempt to decode utf-8 first because some servers 308s # choose to localize their reason strings. If the string 308s # isn't utf-8, we fall back to iso-8859-1 for all other 308s # encodings. (See PR #3538) 308s try: 308s reason = self.reason.decode("utf-8") 308s except UnicodeDecodeError: 308s reason = self.reason.decode("iso-8859-1") 308s else: 308s reason = self.reason 308s 308s if 400 <= self.status_code < 500: 308s http_error_msg = ( 308s f"{self.status_code} Client Error: {reason} for url: {self.url}" 308s ) 308s 308s elif 500 <= self.status_code < 600: 308s http_error_msg = ( 308s f"{self.status_code} Server Error: {reason} for url: {self.url}" 308s ) 308s 308s if http_error_msg: 308s > raise HTTPError(http_error_msg, response=self) 308s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/612d20e0-36f6-4d72-8dcb-ada566a4b463 308s 308s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 308s ------------------------------ Captured log setup ------------------------------ 308s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpqdxsy9nw/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpqdxsy9nw/etc/jupyter'] for config files 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpqdxsy9nw/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpqdxsy9nw/config 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpqdxsy9nw/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 308s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpqdxsy9nw/config 308s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpqdxsy9nw/notebooks 308s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 308s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 308s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 308s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 308s WARNING NotebookApp:handlers.py:612 Forbidden 308s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.570000ms referer=None 308s ----------------------------- Captured stderr call ----------------------------- 308s Traceback (most recent call last): 308s ------------------------------ Captured log call ------------------------------- 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.250000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 308s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqdxsy9nw/runtime/kernel-f1de0862-ef3f-4fa5-8b2a-803e98f9e05c.json'] 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46645 308s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35111 308s INFO NotebookApp:kernelmanager.py:179 Kernel started: f1de0862-ef3f-4fa5-8b2a-803e98f9e05c, name: python3 308s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpqdxsy9nw/notebooks/foo'} 308s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 24.800000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.880000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/612d20e0-36f6-4d72-8dcb-ada566a4b463 (127.0.0.1) 1.890000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.730000ms 308s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 308s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f1de0862-ef3f-4fa5-8b2a-803e98f9e05c 308s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f1de0862-ef3f-4fa5-8b2a-803e98f9e05c 308s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/612d20e0-36f6-4d72-8dcb-ada566a4b463 (127.0.0.1) 308s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/612d20e0-36f6-4d72-8dcb-ada566a4b463', version='HTTP/1.1', remote_ip='127.0.0.1') 308s Traceback (most recent call last): 308s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 308s result = await result 308s ^^^^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 308s future.result() 308s ~~~~~~~~~~~~~^^ 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 308s yield maybe_future(sm.delete_session(session_id)) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 308s yielded = self.gen.throw(exc) 308s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 308s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 308s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 308s value = future.result() 308s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 308s raise self._exception.with_traceback(self._exception_tb) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 308s result = coro.send(None) 308s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 308s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 308s raise km.ready.exception() # type: ignore[misc] 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 308s await kernel_awaitable 308s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 308s result = await obj 308s ^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 308s raise e 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 308s out = await method(self, *args, **kwargs) 308s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 308s await self._async_finish_shutdown(restart=restart) 308s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 308s await asyncio.wait_for( 308s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 308s ) 308s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 308s async with timeouts.timeout(timeout): 308s ~~~~~~~~~~~~~~~~^^^^^^^^^ 308s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 308s raise RuntimeError("Timeout should be used inside a task") 308s RuntimeError: Timeout should be used inside a task 308s WARNING NotebookApp:handlers.py:612 Unhandled error 308s ERROR NotebookApp:log.py:55 { 308s "Host": "localhost:12341", 308s "Accept": "*/*", 308s "User-Agent": "python-requests/2.32.5" 308s } 309s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/612d20e0-36f6-4d72-8dcb-ada566a4b463 (127.0.0.1) 10.680000ms referer=None 309s --------------------------- Captured stderr teardown --------------------------- 309s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 309s return _run_code(code, main_globals, None, 309s "__main__", mod_spec) 309s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 309s exec(code, run_globals) 309s ~~~~^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 309s from pathlib import Path 309s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 309s from ._local import * 309s File "/usr/lib/python3.13/pathlib/_local.py", line 29, in 309s class _PathParents(Sequence): 309s ...<25 lines>... 309s return "<{}.parents>".format(type(self._path).__name__) 309s File "/usr/lib/python3.13/pathlib/_local.py", line 29, in _PathParents 309s class _PathParents(Sequence): 309s 309s KeyboardInterrupt 309s _______________ AsyncSessionAPITest.test_create_console_session ________________ 309s 309s @self.addCleanup 309s def cleanup_sessions(): 309s for session in self.sess_api.list().json(): 309s > self.sess_api.delete(session['id']) 309s 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 309s return self._req('DELETE', id) 309s ^^^^^^^^^^^^^^^^^^^^^^^ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 309s response.raise_for_status() 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s 309s self = 309s 309s def raise_for_status(self): 309s """Raises :class:`HTTPError`, if one occurred.""" 309s 309s http_error_msg = "" 309s if isinstance(self.reason, bytes): 309s # We attempt to decode utf-8 first because some servers 309s # choose to localize their reason strings. If the string 309s # isn't utf-8, we fall back to iso-8859-1 for all other 309s # encodings. (See PR #3538) 309s try: 309s reason = self.reason.decode("utf-8") 309s except UnicodeDecodeError: 309s reason = self.reason.decode("iso-8859-1") 309s else: 309s reason = self.reason 309s 309s if 400 <= self.status_code < 500: 309s http_error_msg = ( 309s f"{self.status_code} Client Error: {reason} for url: {self.url}" 309s ) 309s 309s elif 500 <= self.status_code < 600: 309s http_error_msg = ( 309s f"{self.status_code} Server Error: {reason} for url: {self.url}" 309s ) 309s 309s if http_error_msg: 309s > raise HTTPError(http_error_msg, response=self) 309s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/8a22491d-31bd-4f04-b5be-9cdce55ce47d 309s 309s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 309s ----------------------------- Captured stderr call ----------------------------- 309s Traceback (most recent call last): 309s ------------------------------ Captured log call ------------------------------- 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 309s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqdxsy9nw/runtime/kernel-2595d554-f0a6-4d81-94b0-d4dfcb939f38.json'] 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37687 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56315 309s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2595d554-f0a6-4d81-94b0-d4dfcb939f38, name: python3 309s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpqdxsy9nw/notebooks/foo'} 309s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.220000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.860000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f1de0862-ef3f-4fa5-8b2a-803e98f9e05c 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f1de0862-ef3f-4fa5-8b2a-803e98f9e05c 309s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/612d20e0-36f6-4d72-8dcb-ada566a4b463 (127.0.0.1) 2.410000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2595d554-f0a6-4d81-94b0-d4dfcb939f38 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2595d554-f0a6-4d81-94b0-d4dfcb939f38 309s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/8a22491d-31bd-4f04-b5be-9cdce55ce47d (127.0.0.1) 309s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/8a22491d-31bd-4f04-b5be-9cdce55ce47d', version='HTTP/1.1', remote_ip='127.0.0.1') 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 309s result = await result 309s ^^^^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 309s future.result() 309s ~~~~~~~~~~~~~^^ 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 309s yield maybe_future(sm.delete_session(session_id)) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 309s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 309s raise self._exception.with_traceback(self._exception_tb) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 309s result = coro.send(None) 309s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 309s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 309s raise km.ready.exception() # type: ignore[misc] 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s WARNING NotebookApp:handlers.py:612 Unhandled error 309s ERROR NotebookApp:log.py:55 { 309s "Host": "localhost:12341", 309s "Accept": "*/*", 309s "User-Agent": "python-requests/2.32.5" 309s } 309s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/8a22491d-31bd-4f04-b5be-9cdce55ce47d (127.0.0.1) 10.700000ms referer=None 309s --------------------------- Captured stderr teardown --------------------------- 309s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 309s return _run_code(code, main_globals, None, 309s "__main__", mod_spec) 309s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 309s exec(code, run_globals) 309s ~~~~^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 309s from pathlib import Path 309s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 309s from ._abc import * 309s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 309s from glob import _Globber, _no_recurse_symlinks 309s File "/usr/lib/python3.13/glob.py", line 5, in 309s import re 309s File "/usr/lib/python3.13/re/__init__.py", line 126, in 309s from . import _compiler, _parser 309s File "/usr/lib/python3.13/re/_compiler.py", line 16, in 309s from ._casefix import _EXTRA_CASES 309s File "", line 1360, in _find_and_load 309s File "", line 1331, in _find_and_load_unlocked 309s File "", line 935, in _load_unlocked 309s File "", line 1019, in exec_module 309s File "", line 1115, in get_code 309s File "", line 1214, in get_data 309s KeyboardInterrupt 309s __________________ AsyncSessionAPITest.test_create_deprecated __________________ 309s 309s @self.addCleanup 309s def cleanup_sessions(): 309s for session in self.sess_api.list().json(): 309s > self.sess_api.delete(session['id']) 309s 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 309s return self._req('DELETE', id) 309s ^^^^^^^^^^^^^^^^^^^^^^^ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 309s response.raise_for_status() 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s 309s self = 309s 309s def raise_for_status(self): 309s """Raises :class:`HTTPError`, if one occurred.""" 309s 309s http_error_msg = "" 309s if isinstance(self.reason, bytes): 309s # We attempt to decode utf-8 first because some servers 309s # choose to localize their reason strings. If the string 309s # isn't utf-8, we fall back to iso-8859-1 for all other 309s # encodings. (See PR #3538) 309s try: 309s reason = self.reason.decode("utf-8") 309s except UnicodeDecodeError: 309s reason = self.reason.decode("iso-8859-1") 309s else: 309s reason = self.reason 309s 309s if 400 <= self.status_code < 500: 309s http_error_msg = ( 309s f"{self.status_code} Client Error: {reason} for url: {self.url}" 309s ) 309s 309s elif 500 <= self.status_code < 600: 309s http_error_msg = ( 309s f"{self.status_code} Server Error: {reason} for url: {self.url}" 309s ) 309s 309s if http_error_msg: 309s > raise HTTPError(http_error_msg, response=self) 309s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/df1b00a5-7224-4fa0-bed7-c3a93bd0146e 309s 309s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 309s ------------------------------ Captured log call ------------------------------- 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 309s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 309s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqdxsy9nw/runtime/kernel-d73fc40e-f5bb-4ed0-8580-6d242f106bc6.json'] 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50507 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59999 309s INFO NotebookApp:kernelmanager.py:179 Kernel started: d73fc40e-f5bb-4ed0-8580-6d242f106bc6, name: python3 309s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpqdxsy9nw/notebooks/foo'} 309s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.500000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.890000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2595d554-f0a6-4d81-94b0-d4dfcb939f38 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2595d554-f0a6-4d81-94b0-d4dfcb939f38 309s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/8a22491d-31bd-4f04-b5be-9cdce55ce47d (127.0.0.1) 2.240000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d73fc40e-f5bb-4ed0-8580-6d242f106bc6 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d73fc40e-f5bb-4ed0-8580-6d242f106bc6 309s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/df1b00a5-7224-4fa0-bed7-c3a93bd0146e (127.0.0.1) 309s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/df1b00a5-7224-4fa0-bed7-c3a93bd0146e', version='HTTP/1.1', remote_ip='127.0.0.1') 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 309s result = await result 309s ^^^^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 309s future.result() 309s ~~~~~~~~~~~~~^^ 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 309s yield maybe_future(sm.delete_session(session_id)) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 309s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 309s raise self._exception.with_traceback(self._exception_tb) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 309s result = coro.send(None) 309s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 309s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 309s raise km.ready.exception() # type: ignore[misc] 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s WARNING NotebookApp:handlers.py:612 Unhandled error 309s ERROR NotebookApp:log.py:55 { 309s "Host": "localhost:12341", 309s "Accept": "*/*", 309s "User-Agent": "python-requests/2.32.5" 309s } 309s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/df1b00a5-7224-4fa0-bed7-c3a93bd0146e (127.0.0.1) 10.540000ms referer=None 309s --------------------------- Captured stderr teardown --------------------------- 309s Traceback (most recent call last): 309s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 309s return _run_code(code, main_globals, None, 309s "__main__", mod_spec) 309s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 309s exec(code, run_globals) 309s ~~~~^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 309s from pathlib import Path 309s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 309s from ._abc import * 309s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 309s from glob import _Globber, _no_recurse_symlinks 309s File "/usr/lib/python3.13/glob.py", line 5, in 309s import re 309s File "/usr/lib/python3.13/re/__init__.py", line 126, in 309s from . import _compiler, _parser 309s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 309s from . import _parser 309s File "/usr/lib/python3.13/re/_parser.py", line 15, in 309s from ._constants import * 309s File "/usr/lib/python3.13/re/_constants.py", line 130, in 309s ATCODES = _makecodes( 309s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 309s ...<5 lines>... 309s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 309s ) 309s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 309s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 309s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 309s KeyboardInterrupt 309s _________________ AsyncSessionAPITest.test_create_file_session _________________ 309s 309s @self.addCleanup 309s def cleanup_sessions(): 309s for session in self.sess_api.list().json(): 309s > self.sess_api.delete(session['id']) 309s 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 309s return self._req('DELETE', id) 309s ^^^^^^^^^^^^^^^^^^^^^^^ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 309s response.raise_for_status() 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s 309s self = 309s 309s def raise_for_status(self): 309s """Raises :class:`HTTPError`, if one occurred.""" 309s 309s http_error_msg = "" 309s if isinstance(self.reason, bytes): 309s # We attempt to decode utf-8 first because some servers 309s # choose to localize their reason strings. If the string 309s # isn't utf-8, we fall back to iso-8859-1 for all other 309s # encodings. (See PR #3538) 309s try: 309s reason = self.reason.decode("utf-8") 309s except UnicodeDecodeError: 309s reason = self.reason.decode("iso-8859-1") 309s else: 309s reason = self.reason 309s 309s if 400 <= self.status_code < 500: 309s http_error_msg = ( 309s f"{self.status_code} Client Error: {reason} for url: {self.url}" 309s ) 309s 309s elif 500 <= self.status_code < 600: 309s http_error_msg = ( 309s f"{self.status_code} Server Error: {reason} for url: {self.url}" 309s ) 309s 309s if http_error_msg: 309s > raise HTTPError(http_error_msg, response=self) 309s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/c6b09b4e-567d-439b-8bd8-b850d65566f6 309s 309s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 309s ------------------------------ Captured log call ------------------------------- 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 309s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqdxsy9nw/runtime/kernel-8b0b6f62-47d8-457e-90b1-204fb2648e0b.json'] 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34563 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58581 309s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8b0b6f62-47d8-457e-90b1-204fb2648e0b, name: python3 309s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpqdxsy9nw/notebooks/foo'} 309s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.550000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.030000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d73fc40e-f5bb-4ed0-8580-6d242f106bc6 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d73fc40e-f5bb-4ed0-8580-6d242f106bc6 309s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/df1b00a5-7224-4fa0-bed7-c3a93bd0146e (127.0.0.1) 2.160000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8b0b6f62-47d8-457e-90b1-204fb2648e0b 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8b0b6f62-47d8-457e-90b1-204fb2648e0b 309s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/c6b09b4e-567d-439b-8bd8-b850d65566f6 (127.0.0.1) 309s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/c6b09b4e-567d-439b-8bd8-b850d65566f6', version='HTTP/1.1', remote_ip='127.0.0.1') 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 309s result = await result 309s ^^^^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 309s future.result() 309s ~~~~~~~~~~~~~^^ 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 309s yield maybe_future(sm.delete_session(session_id)) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 309s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 309s raise self._exception.with_traceback(self._exception_tb) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 309s result = coro.send(None) 309s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 309s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 309s raise km.ready.exception() # type: ignore[misc] 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s WARNING NotebookApp:handlers.py:612 Unhandled error 309s ERROR NotebookApp:log.py:55 { 309s "Host": "localhost:12341", 309s "Accept": "*/*", 309s "User-Agent": "python-requests/2.32.5" 309s } 309s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/c6b09b4e-567d-439b-8bd8-b850d65566f6 (127.0.0.1) 10.560000ms referer=None 309s --------------------------- Captured stderr teardown --------------------------- 309s Traceback (most recent call last): 309s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 309s return _run_code(code, main_globals, None, 309s "__main__", mod_spec) 309s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 309s exec(code, run_globals) 309s ~~~~^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 309s from pathlib import Path 309s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 309s from ._abc import * 309s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 309s from glob import _Globber, _no_recurse_symlinks 309s File "/usr/lib/python3.13/glob.py", line 5, in 309s import re 309s File "/usr/lib/python3.13/re/__init__.py", line 126, in 309s from . import _compiler, _parser 309s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 309s from . import _parser 309s File "/usr/lib/python3.13/re/_parser.py", line 15, in 309s from ._constants import * 309s File "/usr/lib/python3.13/re/_constants.py", line 130, in 309s ATCODES = _makecodes( 309s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 309s ...<5 lines>... 309s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 309s ) 309s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 309s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 309s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 309s KeyboardInterrupt 309s ________________ AsyncSessionAPITest.test_create_with_kernel_id ________________ 309s 309s self = 309s 309s def test_create_with_kernel_id(self): 309s # create a new kernel 309s r = self.request('POST', 'api/kernels') 309s r.raise_for_status() 309s kernel = r.json() 309s 309s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 309s self.assertEqual(resp.status_code, 201) 309s newsession = resp.json() 309s self.assertIn('id', newsession) 309s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 309s self.assertEqual(newsession['kernel']['id'], kernel['id']) 309s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 309s 309s sessions = self.sess_api.list().json() 309s > self.assertEqual(sessions, [newsession]) 309s E AssertionError: Lists differ: [{'id': 'c6b09b4e-567d-439b-8bd8-b850d65566f6', 'p[553 chars]ne}}] != [{'id': 'f66e0f39-96e1-46a5-a2ba-3fde46991c8a', 'p[279 chars]ne}}] 309s E 309s E First differing element 0: 309s E {'id': 'c6b09b4e-567d-439b-8bd8-b850d65566f6', 'p[218 chars]: 0}} 309s E {'id': 'f66e0f39-96e1-46a5-a2ba-3fde46991c8a', 'p[278 chars]one}} 309s E 309s E First list contains 1 additional elements. 309s E First extra element 1: 309s E {'id': 'f66e0f39-96e1-46a5-a2ba-3fde46991c8a', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': 'abfd4f4a-2d85-4fe8-a50f-da1dea1e638c', 'name': 'python3', 'last_activity': '2026-01-24T03:34:06.790743Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 309s E 309s E Diff is 830 characters long. Set self.maxDiff to None to see it. 309s 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 309s ----------------------------- Captured stderr call ----------------------------- 309s Traceback (most recent call last): 309s ------------------------------ Captured log call ------------------------------- 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 309s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqdxsy9nw/runtime/kernel-abfd4f4a-2d85-4fe8-a50f-da1dea1e638c.json'] 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42697 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35845 309s INFO NotebookApp:kernelmanager.py:179 Kernel started: abfd4f4a-2d85-4fe8-a50f-da1dea1e638c, name: python3 309s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 309s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.810000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.960000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.860000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.660000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8b0b6f62-47d8-457e-90b1-204fb2648e0b 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8b0b6f62-47d8-457e-90b1-204fb2648e0b 309s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/c6b09b4e-567d-439b-8bd8-b850d65566f6 (127.0.0.1) 3.320000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for abfd4f4a-2d85-4fe8-a50f-da1dea1e638c 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: abfd4f4a-2d85-4fe8-a50f-da1dea1e638c 309s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 309s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a', version='HTTP/1.1', remote_ip='127.0.0.1') 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 309s result = await result 309s ^^^^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 309s future.result() 309s ~~~~~~~~~~~~~^^ 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 309s yield maybe_future(sm.delete_session(session_id)) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 309s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 309s raise self._exception.with_traceback(self._exception_tb) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 309s result = coro.send(None) 309s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 309s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 309s raise km.ready.exception() # type: ignore[misc] 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s WARNING NotebookApp:handlers.py:612 Unhandled error 309s ERROR NotebookApp:log.py:55 { 309s "Host": "localhost:12341", 309s "Accept": "*/*", 309s "User-Agent": "python-requests/2.32.5" 309s } 309s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 10.450000ms referer=None 309s __________________ AsyncSessionAPITest.test_modify_kernel_id ___________________ 309s 309s @self.addCleanup 309s def cleanup_sessions(): 309s for session in self.sess_api.list().json(): 309s > self.sess_api.delete(session['id']) 309s 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 309s return self._req('DELETE', id) 309s ^^^^^^^^^^^^^^^^^^^^^^^ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 309s response.raise_for_status() 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s 309s self = 309s 309s def raise_for_status(self): 309s """Raises :class:`HTTPError`, if one occurred.""" 309s 309s http_error_msg = "" 309s if isinstance(self.reason, bytes): 309s # We attempt to decode utf-8 first because some servers 309s # choose to localize their reason strings. If the string 309s # isn't utf-8, we fall back to iso-8859-1 for all other 309s # encodings. (See PR #3538) 309s try: 309s reason = self.reason.decode("utf-8") 309s except UnicodeDecodeError: 309s reason = self.reason.decode("iso-8859-1") 309s else: 309s reason = self.reason 309s 309s if 400 <= self.status_code < 500: 309s http_error_msg = ( 309s f"{self.status_code} Client Error: {reason} for url: {self.url}" 309s ) 309s 309s elif 500 <= self.status_code < 600: 309s http_error_msg = ( 309s f"{self.status_code} Server Error: {reason} for url: {self.url}" 309s ) 309s 309s if http_error_msg: 309s > raise HTTPError(http_error_msg, response=self) 309s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a 309s 309s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 309s ----------------------------- Captured stderr call ----------------------------- 309s Traceback (most recent call last): 309s ------------------------------ Captured log call ------------------------------- 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.020000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 309s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqdxsy9nw/runtime/kernel-831f7bde-47f2-4f49-869f-81f8a485290f.json'] 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44367 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52939 309s INFO NotebookApp:kernelmanager.py:179 Kernel started: 831f7bde-47f2-4f49-869f-81f8a485290f, name: python3 309s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 309s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.670000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for abfd4f4a-2d85-4fe8-a50f-da1dea1e638c 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: abfd4f4a-2d85-4fe8-a50f-da1dea1e638c 309s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 2.710000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.610000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.740000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 831f7bde-47f2-4f49-869f-81f8a485290f 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 831f7bde-47f2-4f49-869f-81f8a485290f 309s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 309s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a', version='HTTP/1.1', remote_ip='127.0.0.1') 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 309s result = await result 309s ^^^^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 309s future.result() 309s ~~~~~~~~~~~~~^^ 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 309s yield maybe_future(sm.delete_session(session_id)) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 309s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 309s raise self._exception.with_traceback(self._exception_tb) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 309s result = coro.send(None) 309s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 309s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 309s raise km.ready.exception() # type: ignore[misc] 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s WARNING NotebookApp:handlers.py:612 Unhandled error 309s ERROR NotebookApp:log.py:55 { 309s "Host": "localhost:12341", 309s "Accept": "*/*", 309s "User-Agent": "python-requests/2.32.5" 309s } 309s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 10.560000ms referer=None 309s --------------------------- Captured stderr teardown --------------------------- 309s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 309s return _run_code(code, main_globals, None, 309s "__main__", mod_spec) 309s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 309s exec(code, run_globals) 309s ~~~~^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 309s from pathlib import Path 309s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 309s from ._local import * 309s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 309s class PureWindowsPath(PurePath): 309s ...<7 lines>... 309s __slots__ = () 309s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 309s import ntpath 309s File "", line 1360, in _find_and_load 309s File "", line 1331, in _find_and_load_unlocked 309s File "", line 935, in _load_unlocked 309s File "", line 1019, in exec_module 309s File "", line 1115, in get_code 309s File "", line 1214, in get_data 309s KeyboardInterrupt 309s _________________ AsyncSessionAPITest.test_modify_kernel_name __________________ 309s 309s @self.addCleanup 309s def cleanup_sessions(): 309s for session in self.sess_api.list().json(): 309s > self.sess_api.delete(session['id']) 309s 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 309s return self._req('DELETE', id) 309s ^^^^^^^^^^^^^^^^^^^^^^^ 309s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 309s response.raise_for_status() 309s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 309s 309s self = 309s 309s def raise_for_status(self): 309s """Raises :class:`HTTPError`, if one occurred.""" 309s 309s http_error_msg = "" 309s if isinstance(self.reason, bytes): 309s # We attempt to decode utf-8 first because some servers 309s # choose to localize their reason strings. If the string 309s # isn't utf-8, we fall back to iso-8859-1 for all other 309s # encodings. (See PR #3538) 309s try: 309s reason = self.reason.decode("utf-8") 309s except UnicodeDecodeError: 309s reason = self.reason.decode("iso-8859-1") 309s else: 309s reason = self.reason 309s 309s if 400 <= self.status_code < 500: 309s http_error_msg = ( 309s f"{self.status_code} Client Error: {reason} for url: {self.url}" 309s ) 309s 309s elif 500 <= self.status_code < 600: 309s http_error_msg = ( 309s f"{self.status_code} Server Error: {reason} for url: {self.url}" 309s ) 309s 309s if http_error_msg: 309s > raise HTTPError(http_error_msg, response=self) 309s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a 309s 309s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 309s ------------------------------ Captured log call ------------------------------- 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.140000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 309s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqdxsy9nw/runtime/kernel-2a248193-fcf8-4c55-aa3f-b42e8d1cbd3f.json'] 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33477 309s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51329 309s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2a248193-fcf8-4c55-aa3f-b42e8d1cbd3f, name: python3 309s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpqdxsy9nw/notebooks/foo'} 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 831f7bde-47f2-4f49-869f-81f8a485290f 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 831f7bde-47f2-4f49-869f-81f8a485290f 309s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 22.570000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 3.150000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.720000ms 309s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 309s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2a248193-fcf8-4c55-aa3f-b42e8d1cbd3f 309s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2a248193-fcf8-4c55-aa3f-b42e8d1cbd3f 309s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 309s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a', version='HTTP/1.1', remote_ip='127.0.0.1') 309s Traceback (most recent call last): 309s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 309s result = await result 309s ^^^^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 309s future.result() 309s ~~~~~~~~~~~~~^^ 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 309s yield maybe_future(sm.delete_session(session_id)) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 309s yielded = self.gen.throw(exc) 309s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 309s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 309s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 309s value = future.result() 309s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 309s raise self._exception.with_traceback(self._exception_tb) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 309s result = coro.send(None) 309s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 309s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 309s raise km.ready.exception() # type: ignore[misc] 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 309s await kernel_awaitable 309s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 309s result = await obj 309s ^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 309s raise e 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 309s out = await method(self, *args, **kwargs) 309s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 309s await self._async_finish_shutdown(restart=restart) 309s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 309s await asyncio.wait_for( 309s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 309s ) 309s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 309s async with timeouts.timeout(timeout): 309s ~~~~~~~~~~~~~~~~^^^^^^^^^ 309s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 309s raise RuntimeError("Timeout should be used inside a task") 309s RuntimeError: Timeout should be used inside a task 309s WARNING NotebookApp:handlers.py:612 Unhandled error 309s ERROR NotebookApp:log.py:55 { 309s "Host": "localhost:12341", 309s "Accept": "*/*", 309s "User-Agent": "python-requests/2.32.5" 309s } 309s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f66e0f39-96e1-46a5-a2ba-3fde46991c8a (127.0.0.1) 12.450000ms referer=None 309s --------------------------- Captured stderr teardown --------------------------- 309s Traceback (most recent call last): 309s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 309s return _run_code(code, main_globals, None, 309s "__main__", mod_spec) 309s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 309s exec(code, run_globals) 309s ~~~~^^^^^^^^^^^^^^^^^^^ 309s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 309s from pathlib import Path 309s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 309s from ._abc import * 309s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 309s from glob import _Globber, _no_recurse_symlinks 309s File "/usr/lib/python3.13/glob.py", line 5, in 309s import re 309s File "/usr/lib/python3.13/re/__init__.py", line 126, in 309s from . import _compiler, _parser 309s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 309s from . import _parser 309s File "/usr/lib/python3.13/re/_parser.py", line 15, in 309s from ._constants import * 309s File "/usr/lib/python3.13/re/_constants.py", line 23, in 309s class PatternError(Exception): 309s ...<29 lines>... 309s super().__init__(msg) 309s KeyboardInterrupt 309s =============================== warnings summary =============================== 309s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 309s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 309s /usr/lib/python3/dist-packages/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. 309s return LooseVersion(v) >= LooseVersion(check) 309s 309s ../../../usr/lib/python3/dist-packages/notebook/_tz.py:29: 1 warning 309s services/kernels/tests/test_kernels_api.py: 72 warnings 309s services/sessions/tests/test_sessions_api.py: 96 warnings 309s /usr/lib/python3/dist-packages/notebook/_tz.py:29: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). 309s dt = unaware(*args, **kwargs) 309s 309s ../../../usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14 309s /usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.integration_tests - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 309s pytestmark = pytest.mark.integration_tests 309s 309s services/kernels/tests/test_kernels_api.py: 6 warnings 309s services/sessions/tests/test_sessions_api.py: 6 warnings 309s /usr/lib/python3/dist-packages/nest_asyncio.py:71: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 309s policy = events.get_event_loop_policy() 309s 309s services/kernels/tests/test_kernels_api.py: 22 warnings 309s services/sessions/tests/test_sessions_api.py: 17 warnings 309s /usr/lib/python3/dist-packages/nest_asyncio.py:40: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 309s loop = events.get_event_loop_policy().get_event_loop() 309s 309s services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 309s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first 309s loop.make_current() 309s 309s services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 309s /usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py:78: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 309s def _create_kernel_manager_factory(self) -> t.Callable: 309s Enable tracemalloc to get traceback where the object was allocated. 309s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 309s 309s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 309s =========================== short test summary info ============================ 309s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_default_kernel 309s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_kernel_handler 309s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 309s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_no_kernels 309s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 309s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_default_kernel 309s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_kernel_handler 309s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 309s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_no_kernels 309s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 309s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_console_session 309s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_deprecated 309s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_file_session 309s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 309s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 309s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 309s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create 309s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_console_session 309s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_deprecated 309s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_file_session 309s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 309s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 309s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 309s ERROR services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 309s ERROR services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 309s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 309s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 309s ===== 23 failed, 2 passed, 305 deselected, 225 warnings, 4 errors in 8.44s ===== 309s *** END OF RUN 3: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 309s *** STARTING RUN 4: python3.14 -m pytest --pyargs notebook -rfE --last-failed --last-failed-no-failures none --ignore=/usr/lib/python3/dist-packages/notebook/tests/selenium --deselect=services/kernels/tests/test_kernels_api.py::KernelAPITest::test_connections 314s ============================= test session starts ============================== 314s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 314s rootdir: /tmp/autopkgtest.CmXq4V/autopkgtest_tmp 314s plugins: typeguard-4.4.4 314s collected 330 items / 307 deselected / 23 selected 314s run-last-failure: rerun previous 23 failures 314s 317s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF [ 39%] 319s services/sessions/tests/test_sessions_api.py FFFFFEFFFFFFFEFF [100%] 319s 319s ==================================== ERRORS ==================================== 319s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 319s 319s self = 319s 319s def tearDown(self): 319s for k in self.kern_api.list().json(): 319s > self.kern_api.shutdown(k['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/49a7ff92-1380-4940-9874-88119f8510d4 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 319s from pathlib import Path 319s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 319s from ._abc import * 319s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 319s from glob import _Globber, _no_recurse_symlinks 319s File "/usr/lib/python3.13/glob.py", line 3, in 319s import contextlib 319s File "", line 1360, in _find_and_load 319s File "", line 1331, in _find_and_load_unlocked 319s File "", line 935, in _load_unlocked 319s File "", line 1019, in exec_module 319s File "", line 1115, in get_code 319s File "", line 1215, in get_data 319s KeyboardInterrupt 319s Traceback (most recent call last): 319s File "", line 1513, in _path_importer_cache 319s KeyError: '/usr/lib/python3.13/concurrent/futures' 319s 319s During handling of the above exception, another exception occurred: 319s 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpperg6et1/runtime/kernel-49a7ff92-1380-4940-9874-88119f8510d4.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39823 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45983 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 49a7ff92-1380-4940-9874-88119f8510d4, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.870000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.090000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpperg6et1/runtime/kernel-f25c9826-8855-4129-9be7-f0ce178deeb6.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45445 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51765 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: f25c9826-8855-4129-9be7-f0ce178deeb6, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.750000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.680000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: f25c9826-8855-4129-9be7-f0ce178deeb6 319s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/f25c9826-8855-4129-9be7-f0ce178deeb6/interrupt (127.0.0.1) 2.590000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 319s yield maybe_future(km.restart_kernel(kernel_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 319s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 319s await ensure_async(kernel.restart_kernel(now=now)) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 319s await self._async_shutdown_kernel(now=now, restart=True) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/f25c9826-8855-4129-9be7-f0ce178deeb6/restart (127.0.0.1) 8.130000ms referer=None 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.820000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 49a7ff92-1380-4940-9874-88119f8510d4 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 49a7ff92-1380-4940-9874-88119f8510d4 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/49a7ff92-1380-4940-9874-88119f8510d4 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/49a7ff92-1380-4940-9874-88119f8510d4', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 319s yielded = ctx_run(next, result) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 319s yield maybe_future(km.shutdown_kernel(kernel_id)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/49a7ff92-1380-4940-9874-88119f8510d4 (127.0.0.1) 11.080000ms referer=None 319s --------------------------- Captured stderr teardown --------------------------- 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 319s from .connect import * # noqa: F403 319s ^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 319s import jupyter_client 319s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 319s from .asynchronous import AsyncKernelClient 319s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 319s from .client import AsyncKernelClient # noqa 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 319s import zmq.asyncio 319s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 319s import asyncio 319s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 319s from .base_events import * 319s File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in 319s import concurrent.futures 319s File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in 319s from concurrent.futures._base import (FIRST_COMPLETED, 319s ...<9 lines>... 319s as_completed) 319s File "", line 1360, in _find_and_load 319s File "", line 1322, in _find_and_load_unlocked 319s File "", line 1262, in _find_spec 319s File "", line 1556, in find_spec 319s File "", line 1528, in _get_spec 319s File "", line 1515, in _path_importer_cache 319s File "", line 1491, in _path_hooks 319s File "", line 1715, in path_hook_for_FileFinder 319s File "", line 173, in _path_isdir 319s File "", line 158, in _path_is_mode_type 319s File "", line 152, in _path_stat 319s KeyboardInterrupt 319s _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 319s 319s self = 319s 319s def tearDown(self): 319s for k in self.kern_api.list().json(): 319s > self.kern_api.shutdown(k['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/51cd36e2-e076-4548-882f-32e30db2a93c 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 319s from pathlib import Path 319s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 319s from ._abc import * 319s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 319s from glob import _Globber, _no_recurse_symlinks 319s File "", line 1360, in _find_and_load 319s File "", line 1322, in _find_and_load_unlocked 319s File "", line 1262, in _find_spec 319s File "", line 1556, in find_spec 319s File "", line 1530, in _get_spec 319s File "", line 1661, in find_spec 319s KeyboardInterrupt 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmphv59f75c/runtime/kernel-51cd36e2-e076-4548-882f-32e30db2a93c.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59271 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49737 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 51cd36e2-e076-4548-882f-32e30db2a93c, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.970000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.090000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmphv59f75c/runtime/kernel-65a09366-9815-44c0-8a73-8a8f8029db50.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44633 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41631 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 65a09366-9815-44c0-8a73-8a8f8029db50, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.590000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.810000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 65a09366-9815-44c0-8a73-8a8f8029db50 319s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/65a09366-9815-44c0-8a73-8a8f8029db50/interrupt (127.0.0.1) 3.230000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 319s yield maybe_future(km.restart_kernel(kernel_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 319s result = coro.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 319s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 319s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 319s yield self # This tells Task to wait for completion. 319s ^^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 319s future.result() 319s ~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 319s await ensure_async(kernel.restart_kernel(now=now)) 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 319s await self._async_shutdown_kernel(now=now, restart=True) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/65a09366-9815-44c0-8a73-8a8f8029db50/restart (127.0.0.1) 6.440000ms referer=None 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.790000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 51cd36e2-e076-4548-882f-32e30db2a93c 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 51cd36e2-e076-4548-882f-32e30db2a93c 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/51cd36e2-e076-4548-882f-32e30db2a93c (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/51cd36e2-e076-4548-882f-32e30db2a93c', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 319s future.result() 319s ~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 319s yield maybe_future(km.shutdown_kernel(kernel_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 319s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 319s raise km.ready.exception() # type: ignore[misc] 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/51cd36e2-e076-4548-882f-32e30db2a93c (127.0.0.1) 10.590000ms referer=None 319s --------------------------- Captured stderr teardown --------------------------- 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 319s from .connect import * # noqa: F403 319s ^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 319s import jupyter_client 319s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 319s from .asynchronous import AsyncKernelClient 319s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 319s from .client import AsyncKernelClient # noqa 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 319s import zmq.asyncio 319s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 57, in 319s from zmq import sugar 319s File "/usr/lib/python3/dist-packages/zmq/sugar/__init__.py", line 11, in 319s from zmq.sugar import context, frame, poll, socket, tracker, version 319s File "/usr/lib/python3/dist-packages/zmq/sugar/context.py", line 23, in 319s from .socket import Socket, SyncSocket 319s File "/usr/lib/python3/dist-packages/zmq/sugar/socket.py", line 42, in 319s _SocketType = TypeVar("_SocketType", bound="Socket") 319s File "/usr/lib/python3.13/typing.py", line 191, in _type_check 319s arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) 319s File "/usr/lib/python3.13/typing.py", line 169, in _type_convert 319s return ForwardRef(arg, module=module, is_class=allow_special_forms) 319s File "/usr/lib/python3.13/typing.py", line 1035, in __init__ 319s code = compile(arg_to_compile, '', 'eval') 319s KeyboardInterrupt 319s ________ ERROR at teardown of SessionAPITest.test_create_with_kernel_id ________ 319s 319s @self.addCleanup 319s def cleanup_sessions(): 319s for session in self.sess_api.list().json(): 319s > self.sess_api.delete(session['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnhjtk0gc/runtime/kernel-a7e7f3dc-c485-40cb-8f89-d84c21529dc1.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50685 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55675 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: a7e7f3dc-c485-40cb-8f89-d84c21529dc1, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 26.490000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.140000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.070000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.430000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 37f93d5d-e041-4a7c-8846-00ca6545cf1b 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 37f93d5d-e041-4a7c-8846-00ca6545cf1b 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/9e87bf12-cbc2-4410-a8a2-c9c2dc0ea4ec (127.0.0.1) 3.020000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a7e7f3dc-c485-40cb-8f89-d84c21529dc1 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a7e7f3dc-c485-40cb-8f89-d84c21529dc1 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 319s yielded = self.gen.send(value) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 13.200000ms referer=None 319s --------------------------- Captured stderr teardown --------------------------- 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 319s from .connect import * # noqa: F403 319s ^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 319s from typing import TYPE_CHECKING, Any 319s File "/usr/lib/python3.13/typing.py", line 2063, in 319s class _ProtocolMeta(ABCMeta): 319s ...<83 lines>... 319s return False 319s File "/usr/lib/python3.13/typing.py", line 2063, in _ProtocolMeta 319s class _ProtocolMeta(ABCMeta): 319s 319s KeyboardInterrupt 319s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_kernel_id ______ 319s 319s @self.addCleanup 319s def cleanup_sessions(): 319s for session in self.sess_api.list().json(): 319s > self.sess_api.delete(session['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpyu2ysihs/runtime/kernel-ece44cf9-d2a0-430e-b3cc-0734871f1723.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54465 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39619 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: ece44cf9-d2a0-430e-b3cc-0734871f1723, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.390000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.970000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.870000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.820000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8e6d40c9-f9eb-417c-83e6-25d78562fcef 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8e6d40c9-f9eb-417c-83e6-25d78562fcef 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/243afd68-40ef-4a1b-a5cc-40972cf3455d (127.0.0.1) 2.090000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ece44cf9-d2a0-430e-b3cc-0734871f1723 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ece44cf9-d2a0-430e-b3cc-0734871f1723 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 319s future.result() 319s ~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 319s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 319s raise km.ready.exception() # type: ignore[misc] 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 10.440000ms referer=None 319s --------------------------- Captured stderr teardown --------------------------- 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 319s from .connect import * # noqa: F403 319s ^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 319s from subprocess import PIPE, Popen 319s File "/usr/lib/python3.13/subprocess.py", line 51, in 319s import threading 319s File "", line 1360, in _find_and_load 319s File "", line 1322, in _find_and_load_unlocked 319s File "", line 1262, in _find_spec 319s File "", line 1556, in find_spec 319s File "", line 1530, in _get_spec 319s File "", line 1629, in find_spec 319s File "", line 152, in _path_stat 319s KeyboardInterrupt 319s =================================== FAILURES =================================== 319s ______________________ KernelAPITest.test_default_kernel _______________________ 319s 319s self = 319s 319s def tearDown(self): 319s for k in self.kern_api.list().json(): 319s > self.kern_api.shutdown(k['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/ecb7ea3c-7881-4f17-baa2-c79f0079f490 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ------------------------------ Captured log setup ------------------------------ 319s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpperg6et1/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpperg6et1/etc/jupyter'] for config files 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpperg6et1/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpperg6et1/config 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpperg6et1/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpperg6et1/config 319s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpperg6et1/notebooks 319s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 319s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 319s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 319s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 319s WARNING NotebookApp:handlers.py:612 Forbidden 319s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 2.120000ms referer=None 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpperg6et1/runtime/kernel-ecb7ea3c-7881-4f17-baa2-c79f0079f490.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40031 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41493 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: ecb7ea3c-7881-4f17-baa2-c79f0079f490, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 84.390000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.230000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ecb7ea3c-7881-4f17-baa2-c79f0079f490 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ecb7ea3c-7881-4f17-baa2-c79f0079f490 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/ecb7ea3c-7881-4f17-baa2-c79f0079f490 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/ecb7ea3c-7881-4f17-baa2-c79f0079f490', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 319s yielded = ctx_run(next, result) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 319s yield maybe_future(km.shutdown_kernel(kernel_id)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/ecb7ea3c-7881-4f17-baa2-c79f0079f490 (127.0.0.1) 15.770000ms referer=None 319s --------------------------- Captured stderr teardown --------------------------- 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 319s from pathlib import Path 319s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 319s from ._abc import * 319s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 319s from glob import _Globber, _no_recurse_symlinks 319s File "/usr/lib/python3.13/glob.py", line 5, in 319s import re 319s File "/usr/lib/python3.13/re/__init__.py", line 126, in 319s from . import _compiler, _parser 319s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 319s from . import _parser 319s File "/usr/lib/python3.13/re/_parser.py", line 15, in 319s from ._constants import * 319s File "/usr/lib/python3.13/re/_constants.py", line 130, in 319s ATCODES = _makecodes( 319s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 319s ...<5 lines>... 319s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 319s ) 319s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 319s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 319s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 319s KeyboardInterrupt 319s ______________________ KernelAPITest.test_kernel_handler _______________________ 319s 319s self = 319s 319s def test_kernel_handler(self): 319s # GET kernel with given id 319s kid = self.kern_api.start().json()['id'] 319s r = self.kern_api.get(kid) 319s kern1 = r.json() 319s self.assertEqual(r.status_code, 200) 319s assert isinstance(kern1, dict) 319s self.assertIn('id', kern1) 319s self.assertEqual(kern1['id'], kid) 319s 319s # Request a bad kernel id and check that a JSON 319s # message is returned! 319s bad_id = '111-111-111-111-111' 319s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 319s self.kern_api.get(bad_id) 319s 319s # DELETE kernel with id 319s > r = self.kern_api.shutdown(kid) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 319s from pathlib import Path 319s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 319s from ._local import * 319s File "", line 1360, in _find_and_load 319s File "", line 1331, in _find_and_load_unlocked 319s File "", line 935, in _load_unlocked 319s File "", line 1019, in exec_module 319s File "", line 1152, in get_code 319s File "", line 781, in _compile_bytecode 319s KeyboardInterrupt 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpperg6et1/runtime/kernel-e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46129 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42011 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 25.550000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d (127.0.0.1) 1.820000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 319s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 319s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 1.950000ms referer=None 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 319s yielded = ctx_run(next, result) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 319s yield maybe_future(km.shutdown_kernel(kernel_id)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d (127.0.0.1) 12.040000ms referer=None 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.830000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ecb7ea3c-7881-4f17-baa2-c79f0079f490 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ecb7ea3c-7881-4f17-baa2-c79f0079f490 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/ecb7ea3c-7881-4f17-baa2-c79f0079f490 (127.0.0.1) 2.740000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/e9d3a0dc-1956-4fad-b00b-8c0eb0c1421d (127.0.0.1) 2.640000ms 319s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 319s 319s self = 319s 319s def test_main_kernel_handler(self): 319s # POST request 319s r = self.kern_api.start() 319s kern1 = r.json() 319s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 319s self.assertEqual(r.status_code, 201) 319s self.assertIsInstance(kern1, dict) 319s 319s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 319s expected_csp = '; '.join([ 319s "frame-ancestors 'self'", 319s 'report-uri ' + report_uri, 319s "default-src 'none'" 319s ]) 319s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 319s 319s # GET request 319s r = self.kern_api.list() 319s self.assertEqual(r.status_code, 200) 319s assert isinstance(r.json(), list) 319s self.assertEqual(r.json()[0]['id'], kern1['id']) 319s self.assertEqual(r.json()[0]['name'], kern1['name']) 319s 319s # create another kernel and check that they both are added to the 319s # list of kernels from a GET request 319s kern2 = self.kern_api.start().json() 319s assert isinstance(kern2, dict) 319s r = self.kern_api.list() 319s kernels = r.json() 319s self.assertEqual(r.status_code, 200) 319s assert isinstance(kernels, list) 319s self.assertEqual(len(kernels), 2) 319s 319s # Interrupt a kernel 319s r = self.kern_api.interrupt(kern2['id']) 319s self.assertEqual(r.status_code, 204) 319s 319s # Restart a kernel 319s > r = self.kern_api.restart(kern2['id']) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 319s return self._req('POST', url_path_join(id, 'restart')) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/f25c9826-8855-4129-9be7-f0ce178deeb6/restart 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 319s from pathlib import Path 319s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 319s from ._abc import * 319s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 319s from glob import _Globber, _no_recurse_symlinks 319s File "/usr/lib/python3.13/glob.py", line 3, in 319s import contextlib 319s File "", line 1360, in _find_and_load 319s File "", line 1331, in _find_and_load_unlocked 319s File "", line 935, in _load_unlocked 319s File "", line 1019, in exec_module 319s File "", line 1115, in get_code 319s File "", line 1215, in get_data 319s KeyboardInterrupt 319s Traceback (most recent call last): 319s File "", line 1513, in _path_importer_cache 319s KeyError: '/usr/lib/python3.13/concurrent/futures' 319s 319s During handling of the above exception, another exception occurred: 319s 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpperg6et1/runtime/kernel-49a7ff92-1380-4940-9874-88119f8510d4.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39823 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45983 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 49a7ff92-1380-4940-9874-88119f8510d4, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.870000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.090000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpperg6et1/runtime/kernel-f25c9826-8855-4129-9be7-f0ce178deeb6.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45445 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51765 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: f25c9826-8855-4129-9be7-f0ce178deeb6, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.750000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.680000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: f25c9826-8855-4129-9be7-f0ce178deeb6 319s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/f25c9826-8855-4129-9be7-f0ce178deeb6/interrupt (127.0.0.1) 2.590000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 319s yield maybe_future(km.restart_kernel(kernel_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 319s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 319s await ensure_async(kernel.restart_kernel(now=now)) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 319s await self._async_shutdown_kernel(now=now, restart=True) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/f25c9826-8855-4129-9be7-f0ce178deeb6/restart (127.0.0.1) 8.130000ms referer=None 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.820000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 49a7ff92-1380-4940-9874-88119f8510d4 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 49a7ff92-1380-4940-9874-88119f8510d4 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/49a7ff92-1380-4940-9874-88119f8510d4 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/49a7ff92-1380-4940-9874-88119f8510d4', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 319s yielded = ctx_run(next, result) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 319s yield maybe_future(km.shutdown_kernel(kernel_id)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/49a7ff92-1380-4940-9874-88119f8510d4 (127.0.0.1) 11.080000ms referer=None 319s ________________________ KernelAPITest.test_no_kernels _________________________ 319s 319s self = 319s 319s def test_no_kernels(self): 319s """Make sure there are no kernels running at the start""" 319s kernels = self.kern_api.list().json() 319s > self.assertEqual(kernels, []) 319s E AssertionError: Lists differ: [{'id': '49a7ff92-1380-4940-9874-88119f851[281 chars]: 0}] != [] 319s E 319s E First list contains 2 additional elements. 319s E First extra element 0: 319s E {'id': '49a7ff92-1380-4940-9874-88119f8510d4', 'name': 'python3', 'last_activity': '2026-01-24T03:34:14.559003Z', 'execution_state': 'starting', 'connections': 0} 319s E 319s E + [] 319s E - [{'connections': 0, 319s E - 'execution_state': 'starting', 319s E - 'id': '49a7ff92-1380-4940-9874-88119f8510d4', 319s E - 'last_activity': '2026-01-24T03:34:14.559003Z', 319s E - 'name': 'python3'}, 319s E - {'connections': 0, 319s E - 'execution_state': 'starting', 319s E - 'id': 'f25c9826-8855-4129-9be7-f0ce178deeb6', 319s E - 'last_activity': '2026-01-24T03:34:14.591593Z', 319s E - 'name': 'python3'}] 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.930000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.800000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 49a7ff92-1380-4940-9874-88119f8510d4 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 49a7ff92-1380-4940-9874-88119f8510d4 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/49a7ff92-1380-4940-9874-88119f8510d4 (127.0.0.1) 2.610000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f25c9826-8855-4129-9be7-f0ce178deeb6 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f25c9826-8855-4129-9be7-f0ce178deeb6 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/f25c9826-8855-4129-9be7-f0ce178deeb6 (127.0.0.1) 2.830000ms 319s ---------------------------- Captured log teardown ----------------------------- 319s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 319s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 319s _____________________ AsyncKernelAPITest.test_connections ______________________ 319s 319s self = 319s 319s def tearDown(self): 319s for k in self.kern_api.list().json(): 319s > self.kern_api.shutdown(k['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ------------------------------ Captured log setup ------------------------------ 319s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmphv59f75c/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmphv59f75c/etc/jupyter'] for config files 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmphv59f75c/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmphv59f75c/config 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmphv59f75c/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmphv59f75c/config 319s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmphv59f75c/notebooks 319s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 319s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 319s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 319s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 319s WARNING NotebookApp:handlers.py:612 Forbidden 319s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.470000ms referer=None 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmphv59f75c/runtime/kernel-2961068e-a64e-4e24-86bf-3a5a302f6e57.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58861 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43341 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2961068e-a64e-4e24-86bf-3a5a302f6e57, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.430000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57 (127.0.0.1) 1.860000ms 319s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57/channels 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 319s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36141 319s DEBUG NotebookApp:kernelmanager.py:423 activity on 2961068e-a64e-4e24-86bf-3a5a302f6e57: status (starting) 319s DEBUG NotebookApp:kernelmanager.py:423 activity on 2961068e-a64e-4e24-86bf-3a5a302f6e57: status (busy) 319s DEBUG NotebookApp:handlers.py:306 Received kernel info: {'status': 'ok', 'protocol_version': '5.3', 'implementation': 'ipython', 'implementation_version': '8.35.0', 'language_info': {'name': 'python', 'version': '3.13.11', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': "Python 3.13.11 (main, Dec 6 2025, 13:15:20) [GCC 15.2.0]\nType 'copyright', 'credits' or 'license' for more information\nIPython 8.35.0 -- An enhanced Interactive Python. Type '?' for help.\n", 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.13'}, {'text': 'IPython Reference', 'url': 'https://ipython.org/documentation.html'}, {'text': 'NumPy Reference', 'url': 'https://docs.scipy.org/doc/numpy/reference/'}, {'text': 'SciPy Reference', 'url': 'https://docs.scipy.org/doc/scipy/reference/'}, {'text': 'Matplotlib Reference', 'url': 'https://matplotlib.org/contents.html'}, {'text': 'SymPy Reference', 'url': 'http://docs.sympy.org/latest/index.html'}, {'text': 'pandas Reference', 'url': 'https://pandas.pydata.org/pandas-docs/stable/'}]} 319s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel 2961068e-a64e-4e24-86bf-3a5a302f6e57) to 5.4 (client). 319s DEBUG NotebookApp:kernelmanager.py:423 activity on 2961068e-a64e-4e24-86bf-3a5a302f6e57: status (idle) 319s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57/channels (127.0.0.1) 913.700000ms 319s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57/channels 319s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43341 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36141 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58861 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58741 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36141 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58861 319s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 319s Setting websocket_ping_timeout=30000 319s DEBUG NotebookApp:handlers.py:255 Nudge: attempt 1 on kernel 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:kernelmanager.py:423 activity on 2961068e-a64e-4e24-86bf-3a5a302f6e57: status (busy) 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:423 activity on 2961068e-a64e-4e24-86bf-3a5a302f6e57: status (busy) 319s DEBUG NotebookApp:handlers.py:207 Nudge: IOPub received: 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:handlers.py:210 Nudge: resolving iopub future: 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57 (127.0.0.1) 2.770000ms 319s DEBUG NotebookApp:kernelmanager.py:423 activity on 2961068e-a64e-4e24-86bf-3a5a302f6e57: status (idle) 319s DEBUG NotebookApp:handlers.py:195 Nudge: shell info reply received: 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:handlers.py:197 Nudge: resolving shell future: 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:handlers.py:201 Nudge: control info reply received: 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:kernelmanager.py:423 activity on 2961068e-a64e-4e24-86bf-3a5a302f6e57: status (idle) 319s DEBUG NotebookApp:handlers.py:579 Websocket closed 2961068e-a64e-4e24-86bf-3a5a302f6e57:2e751f92-51599929f5dec9206828600d 319s INFO NotebookApp:kernelmanager.py:222 Starting buffering for 2961068e-a64e-4e24-86bf-3a5a302f6e57:2e751f92-51599929f5dec9206828600d 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 2961068e-a64e-4e24-86bf-3a5a302f6e57:iopub 319s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 2961068e-a64e-4e24-86bf-3a5a302f6e57:iopub 319s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 2961068e-a64e-4e24-86bf-3a5a302f6e57:iopub 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57 (127.0.0.1) 3.040000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57 (127.0.0.1) 1.710000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.580000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s INFO NotebookApp:kernelmanager.py:286 Discarding 3 buffered messages for 2961068e-a64e-4e24-86bf-3a5a302f6e57:2e751f92-51599929f5dec9206828600d 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 319s future.result() 319s ~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 319s yield maybe_future(km.shutdown_kernel(kernel_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 319s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 319s raise km.ready.exception() # type: ignore[misc] 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57 (127.0.0.1) 10.620000ms referer=None 319s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 319s 319s self = 319s 319s def tearDown(self): 319s for k in self.kern_api.list().json(): 319s > self.kern_api.shutdown(k['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/fbde1214-bb33-4919-a788-8f1302cbf929 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmphv59f75c/runtime/kernel-fbde1214-bb33-4919-a788-8f1302cbf929.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38545 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41491 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: fbde1214-bb33-4919-a788-8f1302cbf929, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.920000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.750000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/2961068e-a64e-4e24-86bf-3a5a302f6e57 (127.0.0.1) 2.240000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fbde1214-bb33-4919-a788-8f1302cbf929 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fbde1214-bb33-4919-a788-8f1302cbf929 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/fbde1214-bb33-4919-a788-8f1302cbf929 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/fbde1214-bb33-4919-a788-8f1302cbf929', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 319s future.result() 319s ~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 319s yield maybe_future(km.shutdown_kernel(kernel_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 319s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 319s raise km.ready.exception() # type: ignore[misc] 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/fbde1214-bb33-4919-a788-8f1302cbf929 (127.0.0.1) 10.660000ms referer=None 319s --------------------------- Captured stderr teardown --------------------------- 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 319s from pathlib import Path 319s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 319s from ._abc import * 319s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 319s from glob import _Globber, _no_recurse_symlinks 319s File "/usr/lib/python3.13/glob.py", line 237, in 319s magic_check_bytes = re.compile(b'([*?[])') 319s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 319s return _compile(pattern, flags) 319s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 319s p = _compiler.compile(pattern, flags) 319s File "/usr/lib/python3.13/re/_compiler.py", line 748, in compile 319s p = _parser.parse(p, flags) 319s File "/usr/lib/python3.13/re/_parser.py", line 980, in parse 319s p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) 319s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 319s itemsappend(_parse(source, state, verbose, nested + 1, 319s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s not nested and not items)) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3.13/re/_parser.py", line 863, in _parse 319s p = _parse_sub(source, state, sub_verbose, nested + 1) 319s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 319s itemsappend(_parse(source, state, verbose, nested + 1, 319s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s not nested and not items)) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3.13/re/_parser.py", line 585, in _parse 319s code1 = LITERAL, _ord(this) 319s ~~~~^^^^^^ 319s KeyboardInterrupt 319s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 319s 319s self = 319s 319s def test_kernel_handler(self): 319s # GET kernel with given id 319s kid = self.kern_api.start().json()['id'] 319s r = self.kern_api.get(kid) 319s kern1 = r.json() 319s self.assertEqual(r.status_code, 200) 319s assert isinstance(kern1, dict) 319s self.assertIn('id', kern1) 319s self.assertEqual(kern1['id'], kid) 319s 319s # Request a bad kernel id and check that a JSON 319s # message is returned! 319s bad_id = '111-111-111-111-111' 319s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 319s self.kern_api.get(bad_id) 319s 319s # DELETE kernel with id 319s > r = self.kern_api.shutdown(kid) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/13dce3a5-4ad9-43f8-8d1a-625fec7900c2 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 319s from pathlib import Path 319s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 319s from ._abc import * 319s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 319s from glob import _Globber, _no_recurse_symlinks 319s File "/usr/lib/python3.13/glob.py", line 5, in 319s import re 319s File "/usr/lib/python3.13/re/__init__.py", line 126, in 319s from . import _compiler, _parser 319s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 319s from . import _parser 319s File "/usr/lib/python3.13/re/_parser.py", line 15, in 319s from ._constants import * 319s File "/usr/lib/python3.13/re/_constants.py", line 130, in 319s ATCODES = _makecodes( 319s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 319s ...<5 lines>... 319s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 319s ) 319s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 319s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 319s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 319s KeyboardInterrupt 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmphv59f75c/runtime/kernel-13dce3a5-4ad9-43f8-8d1a-625fec7900c2.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57715 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33999 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 13dce3a5-4ad9-43f8-8d1a-625fec7900c2, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.330000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/13dce3a5-4ad9-43f8-8d1a-625fec7900c2 (127.0.0.1) 1.790000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 319s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 319s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 2.000000ms referer=None 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 13dce3a5-4ad9-43f8-8d1a-625fec7900c2 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 13dce3a5-4ad9-43f8-8d1a-625fec7900c2 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/13dce3a5-4ad9-43f8-8d1a-625fec7900c2 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/13dce3a5-4ad9-43f8-8d1a-625fec7900c2', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 319s future.result() 319s ~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 319s yield maybe_future(km.shutdown_kernel(kernel_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 319s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 319s raise km.ready.exception() # type: ignore[misc] 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/13dce3a5-4ad9-43f8-8d1a-625fec7900c2 (127.0.0.1) 10.340000ms referer=None 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 3.060000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fbde1214-bb33-4919-a788-8f1302cbf929 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fbde1214-bb33-4919-a788-8f1302cbf929 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/fbde1214-bb33-4919-a788-8f1302cbf929 (127.0.0.1) 3.210000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 13dce3a5-4ad9-43f8-8d1a-625fec7900c2 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 13dce3a5-4ad9-43f8-8d1a-625fec7900c2 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/13dce3a5-4ad9-43f8-8d1a-625fec7900c2 (127.0.0.1) 1.950000ms 319s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 319s 319s self = 319s 319s def test_main_kernel_handler(self): 319s # POST request 319s r = self.kern_api.start() 319s kern1 = r.json() 319s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 319s self.assertEqual(r.status_code, 201) 319s self.assertIsInstance(kern1, dict) 319s 319s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 319s expected_csp = '; '.join([ 319s "frame-ancestors 'self'", 319s 'report-uri ' + report_uri, 319s "default-src 'none'" 319s ]) 319s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 319s 319s # GET request 319s r = self.kern_api.list() 319s self.assertEqual(r.status_code, 200) 319s assert isinstance(r.json(), list) 319s self.assertEqual(r.json()[0]['id'], kern1['id']) 319s self.assertEqual(r.json()[0]['name'], kern1['name']) 319s 319s # create another kernel and check that they both are added to the 319s # list of kernels from a GET request 319s kern2 = self.kern_api.start().json() 319s assert isinstance(kern2, dict) 319s r = self.kern_api.list() 319s kernels = r.json() 319s self.assertEqual(r.status_code, 200) 319s assert isinstance(kernels, list) 319s self.assertEqual(len(kernels), 2) 319s 319s # Interrupt a kernel 319s r = self.kern_api.interrupt(kern2['id']) 319s self.assertEqual(r.status_code, 204) 319s 319s # Restart a kernel 319s > r = self.kern_api.restart(kern2['id']) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 319s return self._req('POST', url_path_join(id, 'restart')) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/65a09366-9815-44c0-8a73-8a8f8029db50/restart 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 319s from pathlib import Path 319s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 319s from ._abc import * 319s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 319s from glob import _Globber, _no_recurse_symlinks 319s File "", line 1360, in _find_and_load 319s File "", line 1322, in _find_and_load_unlocked 319s File "", line 1262, in _find_spec 319s File "", line 1556, in find_spec 319s File "", line 1530, in _get_spec 319s File "", line 1661, in find_spec 319s KeyboardInterrupt 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmphv59f75c/runtime/kernel-51cd36e2-e076-4548-882f-32e30db2a93c.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59271 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49737 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 51cd36e2-e076-4548-882f-32e30db2a93c, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.970000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.090000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmphv59f75c/runtime/kernel-65a09366-9815-44c0-8a73-8a8f8029db50.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44633 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41631 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 65a09366-9815-44c0-8a73-8a8f8029db50, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.590000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.810000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 65a09366-9815-44c0-8a73-8a8f8029db50 319s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/65a09366-9815-44c0-8a73-8a8f8029db50/interrupt (127.0.0.1) 3.230000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 319s yield maybe_future(km.restart_kernel(kernel_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 319s result = coro.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 319s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 319s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 319s yield self # This tells Task to wait for completion. 319s ^^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 319s future.result() 319s ~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 319s await ensure_async(kernel.restart_kernel(now=now)) 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 319s await self._async_shutdown_kernel(now=now, restart=True) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/65a09366-9815-44c0-8a73-8a8f8029db50/restart (127.0.0.1) 6.440000ms referer=None 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.790000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 51cd36e2-e076-4548-882f-32e30db2a93c 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 51cd36e2-e076-4548-882f-32e30db2a93c 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/51cd36e2-e076-4548-882f-32e30db2a93c (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/51cd36e2-e076-4548-882f-32e30db2a93c', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 319s future.result() 319s ~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 319s yield maybe_future(km.shutdown_kernel(kernel_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 319s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 319s raise km.ready.exception() # type: ignore[misc] 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/51cd36e2-e076-4548-882f-32e30db2a93c (127.0.0.1) 10.590000ms referer=None 319s ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 319s 319s self = 319s 319s def test_no_kernels(self): 319s """Make sure there are no kernels running at the start""" 319s kernels = self.kern_api.list().json() 319s > self.assertEqual(kernels, []) 319s E AssertionError: Lists differ: [{'id': '51cd36e2-e076-4548-882f-32e30db2a[281 chars]: 0}] != [] 319s E 319s E First list contains 2 additional elements. 319s E First extra element 0: 319s E {'id': '51cd36e2-e076-4548-882f-32e30db2a93c', 'name': 'python3', 'last_activity': '2026-01-24T03:34:16.128181Z', 'execution_state': 'starting', 'connections': 0} 319s E 319s E + [] 319s E - [{'connections': 0, 319s E - 'execution_state': 'starting', 319s E - 'id': '51cd36e2-e076-4548-882f-32e30db2a93c', 319s E - 'last_activity': '2026-01-24T03:34:16.128181Z', 319s E - 'name': 'python3'}, 319s E - {'connections': 0, 319s E - 'execution_state': 'starting', 319s E - 'id': '65a09366-9815-44c0-8a73-8a8f8029db50', 319s E - 'last_activity': '2026-01-24T03:34:16.161757Z', 319s E - 'name': 'python3'}] 319s 319s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.910000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.800000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 51cd36e2-e076-4548-882f-32e30db2a93c 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 51cd36e2-e076-4548-882f-32e30db2a93c 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/51cd36e2-e076-4548-882f-32e30db2a93c (127.0.0.1) 3.650000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 65a09366-9815-44c0-8a73-8a8f8029db50 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 65a09366-9815-44c0-8a73-8a8f8029db50 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/65a09366-9815-44c0-8a73-8a8f8029db50 (127.0.0.1) 2.460000ms 319s ---------------------------- Captured log teardown ----------------------------- 319s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 51cd36e2-e076-4548-882f-32e30db2a93c 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fbde1214-bb33-4919-a788-8f1302cbf929 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2961068e-a64e-4e24-86bf-3a5a302f6e57 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 13dce3a5-4ad9-43f8-8d1a-625fec7900c2 319s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 319s __________________________ SessionAPITest.test_create __________________________ 319s 319s @self.addCleanup 319s def cleanup_sessions(): 319s for session in self.sess_api.list().json(): 319s > self.sess_api.delete(session['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/8fcf553d-751b-4f04-9a55-046791174332 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ------------------------------ Captured log setup ------------------------------ 319s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpnhjtk0gc/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpnhjtk0gc/etc/jupyter'] for config files 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpnhjtk0gc/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpnhjtk0gc/config 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpnhjtk0gc/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpnhjtk0gc/config 319s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpnhjtk0gc/notebooks 319s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 319s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 319s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 319s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 319s WARNING NotebookApp:handlers.py:612 Forbidden 319s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 2.600000ms referer=None 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.680000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnhjtk0gc/runtime/kernel-0bcaf5fa-3304-4a8e-a3b1-22943da6cb60.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54761 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46517 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 0bcaf5fa-3304-4a8e-a3b1-22943da6cb60, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpnhjtk0gc/notebooks/foo'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 31.000000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.010000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/8fcf553d-751b-4f04-9a55-046791174332 (127.0.0.1) 3.260000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.950000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0bcaf5fa-3304-4a8e-a3b1-22943da6cb60 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0bcaf5fa-3304-4a8e-a3b1-22943da6cb60 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/8fcf553d-751b-4f04-9a55-046791174332 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/8fcf553d-751b-4f04-9a55-046791174332', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 319s yielded = self.gen.send(value) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/8fcf553d-751b-4f04-9a55-046791174332 (127.0.0.1) 14.270000ms referer=None 319s --------------------------- Captured stderr teardown --------------------------- 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 319s from .connect import * # noqa: F403 319s ^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 319s from subprocess import PIPE, Popen 319s File "/usr/lib/python3.13/subprocess.py", line 49, in 319s import signal 319s File "/usr/lib/python3.13/signal.py", line 7, in 319s _IntEnum._convert_( 319s ~~~~~~~~~~~~~~~~~~^ 319s 'Signals', __name__, 319s ^^^^^^^^^^^^^^^^^^^^ 319s ...<2 lines>... 319s and (name.startswith('SIG') and not name.startswith('SIG_')) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s or name.startswith('CTRL_')) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3.13/enum.py", line 928, in _convert_ 319s cls = _simple_enum(etype=cls, boundary=boundary or KEEP)(tmp_cls) 319s File "/usr/lib/python3.13/enum.py", line 1794, in convert_class 319s if _is_dunder(name) or _is_private(cls_name, name) or _is_sunder(name) or _is_descriptor(obj): 319s ~~~~~~~~~~~^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3.13/enum.py", line 78, in _is_private 319s def _is_private(cls_name, name): 319s 319s KeyboardInterrupt 319s __________________ SessionAPITest.test_create_console_session __________________ 319s 319s @self.addCleanup 319s def cleanup_sessions(): 319s for session in self.sess_api.list().json(): 319s > self.sess_api.delete(session['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/b48e2c3a-36ea-4811-9127-e736ed7ba37b 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnhjtk0gc/runtime/kernel-3af98123-f841-4d51-bfb2-e383908e533e.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46709 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40219 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3af98123-f841-4d51-bfb2-e383908e533e, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpnhjtk0gc/notebooks/foo'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 25.080000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.020000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0bcaf5fa-3304-4a8e-a3b1-22943da6cb60 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0bcaf5fa-3304-4a8e-a3b1-22943da6cb60 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/8fcf553d-751b-4f04-9a55-046791174332 (127.0.0.1) 3.380000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3af98123-f841-4d51-bfb2-e383908e533e 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3af98123-f841-4d51-bfb2-e383908e533e 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/b48e2c3a-36ea-4811-9127-e736ed7ba37b (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b48e2c3a-36ea-4811-9127-e736ed7ba37b', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 319s yielded = self.gen.send(value) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 319s gc.collect() 319s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/b48e2c3a-36ea-4811-9127-e736ed7ba37b (127.0.0.1) 13.150000ms referer=None 319s --------------------------- Captured stderr teardown --------------------------- 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 319s from .connect import * # noqa: F403 319s ^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 319s import json 319s File "/usr/lib/python3.13/json/__init__.py", line 106, in 319s from .decoder import JSONDecoder, JSONDecodeError 319s File "/usr/lib/python3.13/json/decoder.py", line 5, in 319s from json import scanner 319s File "/usr/lib/python3.13/json/scanner.py", line 13, in 319s (re.VERBOSE | re.MULTILINE | re.DOTALL)) 319s ~~~~~~~~~~~^~~~~~~~~~~~~~ 319s File "/usr/lib/python3.13/enum.py", line 1605, in __or__ 319s return self.__class__(value | other_value) 319s ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3.13/enum.py", line 726, in __call__ 319s return cls.__new__(cls, value) 319s ~~~~~~~~~~~^^^^^^^^^^^^ 319s File "/usr/lib/python3.13/enum.py", line 1188, in __new__ 319s result = cls._missing_(value) 319s File "/usr/lib/python3.13/enum.py", line 1525, in _missing_ 319s for m in cls._iter_member_(member_value): 319s ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3.13/enum.py", line 1454, in _iter_member_by_def_ 319s yield from sorted( 319s ~~~~~~^ 319s cls._iter_member_by_value_(value), 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s key=lambda m: m._sort_order_, 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s ) 319s ^ 319s File "/usr/lib/python3.13/enum.py", line 1445, in _iter_member_by_value_ 319s yield cls._value2member_map_.get(val) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ 319s KeyboardInterrupt 319s ____________________ SessionAPITest.test_create_deprecated _____________________ 319s 319s @self.addCleanup 319s def cleanup_sessions(): 319s for session in self.sess_api.list().json(): 319s > self.sess_api.delete(session['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/96ce4a4e-0f61-44d1-84d8-ea2559889301 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 1, in 319s from ._version import ( 319s ...<4 lines>... 319s ) 319s File "", line 1360, in _find_and_load 319s File "", line 1331, in _find_and_load_unlocked 319s File "", line 911, in _load_unlocked 319s KeyboardInterrupt 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnhjtk0gc/runtime/kernel-ae6c94d5-0b0f-4e96-aa31-0cb8b152294d.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35685 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44859 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: ae6c94d5-0b0f-4e96-aa31-0cb8b152294d, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpnhjtk0gc/notebooks/foo'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 25.140000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.240000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3af98123-f841-4d51-bfb2-e383908e533e 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3af98123-f841-4d51-bfb2-e383908e533e 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b48e2c3a-36ea-4811-9127-e736ed7ba37b (127.0.0.1) 3.170000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ae6c94d5-0b0f-4e96-aa31-0cb8b152294d 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ae6c94d5-0b0f-4e96-aa31-0cb8b152294d 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/96ce4a4e-0f61-44d1-84d8-ea2559889301 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/96ce4a4e-0f61-44d1-84d8-ea2559889301', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 319s yielded = self.gen.send(value) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/96ce4a4e-0f61-44d1-84d8-ea2559889301 (127.0.0.1) 12.970000ms referer=None 319s ___________________ SessionAPITest.test_create_file_session ____________________ 319s 319s @self.addCleanup 319s def cleanup_sessions(): 319s for session in self.sess_api.list().json(): 319s > self.sess_api.delete(session['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/9e87bf12-cbc2-4410-a8a2-c9c2dc0ea4ec 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 1, in 319s from ._version import ( 319s ...<4 lines>... 319s ) 319s File "/usr/lib/python3/dist-packages/ipykernel/_version.py", line 11, in 319s match = re.match(pattern, __version__) 319s File "/usr/lib/python3.13/re/__init__.py", line 167, in match 319s return _compile(pattern, flags).match(string) 319s ~~~~~~~~^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3.13/re/__init__.py", line 341, in _compile 319s p = _cache.pop(key, None) 319s KeyboardInterrupt 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnhjtk0gc/runtime/kernel-37f93d5d-e041-4a7c-8846-00ca6545cf1b.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43245 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34791 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 37f93d5d-e041-4a7c-8846-00ca6545cf1b, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpnhjtk0gc/notebooks/foo'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 25.770000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.990000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ae6c94d5-0b0f-4e96-aa31-0cb8b152294d 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ae6c94d5-0b0f-4e96-aa31-0cb8b152294d 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/96ce4a4e-0f61-44d1-84d8-ea2559889301 (127.0.0.1) 3.100000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 37f93d5d-e041-4a7c-8846-00ca6545cf1b 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 37f93d5d-e041-4a7c-8846-00ca6545cf1b 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/9e87bf12-cbc2-4410-a8a2-c9c2dc0ea4ec (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/9e87bf12-cbc2-4410-a8a2-c9c2dc0ea4ec', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 319s yielded = self.gen.send(value) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/9e87bf12-cbc2-4410-a8a2-c9c2dc0ea4ec (127.0.0.1) 13.360000ms referer=None 319s __________________ SessionAPITest.test_create_with_kernel_id ___________________ 319s 319s self = 319s 319s def test_create_with_kernel_id(self): 319s # create a new kernel 319s r = self.request('POST', 'api/kernels') 319s r.raise_for_status() 319s kernel = r.json() 319s 319s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 319s self.assertEqual(resp.status_code, 201) 319s newsession = resp.json() 319s self.assertIn('id', newsession) 319s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 319s self.assertEqual(newsession['kernel']['id'], kernel['id']) 319s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 319s 319s sessions = self.sess_api.list().json() 319s > self.assertEqual(sessions, [newsession]) 319s E AssertionError: Lists differ: [{'id': '9e87bf12-cbc2-4410-a8a2-c9c2dc0ea4ec', 'p[553 chars]ne}}] != [{'id': 'f2854a6c-061f-42d3-ba03-ee39be12ad89', 'p[279 chars]ne}}] 319s E 319s E First differing element 0: 319s E {'id': '9e87bf12-cbc2-4410-a8a2-c9c2dc0ea4ec', 'p[218 chars]: 0}} 319s E {'id': 'f2854a6c-061f-42d3-ba03-ee39be12ad89', 'p[278 chars]one}} 319s E 319s E First list contains 1 additional elements. 319s E First extra element 1: 319s E {'id': 'f2854a6c-061f-42d3-ba03-ee39be12ad89', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': 'a7e7f3dc-c485-40cb-8f89-d84c21529dc1', 'name': 'python3', 'last_activity': '2026-01-24T03:34:16.941487Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 319s E 319s E Diff is 830 characters long. Set self.maxDiff to None to see it. 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnhjtk0gc/runtime/kernel-a7e7f3dc-c485-40cb-8f89-d84c21529dc1.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50685 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55675 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: a7e7f3dc-c485-40cb-8f89-d84c21529dc1, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 26.490000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.140000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.070000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.430000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 37f93d5d-e041-4a7c-8846-00ca6545cf1b 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 37f93d5d-e041-4a7c-8846-00ca6545cf1b 319s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/9e87bf12-cbc2-4410-a8a2-c9c2dc0ea4ec (127.0.0.1) 3.020000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a7e7f3dc-c485-40cb-8f89-d84c21529dc1 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a7e7f3dc-c485-40cb-8f89-d84c21529dc1 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 319s yielded = self.gen.send(value) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 13.200000ms referer=None 319s _____________________ SessionAPITest.test_modify_kernel_id _____________________ 319s 319s @self.addCleanup 319s def cleanup_sessions(): 319s for session in self.sess_api.list().json(): 319s > self.sess_api.delete(session['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 319s from .connect import * # noqa: F403 319s ^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 319s from subprocess import PIPE, Popen 319s File "/usr/lib/python3.13/subprocess.py", line 49, in 319s import signal 319s File "", line 1360, in _find_and_load 319s File "", line 1331, in _find_and_load_unlocked 319s File "", line 935, in _load_unlocked 319s File "", line 1017, in exec_module 319s KeyboardInterrupt 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.100000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnhjtk0gc/runtime/kernel-e44ea23d-04c9-4461-9cd3-1d604ac2e102.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48413 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33247 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: e44ea23d-04c9-4461-9cd3-1d604ac2e102, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.670000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a7e7f3dc-c485-40cb-8f89-d84c21529dc1 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a7e7f3dc-c485-40cb-8f89-d84c21529dc1 319s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 3.510000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.800000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.890000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e44ea23d-04c9-4461-9cd3-1d604ac2e102 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e44ea23d-04c9-4461-9cd3-1d604ac2e102 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 319s yielded = self.gen.send(value) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 13.060000ms referer=None 319s ____________________ SessionAPITest.test_modify_kernel_name ____________________ 319s 319s @self.addCleanup 319s def cleanup_sessions(): 319s for session in self.sess_api.list().json(): 319s > self.sess_api.delete(session['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 319s return _run_code(code, main_globals, None, 319s "__main__", mod_spec) 319s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 319s exec(code, run_globals) 319s ~~~~^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 319s from ipykernel import kernelapp as app 319s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 319s from .connect import * # noqa: F403 319s ^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 319s import json 319s File "", line 1360, in _find_and_load 319s File "", line 1322, in _find_and_load_unlocked 319s File "", line 1262, in _find_spec 319s File "/usr/lib/python3/dist-packages/_distutils_hack/__init__.py", line 107, in find_spec 319s method_name = 'spec_for_{fullname}'.format(**locals()) 319s KeyboardInterrupt 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.100000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnhjtk0gc/runtime/kernel-723046a6-ac90-4407-8f26-49edb80b91fa.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51861 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35793 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 723046a6-ac90-4407-8f26-49edb80b91fa, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpnhjtk0gc/notebooks/foo'} 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e44ea23d-04c9-4461-9cd3-1d604ac2e102 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e44ea23d-04c9-4461-9cd3-1d604ac2e102 319s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 25.610000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 3.070000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.800000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 723046a6-ac90-4407-8f26-49edb80b91fa 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 723046a6-ac90-4407-8f26-49edb80b91fa 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 319s yielded = self.gen.send(value) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 319s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 319s stopper = ensure_async(km.shutdown_kernel(now, restart)) 319s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 319s return _runner_map[name].run(inner) 319s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 319s return fut.result(None) 319s ~~~~~~~~~~^^^^^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 319s return self.__get_result() 319s ~~~~~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 319s raise self._exception 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 319s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f2854a6c-061f-42d3-ba03-ee39be12ad89 (127.0.0.1) 12.880000ms referer=None 319s ---------------------------- Captured log teardown ----------------------------- 319s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 723046a6-ac90-4407-8f26-49edb80b91fa 319s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 319s _______________________ AsyncSessionAPITest.test_create ________________________ 319s 319s @self.addCleanup 319s def cleanup_sessions(): 319s for session in self.sess_api.list().json(): 319s > self.sess_api.delete(session['id']) 319s 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 319s return self._req('DELETE', id) 319s ^^^^^^^^^^^^^^^^^^^^^^^ 319s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 319s response.raise_for_status() 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s self = 319s 319s def raise_for_status(self): 319s """Raises :class:`HTTPError`, if one occurred.""" 319s 319s http_error_msg = "" 319s if isinstance(self.reason, bytes): 319s # We attempt to decode utf-8 first because some servers 319s # choose to localize their reason strings. If the string 319s # isn't utf-8, we fall back to iso-8859-1 for all other 319s # encodings. (See PR #3538) 319s try: 319s reason = self.reason.decode("utf-8") 319s except UnicodeDecodeError: 319s reason = self.reason.decode("iso-8859-1") 319s else: 319s reason = self.reason 319s 319s if 400 <= self.status_code < 500: 319s http_error_msg = ( 319s f"{self.status_code} Client Error: {reason} for url: {self.url}" 319s ) 319s 319s elif 500 <= self.status_code < 600: 319s http_error_msg = ( 319s f"{self.status_code} Server Error: {reason} for url: {self.url}" 319s ) 319s 319s if http_error_msg: 319s > raise HTTPError(http_error_msg, response=self) 319s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/567e15f8-b474-4934-bf0c-f7694ab6f61d 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ------------------------------ Captured log setup ------------------------------ 319s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpyu2ysihs/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpyu2ysihs/etc/jupyter'] for config files 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpyu2ysihs/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpyu2ysihs/config 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpyu2ysihs/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpyu2ysihs/config 319s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpyu2ysihs/notebooks 319s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 319s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 319s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 319s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 319s WARNING NotebookApp:handlers.py:612 Forbidden 319s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.370000ms referer=None 319s ----------------------------- Captured stderr call ----------------------------- 319s Traceback (most recent call last): 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.170000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 319s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpyu2ysihs/runtime/kernel-9db78430-7e4b-4283-ba39-216f948922a2.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53631 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:32981 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9db78430-7e4b-4283-ba39-216f948922a2, name: python3 319s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpyu2ysihs/notebooks/foo'} 319s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 22.300000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.780000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/567e15f8-b474-4934-bf0c-f7694ab6f61d (127.0.0.1) 1.770000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.720000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9db78430-7e4b-4283-ba39-216f948922a2 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9db78430-7e4b-4283-ba39-216f948922a2 319s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/567e15f8-b474-4934-bf0c-f7694ab6f61d (127.0.0.1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/567e15f8-b474-4934-bf0c-f7694ab6f61d', version='HTTP/1.1', remote_ip='127.0.0.1') 319s Traceback (most recent call last): 319s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 319s result = await result 319s ^^^^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 319s future.result() 319s ~~~~~~~~~~~~~^^ 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 319s yield maybe_future(sm.delete_session(session_id)) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 319s yielded = self.gen.throw(exc) 319s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 319s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 319s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 319s value = future.result() 319s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 319s raise self._exception.with_traceback(self._exception_tb) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 319s result = coro.send(None) 319s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 319s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 319s raise km.ready.exception() # type: ignore[misc] 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 319s await kernel_awaitable 319s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 319s result = await obj 319s ^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 319s raise e 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 319s out = await method(self, *args, **kwargs) 319s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 319s await self._async_finish_shutdown(restart=restart) 319s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 319s await asyncio.wait_for( 319s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 319s ) 319s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 319s async with timeouts.timeout(timeout): 319s ~~~~~~~~~~~~~~~~^^^^^^^^^ 319s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 319s raise RuntimeError("Timeout should be used inside a task") 319s RuntimeError: Timeout should be used inside a task 319s WARNING NotebookApp:handlers.py:612 Unhandled error 319s ERROR NotebookApp:log.py:55 { 319s "Host": "localhost:12341", 319s "Accept": "*/*", 319s "User-Agent": "python-requests/2.32.5" 319s } 320s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/567e15f8-b474-4934-bf0c-f7694ab6f61d (127.0.0.1) 10.520000ms referer=None 320s --------------------------- Captured stderr teardown --------------------------- 320s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 320s return _run_code(code, main_globals, None, 320s "__main__", mod_spec) 320s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 320s exec(code, run_globals) 320s ~~~~^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 320s from ipykernel import kernelapp as app 320s File "", line 1360, in _find_and_load 320s File "", line 1331, in _find_and_load_unlocked 320s File "", line 915, in _load_unlocked 320s KeyboardInterrupt 320s _______________ AsyncSessionAPITest.test_create_console_session ________________ 320s 320s @self.addCleanup 320s def cleanup_sessions(): 320s for session in self.sess_api.list().json(): 320s > self.sess_api.delete(session['id']) 320s 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 320s return self._req('DELETE', id) 320s ^^^^^^^^^^^^^^^^^^^^^^^ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 320s response.raise_for_status() 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s 320s self = 320s 320s def raise_for_status(self): 320s """Raises :class:`HTTPError`, if one occurred.""" 320s 320s http_error_msg = "" 320s if isinstance(self.reason, bytes): 320s # We attempt to decode utf-8 first because some servers 320s # choose to localize their reason strings. If the string 320s # isn't utf-8, we fall back to iso-8859-1 for all other 320s # encodings. (See PR #3538) 320s try: 320s reason = self.reason.decode("utf-8") 320s except UnicodeDecodeError: 320s reason = self.reason.decode("iso-8859-1") 320s else: 320s reason = self.reason 320s 320s if 400 <= self.status_code < 500: 320s http_error_msg = ( 320s f"{self.status_code} Client Error: {reason} for url: {self.url}" 320s ) 320s 320s elif 500 <= self.status_code < 600: 320s http_error_msg = ( 320s f"{self.status_code} Server Error: {reason} for url: {self.url}" 320s ) 320s 320s if http_error_msg: 320s > raise HTTPError(http_error_msg, response=self) 320s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/418f4221-0596-48a2-ae71-8ad0a127e180 320s 320s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 320s ----------------------------- Captured stderr call ----------------------------- 320s Traceback (most recent call last): 320s ------------------------------ Captured log call ------------------------------- 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 320s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpyu2ysihs/runtime/kernel-8ac73c35-f61c-41c7-b570-31ebda7ced4f.json'] 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35607 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33965 320s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8ac73c35-f61c-41c7-b570-31ebda7ced4f, name: python3 320s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpyu2ysihs/notebooks/foo'} 320s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 20.840000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.790000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9db78430-7e4b-4283-ba39-216f948922a2 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9db78430-7e4b-4283-ba39-216f948922a2 320s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/567e15f8-b474-4934-bf0c-f7694ab6f61d (127.0.0.1) 2.310000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8ac73c35-f61c-41c7-b570-31ebda7ced4f 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8ac73c35-f61c-41c7-b570-31ebda7ced4f 320s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/418f4221-0596-48a2-ae71-8ad0a127e180 (127.0.0.1) 320s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/418f4221-0596-48a2-ae71-8ad0a127e180', version='HTTP/1.1', remote_ip='127.0.0.1') 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 320s result = await result 320s ^^^^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 320s future.result() 320s ~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 320s yield maybe_future(sm.delete_session(session_id)) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 320s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 320s raise self._exception.with_traceback(self._exception_tb) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 320s result = coro.send(None) 320s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 320s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 320s raise km.ready.exception() # type: ignore[misc] 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s WARNING NotebookApp:handlers.py:612 Unhandled error 320s ERROR NotebookApp:log.py:55 { 320s "Host": "localhost:12341", 320s "Accept": "*/*", 320s "User-Agent": "python-requests/2.32.5" 320s } 320s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/418f4221-0596-48a2-ae71-8ad0a127e180 (127.0.0.1) 10.700000ms referer=None 320s --------------------------- Captured stderr teardown --------------------------- 320s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 320s return _run_code(code, main_globals, None, 320s "__main__", mod_spec) 320s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 320s exec(code, run_globals) 320s ~~~~^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 320s from pathlib import Path 320s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 320s from ._abc import * 320s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 320s from glob import _Globber, _no_recurse_symlinks 320s File "/usr/lib/python3.13/glob.py", line 5, in 320s import re 320s File "/usr/lib/python3.13/re/__init__.py", line 126, in 320s from . import _compiler, _parser 320s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 320s from . import _parser 320s File "/usr/lib/python3.13/re/_parser.py", line 15, in 320s from ._constants import * 320s KeyboardInterrupt 320s __________________ AsyncSessionAPITest.test_create_deprecated __________________ 320s 320s @self.addCleanup 320s def cleanup_sessions(): 320s for session in self.sess_api.list().json(): 320s > self.sess_api.delete(session['id']) 320s 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 320s return self._req('DELETE', id) 320s ^^^^^^^^^^^^^^^^^^^^^^^ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 320s response.raise_for_status() 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s 320s self = 320s 320s def raise_for_status(self): 320s """Raises :class:`HTTPError`, if one occurred.""" 320s 320s http_error_msg = "" 320s if isinstance(self.reason, bytes): 320s # We attempt to decode utf-8 first because some servers 320s # choose to localize their reason strings. If the string 320s # isn't utf-8, we fall back to iso-8859-1 for all other 320s # encodings. (See PR #3538) 320s try: 320s reason = self.reason.decode("utf-8") 320s except UnicodeDecodeError: 320s reason = self.reason.decode("iso-8859-1") 320s else: 320s reason = self.reason 320s 320s if 400 <= self.status_code < 500: 320s http_error_msg = ( 320s f"{self.status_code} Client Error: {reason} for url: {self.url}" 320s ) 320s 320s elif 500 <= self.status_code < 600: 320s http_error_msg = ( 320s f"{self.status_code} Server Error: {reason} for url: {self.url}" 320s ) 320s 320s if http_error_msg: 320s > raise HTTPError(http_error_msg, response=self) 320s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/d0072e98-6d7b-4ef5-b658-b6c9ca47bbf1 320s 320s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 320s ------------------------------ Captured log call ------------------------------- 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 320s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 320s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpyu2ysihs/runtime/kernel-b8603468-34cb-4a46-b0f6-17ee27dbdca7.json'] 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39723 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38621 320s INFO NotebookApp:kernelmanager.py:179 Kernel started: b8603468-34cb-4a46-b0f6-17ee27dbdca7, name: python3 320s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpyu2ysihs/notebooks/foo'} 320s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.290000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.760000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8ac73c35-f61c-41c7-b570-31ebda7ced4f 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8ac73c35-f61c-41c7-b570-31ebda7ced4f 320s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/418f4221-0596-48a2-ae71-8ad0a127e180 (127.0.0.1) 2.140000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for b8603468-34cb-4a46-b0f6-17ee27dbdca7 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b8603468-34cb-4a46-b0f6-17ee27dbdca7 320s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/d0072e98-6d7b-4ef5-b658-b6c9ca47bbf1 (127.0.0.1) 320s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/d0072e98-6d7b-4ef5-b658-b6c9ca47bbf1', version='HTTP/1.1', remote_ip='127.0.0.1') 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 320s result = await result 320s ^^^^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 320s future.result() 320s ~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 320s yield maybe_future(sm.delete_session(session_id)) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 320s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 320s raise self._exception.with_traceback(self._exception_tb) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 320s result = coro.send(None) 320s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 320s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 320s raise km.ready.exception() # type: ignore[misc] 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s WARNING NotebookApp:handlers.py:612 Unhandled error 320s ERROR NotebookApp:log.py:55 { 320s "Host": "localhost:12341", 320s "Accept": "*/*", 320s "User-Agent": "python-requests/2.32.5" 320s } 320s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/d0072e98-6d7b-4ef5-b658-b6c9ca47bbf1 (127.0.0.1) 10.240000ms referer=None 320s --------------------------- Captured stderr teardown --------------------------- 320s Traceback (most recent call last): 320s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 320s return _run_code(code, main_globals, None, 320s "__main__", mod_spec) 320s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 320s exec(code, run_globals) 320s ~~~~^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 320s from pathlib import Path 320s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 320s from ._abc import * 320s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 320s from glob import _Globber, _no_recurse_symlinks 320s File "/usr/lib/python3.13/glob.py", line 5, in 320s import re 320s File "/usr/lib/python3.13/re/__init__.py", line 126, in 320s from . import _compiler, _parser 320s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 320s from . import _parser 320s File "/usr/lib/python3.13/re/_parser.py", line 15, in 320s from ._constants import * 320s File "", line 1360, in _find_and_load 320s File "", line 1331, in _find_and_load_unlocked 320s File "", line 935, in _load_unlocked 320s File "", line 1019, in exec_module 320s File "", line 1152, in get_code 320s File "", line 781, in _compile_bytecode 320s KeyboardInterrupt 320s _________________ AsyncSessionAPITest.test_create_file_session _________________ 320s 320s @self.addCleanup 320s def cleanup_sessions(): 320s for session in self.sess_api.list().json(): 320s > self.sess_api.delete(session['id']) 320s 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 320s return self._req('DELETE', id) 320s ^^^^^^^^^^^^^^^^^^^^^^^ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 320s response.raise_for_status() 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s 320s self = 320s 320s def raise_for_status(self): 320s """Raises :class:`HTTPError`, if one occurred.""" 320s 320s http_error_msg = "" 320s if isinstance(self.reason, bytes): 320s # We attempt to decode utf-8 first because some servers 320s # choose to localize their reason strings. If the string 320s # isn't utf-8, we fall back to iso-8859-1 for all other 320s # encodings. (See PR #3538) 320s try: 320s reason = self.reason.decode("utf-8") 320s except UnicodeDecodeError: 320s reason = self.reason.decode("iso-8859-1") 320s else: 320s reason = self.reason 320s 320s if 400 <= self.status_code < 500: 320s http_error_msg = ( 320s f"{self.status_code} Client Error: {reason} for url: {self.url}" 320s ) 320s 320s elif 500 <= self.status_code < 600: 320s http_error_msg = ( 320s f"{self.status_code} Server Error: {reason} for url: {self.url}" 320s ) 320s 320s if http_error_msg: 320s > raise HTTPError(http_error_msg, response=self) 320s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/243afd68-40ef-4a1b-a5cc-40972cf3455d 320s 320s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 320s ----------------------------- Captured stderr call ----------------------------- 320s Traceback (most recent call last): 320s ------------------------------ Captured log call ------------------------------- 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 320s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpyu2ysihs/runtime/kernel-8e6d40c9-f9eb-417c-83e6-25d78562fcef.json'] 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54371 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38105 320s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8e6d40c9-f9eb-417c-83e6-25d78562fcef, name: python3 320s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpyu2ysihs/notebooks/foo'} 320s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.250000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.020000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for b8603468-34cb-4a46-b0f6-17ee27dbdca7 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b8603468-34cb-4a46-b0f6-17ee27dbdca7 320s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/d0072e98-6d7b-4ef5-b658-b6c9ca47bbf1 (127.0.0.1) 3.540000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8e6d40c9-f9eb-417c-83e6-25d78562fcef 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8e6d40c9-f9eb-417c-83e6-25d78562fcef 320s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/243afd68-40ef-4a1b-a5cc-40972cf3455d (127.0.0.1) 320s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/243afd68-40ef-4a1b-a5cc-40972cf3455d', version='HTTP/1.1', remote_ip='127.0.0.1') 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 320s result = await result 320s ^^^^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 320s future.result() 320s ~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 320s yield maybe_future(sm.delete_session(session_id)) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 320s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 320s raise self._exception.with_traceback(self._exception_tb) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 320s result = coro.send(None) 320s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 320s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 320s raise km.ready.exception() # type: ignore[misc] 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s WARNING NotebookApp:handlers.py:612 Unhandled error 320s ERROR NotebookApp:log.py:55 { 320s "Host": "localhost:12341", 320s "Accept": "*/*", 320s "User-Agent": "python-requests/2.32.5" 320s } 320s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/243afd68-40ef-4a1b-a5cc-40972cf3455d (127.0.0.1) 10.740000ms referer=None 320s --------------------------- Captured stderr teardown --------------------------- 320s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 320s return _run_code(code, main_globals, None, 320s "__main__", mod_spec) 320s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 320s exec(code, run_globals) 320s ~~~~^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 320s from pathlib import Path 320s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 320s from ._abc import * 320s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 320s from glob import _Globber, _no_recurse_symlinks 320s File "/usr/lib/python3.13/glob.py", line 5, in 320s import re 320s File "/usr/lib/python3.13/re/__init__.py", line 381, in 320s import copyreg 320s File "", line 1360, in _find_and_load 320s File "", line 1331, in _find_and_load_unlocked 320s File "", line 935, in _load_unlocked 320s File "", line 1019, in exec_module 320s File "", line 1152, in get_code 320s File "", line 781, in _compile_bytecode 320s KeyboardInterrupt 320s ________________ AsyncSessionAPITest.test_create_with_kernel_id ________________ 320s 320s self = 320s 320s def test_create_with_kernel_id(self): 320s # create a new kernel 320s r = self.request('POST', 'api/kernels') 320s r.raise_for_status() 320s kernel = r.json() 320s 320s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 320s self.assertEqual(resp.status_code, 201) 320s newsession = resp.json() 320s self.assertIn('id', newsession) 320s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 320s self.assertEqual(newsession['kernel']['id'], kernel['id']) 320s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 320s 320s sessions = self.sess_api.list().json() 320s > self.assertEqual(sessions, [newsession]) 320s E AssertionError: Lists differ: [{'id': '243afd68-40ef-4a1b-a5cc-40972cf3455d', 'p[553 chars]ne}}] != [{'id': '8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29', 'p[279 chars]ne}}] 320s E 320s E First differing element 0: 320s E {'id': '243afd68-40ef-4a1b-a5cc-40972cf3455d', 'p[218 chars]: 0}} 320s E {'id': '8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29', 'p[278 chars]one}} 320s E 320s E First list contains 1 additional elements. 320s E First extra element 1: 320s E {'id': '8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': 'ece44cf9-d2a0-430e-b3cc-0734871f1723', 'name': 'python3', 'last_activity': '2026-01-24T03:34:17.687405Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 320s E 320s E Diff is 830 characters long. Set self.maxDiff to None to see it. 320s 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 320s ----------------------------- Captured stderr call ----------------------------- 320s Traceback (most recent call last): 320s ------------------------------ Captured log call ------------------------------- 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 320s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpyu2ysihs/runtime/kernel-ece44cf9-d2a0-430e-b3cc-0734871f1723.json'] 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54465 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39619 320s INFO NotebookApp:kernelmanager.py:179 Kernel started: ece44cf9-d2a0-430e-b3cc-0734871f1723, name: python3 320s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 320s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.390000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 1.970000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.870000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.820000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8e6d40c9-f9eb-417c-83e6-25d78562fcef 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8e6d40c9-f9eb-417c-83e6-25d78562fcef 320s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/243afd68-40ef-4a1b-a5cc-40972cf3455d (127.0.0.1) 2.090000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ece44cf9-d2a0-430e-b3cc-0734871f1723 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ece44cf9-d2a0-430e-b3cc-0734871f1723 320s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 320s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29', version='HTTP/1.1', remote_ip='127.0.0.1') 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 320s result = await result 320s ^^^^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 320s future.result() 320s ~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 320s yield maybe_future(sm.delete_session(session_id)) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 320s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 320s raise self._exception.with_traceback(self._exception_tb) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 320s result = coro.send(None) 320s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 320s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 320s raise km.ready.exception() # type: ignore[misc] 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s WARNING NotebookApp:handlers.py:612 Unhandled error 320s ERROR NotebookApp:log.py:55 { 320s "Host": "localhost:12341", 320s "Accept": "*/*", 320s "User-Agent": "python-requests/2.32.5" 320s } 320s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 10.440000ms referer=None 320s __________________ AsyncSessionAPITest.test_modify_kernel_id ___________________ 320s 320s @self.addCleanup 320s def cleanup_sessions(): 320s for session in self.sess_api.list().json(): 320s > self.sess_api.delete(session['id']) 320s 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 320s return self._req('DELETE', id) 320s ^^^^^^^^^^^^^^^^^^^^^^^ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 320s response.raise_for_status() 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s 320s self = 320s 320s def raise_for_status(self): 320s """Raises :class:`HTTPError`, if one occurred.""" 320s 320s http_error_msg = "" 320s if isinstance(self.reason, bytes): 320s # We attempt to decode utf-8 first because some servers 320s # choose to localize their reason strings. If the string 320s # isn't utf-8, we fall back to iso-8859-1 for all other 320s # encodings. (See PR #3538) 320s try: 320s reason = self.reason.decode("utf-8") 320s except UnicodeDecodeError: 320s reason = self.reason.decode("iso-8859-1") 320s else: 320s reason = self.reason 320s 320s if 400 <= self.status_code < 500: 320s http_error_msg = ( 320s f"{self.status_code} Client Error: {reason} for url: {self.url}" 320s ) 320s 320s elif 500 <= self.status_code < 600: 320s http_error_msg = ( 320s f"{self.status_code} Server Error: {reason} for url: {self.url}" 320s ) 320s 320s if http_error_msg: 320s > raise HTTPError(http_error_msg, response=self) 320s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 320s 320s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 320s ----------------------------- Captured stderr call ----------------------------- 320s Traceback (most recent call last): 320s ------------------------------ Captured log call ------------------------------- 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.010000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 320s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpyu2ysihs/runtime/kernel-a5ff5f97-3969-473f-bc1c-cf1cd898ea24.json'] 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45783 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59625 320s INFO NotebookApp:kernelmanager.py:179 Kernel started: a5ff5f97-3969-473f-bc1c-cf1cd898ea24, name: python3 320s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 320s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 20.200000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ece44cf9-d2a0-430e-b3cc-0734871f1723 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ece44cf9-d2a0-430e-b3cc-0734871f1723 320s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 2.530000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.600000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.730000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a5ff5f97-3969-473f-bc1c-cf1cd898ea24 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a5ff5f97-3969-473f-bc1c-cf1cd898ea24 320s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 320s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29', version='HTTP/1.1', remote_ip='127.0.0.1') 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 320s result = await result 320s ^^^^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 320s future.result() 320s ~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 320s yield maybe_future(sm.delete_session(session_id)) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 320s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 320s raise self._exception.with_traceback(self._exception_tb) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 320s result = coro.send(None) 320s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 320s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 320s raise km.ready.exception() # type: ignore[misc] 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s WARNING NotebookApp:handlers.py:612 Unhandled error 320s ERROR NotebookApp:log.py:55 { 320s "Host": "localhost:12341", 320s "Accept": "*/*", 320s "User-Agent": "python-requests/2.32.5" 320s } 320s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 10.230000ms referer=None 320s --------------------------- Captured stderr teardown --------------------------- 320s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 320s return _run_code(code, main_globals, None, 320s "__main__", mod_spec) 320s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 320s exec(code, run_globals) 320s ~~~~^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 320s from ipykernel import kernelapp as app 320s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 1, in 320s from ._version import ( 320s ...<4 lines>... 320s ) 320s File "", line 1360, in _find_and_load 320s File "", line 1322, in _find_and_load_unlocked 320s File "", line 1262, in _find_spec 320s File "", line 1556, in find_spec 320s File "", line 1530, in _get_spec 320s File "", line 1633, in find_spec 320s File "", line 1676, in _fill_cache 320s KeyboardInterrupt 320s _________________ AsyncSessionAPITest.test_modify_kernel_name __________________ 320s 320s @self.addCleanup 320s def cleanup_sessions(): 320s for session in self.sess_api.list().json(): 320s > self.sess_api.delete(session['id']) 320s 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 320s return self._req('DELETE', id) 320s ^^^^^^^^^^^^^^^^^^^^^^^ 320s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 320s response.raise_for_status() 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s 320s self = 320s 320s def raise_for_status(self): 320s """Raises :class:`HTTPError`, if one occurred.""" 320s 320s http_error_msg = "" 320s if isinstance(self.reason, bytes): 320s # We attempt to decode utf-8 first because some servers 320s # choose to localize their reason strings. If the string 320s # isn't utf-8, we fall back to iso-8859-1 for all other 320s # encodings. (See PR #3538) 320s try: 320s reason = self.reason.decode("utf-8") 320s except UnicodeDecodeError: 320s reason = self.reason.decode("iso-8859-1") 320s else: 320s reason = self.reason 320s 320s if 400 <= self.status_code < 500: 320s http_error_msg = ( 320s f"{self.status_code} Client Error: {reason} for url: {self.url}" 320s ) 320s 320s elif 500 <= self.status_code < 600: 320s http_error_msg = ( 320s f"{self.status_code} Server Error: {reason} for url: {self.url}" 320s ) 320s 320s if http_error_msg: 320s > raise HTTPError(http_error_msg, response=self) 320s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 320s 320s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 320s ------------------------------ Captured log call ------------------------------- 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.320000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 320s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpyu2ysihs/runtime/kernel-04d070cd-04cb-44f6-b297-a72ed8d0f126.json'] 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60547 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52217 320s INFO NotebookApp:kernelmanager.py:179 Kernel started: 04d070cd-04cb-44f6-b297-a72ed8d0f126, name: python3 320s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpyu2ysihs/notebooks/foo'} 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a5ff5f97-3969-473f-bc1c-cf1cd898ea24 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a5ff5f97-3969-473f-bc1c-cf1cd898ea24 320s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 21.230000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.580000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.750000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 04d070cd-04cb-44f6-b297-a72ed8d0f126 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 04d070cd-04cb-44f6-b297-a72ed8d0f126 320s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 320s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29', version='HTTP/1.1', remote_ip='127.0.0.1') 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 320s result = await result 320s ^^^^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 320s future.result() 320s ~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 320s yield maybe_future(sm.delete_session(session_id)) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 320s yielded = self.gen.throw(exc) 320s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 320s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 320s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 320s value = future.result() 320s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 320s raise self._exception.with_traceback(self._exception_tb) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 320s result = coro.send(None) 320s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 320s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 320s raise km.ready.exception() # type: ignore[misc] 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 320s await kernel_awaitable 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 320s result = await obj 320s ^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 320s raise e 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 320s out = await method(self, *args, **kwargs) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 320s await self._async_finish_shutdown(restart=restart) 320s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 320s await asyncio.wait_for( 320s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 320s ) 320s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 320s async with timeouts.timeout(timeout): 320s ~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 320s raise RuntimeError("Timeout should be used inside a task") 320s RuntimeError: Timeout should be used inside a task 320s WARNING NotebookApp:handlers.py:612 Unhandled error 320s ERROR NotebookApp:log.py:55 { 320s "Host": "localhost:12341", 320s "Accept": "*/*", 320s "User-Agent": "python-requests/2.32.5" 320s } 320s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/8d51a0c9-ecaa-4ee2-90e0-fc82f71b0d29 (127.0.0.1) 10.380000ms referer=None 320s --------------------------- Captured stderr teardown --------------------------- 320s Traceback (most recent call last): 320s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 320s return _run_code(code, main_globals, None, 320s "__main__", mod_spec) 320s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 320s exec(code, run_globals) 320s ~~~~^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 320s from pathlib import Path 320s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 320s from ._abc import * 320s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 320s from glob import _Globber, _no_recurse_symlinks 320s File "/usr/lib/python3.13/glob.py", line 5, in 320s import re 320s File "/usr/lib/python3.13/re/__init__.py", line 126, in 320s from . import _compiler, _parser 320s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 320s from . import _parser 320s File "/usr/lib/python3.13/re/_parser.py", line 15, in 320s from ._constants import * 320s File "/usr/lib/python3.13/re/_constants.py", line 130, in 320s ATCODES = _makecodes( 320s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 320s ...<5 lines>... 320s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 320s ) 320s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 320s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 320s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 320s KeyboardInterrupt 320s ---------------------------- Captured log teardown ----------------------------- 320s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8ac73c35-f61c-41c7-b570-31ebda7ced4f 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ece44cf9-d2a0-430e-b3cc-0734871f1723 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9db78430-7e4b-4283-ba39-216f948922a2 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8e6d40c9-f9eb-417c-83e6-25d78562fcef 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a5ff5f97-3969-473f-bc1c-cf1cd898ea24 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b8603468-34cb-4a46-b0f6-17ee27dbdca7 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 04d070cd-04cb-44f6-b297-a72ed8d0f126 320s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 320s =============================== warnings summary =============================== 320s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 320s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 320s /usr/lib/python3/dist-packages/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. 320s return LooseVersion(v) >= LooseVersion(check) 320s 320s ../../../usr/lib/python3/dist-packages/notebook/_tz.py:29: 1 warning 320s services/kernels/tests/test_kernels_api.py: 72 warnings 320s services/sessions/tests/test_sessions_api.py: 88 warnings 320s /usr/lib/python3/dist-packages/notebook/_tz.py:29: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). 320s dt = unaware(*args, **kwargs) 320s 320s ../../../usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14 320s /usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.integration_tests - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 320s pytestmark = pytest.mark.integration_tests 320s 320s services/kernels/tests/test_kernels_api.py: 6 warnings 320s services/sessions/tests/test_sessions_api.py: 6 warnings 320s /usr/lib/python3/dist-packages/nest_asyncio.py:71: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 320s policy = events.get_event_loop_policy() 320s 320s services/kernels/tests/test_kernels_api.py: 22 warnings 320s services/sessions/tests/test_sessions_api.py: 17 warnings 320s /usr/lib/python3/dist-packages/nest_asyncio.py:40: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 320s loop = events.get_event_loop_policy().get_event_loop() 320s 320s services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 320s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first 320s loop.make_current() 320s 320s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 320s =========================== short test summary info ============================ 320s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_default_kernel 320s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_kernel_handler 320s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 320s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_no_kernels 320s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 320s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_default_kernel 320s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_kernel_handler 320s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 320s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_no_kernels 320s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 320s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_console_session 320s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_deprecated 320s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_file_session 320s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 320s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 320s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 320s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create 320s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_console_session 320s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_deprecated 320s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_file_session 320s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 320s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 320s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 320s ERROR services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 320s ERROR services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 320s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 320s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 320s ========== 23 failed, 307 deselected, 216 warnings, 4 errors in 8.50s ========== 320s *** END OF RUN 4: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 320s *** STARTING RUN 5: python3.14 -m pytest --pyargs notebook -rfE --last-failed --last-failed-no-failures none --ignore=/usr/lib/python3/dist-packages/notebook/tests/selenium --deselect=services/kernels/tests/test_kernels_api.py::KernelAPITest::test_connections 325s ============================= test session starts ============================== 325s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 325s rootdir: /tmp/autopkgtest.CmXq4V/autopkgtest_tmp 325s plugins: typeguard-4.4.4 325s collected 330 items / 307 deselected / 23 selected 325s run-last-failure: rerun previous 23 failures 325s 328s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF [ 39%] 330s services/sessions/tests/test_sessions_api.py FFFFFEFFFFFFFEFF [100%] 330s 330s ==================================== ERRORS ==================================== 330s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 330s 330s self = 330s 330s def tearDown(self): 330s for k in self.kern_api.list().json(): 330s > self.kern_api.shutdown(k['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/a6f31de7-af87-44d1-981e-e192b8b77a61 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 330s import functools 330s File "/usr/lib/python3.13/functools.py", line 18, in 330s from collections import namedtuple 330s File "/usr/lib/python3.13/collections/__init__.py", line 989, in 330s class ChainMap(_collections_abc.MutableMapping): 330s File "/usr/lib/python3.13/collections/__init__.py", line 1039, in ChainMap 330s @_recursive_repr() 330s File "/usr/lib/python3.13/reprlib.py", line 13, in decorating_function 330s repr_running = set() 330s KeyboardInterrupt 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmprqu3eg2j/runtime/kernel-a6f31de7-af87-44d1-981e-e192b8b77a61.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34577 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48111 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: a6f31de7-af87-44d1-981e-e192b8b77a61, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 25.650000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.760000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmprqu3eg2j/runtime/kernel-9ae25daa-c158-469a-8526-fce4e72bbc99.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45025 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55531 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9ae25daa-c158-469a-8526-fce4e72bbc99, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.580000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.690000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 9ae25daa-c158-469a-8526-fce4e72bbc99 330s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/9ae25daa-c158-469a-8526-fce4e72bbc99/interrupt (127.0.0.1) 3.720000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 330s yield maybe_future(km.restart_kernel(kernel_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 330s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 330s await ensure_async(kernel.restart_kernel(now=now)) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 330s await self._async_shutdown_kernel(now=now, restart=True) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/9ae25daa-c158-469a-8526-fce4e72bbc99/restart (127.0.0.1) 8.760000ms referer=None 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.710000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a6f31de7-af87-44d1-981e-e192b8b77a61 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a6f31de7-af87-44d1-981e-e192b8b77a61 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/a6f31de7-af87-44d1-981e-e192b8b77a61 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/a6f31de7-af87-44d1-981e-e192b8b77a61', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 330s yielded = ctx_run(next, result) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 330s yield maybe_future(km.shutdown_kernel(kernel_id)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/a6f31de7-af87-44d1-981e-e192b8b77a61 (127.0.0.1) 11.690000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 330s from ipykernel import kernelapp as app 330s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 330s from .connect import * # noqa: F403 330s ^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 330s import jupyter_client 330s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 330s from .asynchronous import AsyncKernelClient 330s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 330s from .client import AsyncKernelClient # noqa 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 330s import zmq.asyncio 330s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 330s import asyncio 330s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 330s from .base_events import * 330s File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in 330s import concurrent.futures 330s File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in 330s from concurrent.futures._base import (FIRST_COMPLETED, 330s ...<9 lines>... 330s as_completed) 330s File "/usr/lib/python3.13/concurrent/futures/_base.py", line 7, in 330s import logging 330s File "", line 1360, in _find_and_load 330s File "", line 1331, in _find_and_load_unlocked 330s File "", line 935, in _load_unlocked 330s File "", line 1019, in exec_module 330s File "", line 1115, in get_code 330s File "", line 1215, in get_data 330s KeyboardInterrupt 330s _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 330s 330s self = 330s 330s def tearDown(self): 330s for k in self.kern_api.list().json(): 330s > self.kern_api.shutdown(k['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/88d266f6-eb3f-4500-a25d-6059db09de4c 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 330s from glob import _Globber, _no_recurse_symlinks 330s File "/usr/lib/python3.13/glob.py", line 3, in 330s import contextlib 330s File "", line 1357, in _find_and_load 330s File "", line 418, in __enter__ 330s File "", line 311, in acquire 330s File "", line 170, in __enter__ 330s File "", line 132, in setdefault 330s File "", line 74, in __new__ 330s KeyboardInterrupt 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp1nbsle56/runtime/kernel-88d266f6-eb3f-4500-a25d-6059db09de4c.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40623 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33459 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 88d266f6-eb3f-4500-a25d-6059db09de4c, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.570000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.020000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp1nbsle56/runtime/kernel-d6101f6c-53d8-4932-82bf-a1d7354b7c2e.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45929 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56733 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: d6101f6c-53d8-4932-82bf-a1d7354b7c2e, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.440000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.990000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: d6101f6c-53d8-4932-82bf-a1d7354b7c2e 330s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/d6101f6c-53d8-4932-82bf-a1d7354b7c2e/interrupt (127.0.0.1) 2.170000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 330s yield maybe_future(km.restart_kernel(kernel_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 330s result = coro.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 330s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 330s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 330s yield self # This tells Task to wait for completion. 330s ^^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 330s future.result() 330s ~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 330s await ensure_async(kernel.restart_kernel(now=now)) 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 330s await self._async_shutdown_kernel(now=now, restart=True) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/d6101f6c-53d8-4932-82bf-a1d7354b7c2e/restart (127.0.0.1) 9.540000ms referer=None 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.940000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 88d266f6-eb3f-4500-a25d-6059db09de4c 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 88d266f6-eb3f-4500-a25d-6059db09de4c 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/88d266f6-eb3f-4500-a25d-6059db09de4c (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/88d266f6-eb3f-4500-a25d-6059db09de4c', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 330s future.result() 330s ~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 330s yield maybe_future(km.shutdown_kernel(kernel_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 330s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 330s raise km.ready.exception() # type: ignore[misc] 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/88d266f6-eb3f-4500-a25d-6059db09de4c (127.0.0.1) 10.750000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 330s from ipykernel import kernelapp as app 330s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 330s from .connect import * # noqa: F403 330s ^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 330s import jupyter_client 330s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 330s from .asynchronous import AsyncKernelClient 330s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 330s from .client import AsyncKernelClient # noqa 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 330s import zmq.asyncio 330s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 330s import asyncio 330s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 330s from .base_events import * 330s File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in 330s import concurrent.futures 330s File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in 330s from concurrent.futures._base import (FIRST_COMPLETED, 330s ...<9 lines>... 330s as_completed) 330s File "/usr/lib/python3.13/concurrent/futures/_base.py", line 7, in 330s import logging 330s File "/usr/lib/python3.13/logging/__init__.py", line 26, in 330s import sys, os, time, io, re, traceback, warnings, weakref, collections.abc 330s File "", line 1360, in _find_and_load 330s File "", line 1322, in _find_and_load_unlocked 330s File "", line 1262, in _find_spec 330s File "", line 984, in find_spec 330s KeyboardInterrupt 330s ________ ERROR at teardown of SessionAPITest.test_create_with_kernel_id ________ 330s 330s @self.addCleanup 330s def cleanup_sessions(): 330s for session in self.sess_api.list().json(): 330s > self.sess_api.delete(session['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp29ses7j_/runtime/kernel-5c0b690a-ddef-454c-b635-fb2fd955aa7c.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37117 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57131 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 5c0b690a-ddef-454c-b635-fb2fd955aa7c, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.080000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.110000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.970000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.860000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e265784e-2fd0-425d-99c6-f9ef37bb257f 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e265784e-2fd0-425d-99c6-f9ef37bb257f 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/47504c0d-35d2-4a96-aac0-93e8c132a989 (127.0.0.1) 3.110000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 5c0b690a-ddef-454c-b635-fb2fd955aa7c 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5c0b690a-ddef-454c-b635-fb2fd955aa7c 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 330s yielded = self.gen.send(value) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 12.430000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 330s from ipykernel import kernelapp as app 330s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 330s from .connect import * # noqa: F403 330s ^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 330s from subprocess import PIPE, Popen 330s File "/usr/lib/python3.13/subprocess.py", line 58, in 330s import fcntl 330s File "", line 1357, in _find_and_load 330s File "", line 421, in __exit__ 330s File "", line 378, in release 330s KeyboardInterrupt 330s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_kernel_id ______ 330s 330s @self.addCleanup 330s def cleanup_sessions(): 330s for session in self.sess_api.list().json(): 330s > self.sess_api.delete(session['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 330s from ipykernel import kernelapp as app 330s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 330s from .connect import * # noqa: F403 330s ^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 330s from typing import TYPE_CHECKING, Any 330s File "", line 1360, in _find_and_load 330s File "", line 1331, in _find_and_load_unlocked 330s File "", line 935, in _load_unlocked 330s File "", line 1019, in exec_module 330s File "", line 1115, in get_code 330s File "", line 1215, in get_data 330s KeyboardInterrupt 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqyjow075/runtime/kernel-31df915f-bf32-4343-8ea4-0874e36d2134.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52019 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46757 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 31df915f-bf32-4343-8ea4-0874e36d2134, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.370000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.140000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.060000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.990000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2caefedf-b1f0-4179-acd5-4d9b29354e9b 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2caefedf-b1f0-4179-acd5-4d9b29354e9b 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/8612390e-9a46-49c2-815e-a8055909b037 (127.0.0.1) 2.280000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 31df915f-bf32-4343-8ea4-0874e36d2134 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 31df915f-bf32-4343-8ea4-0874e36d2134 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 330s future.result() 330s ~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 330s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 330s raise km.ready.exception() # type: ignore[misc] 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 11.080000ms referer=None 330s =================================== FAILURES =================================== 330s ______________________ KernelAPITest.test_default_kernel _______________________ 330s 330s self = 330s 330s def tearDown(self): 330s for k in self.kern_api.list().json(): 330s > self.kern_api.shutdown(k['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/49527a2a-39e8-4afa-ac65-0039cb677dea 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ------------------------------ Captured log setup ------------------------------ 330s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmprqu3eg2j/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmprqu3eg2j/etc/jupyter'] for config files 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmprqu3eg2j/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmprqu3eg2j/config 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmprqu3eg2j/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmprqu3eg2j/config 330s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmprqu3eg2j/notebooks 330s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 330s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 330s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 330s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 330s WARNING NotebookApp:handlers.py:612 Forbidden 330s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 2.040000ms referer=None 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmprqu3eg2j/runtime/kernel-49527a2a-39e8-4afa-ac65-0039cb677dea.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60689 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57411 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 49527a2a-39e8-4afa-ac65-0039cb677dea, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 84.320000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 3.410000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 49527a2a-39e8-4afa-ac65-0039cb677dea 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 49527a2a-39e8-4afa-ac65-0039cb677dea 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/49527a2a-39e8-4afa-ac65-0039cb677dea (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/49527a2a-39e8-4afa-ac65-0039cb677dea', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 330s yielded = ctx_run(next, result) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 330s yield maybe_future(km.shutdown_kernel(kernel_id)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/49527a2a-39e8-4afa-ac65-0039cb677dea (127.0.0.1) 15.390000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s Traceback (most recent call last): 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 330s from glob import _Globber, _no_recurse_symlinks 330s File "/usr/lib/python3.13/glob.py", line 5, in 330s import re 330s File "/usr/lib/python3.13/re/__init__.py", line 125, in 330s import enum 330s File "", line 1360, in _find_and_load 330s File "", line 1331, in _find_and_load_unlocked 330s File "", line 935, in _load_unlocked 330s File "", line 1019, in exec_module 330s File "", line 1115, in get_code 330s File "", line 1215, in get_data 330s KeyboardInterrupt 330s ______________________ KernelAPITest.test_kernel_handler _______________________ 330s 330s self = 330s 330s def test_kernel_handler(self): 330s # GET kernel with given id 330s kid = self.kern_api.start().json()['id'] 330s r = self.kern_api.get(kid) 330s kern1 = r.json() 330s self.assertEqual(r.status_code, 200) 330s assert isinstance(kern1, dict) 330s self.assertIn('id', kern1) 330s self.assertEqual(kern1['id'], kid) 330s 330s # Request a bad kernel id and check that a JSON 330s # message is returned! 330s bad_id = '111-111-111-111-111' 330s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 330s self.kern_api.get(bad_id) 330s 330s # DELETE kernel with id 330s > r = self.kern_api.shutdown(kid) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/329b2c1e-533b-494c-9e19-5e77e62a723e 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 330s from glob import _Globber, _no_recurse_symlinks 330s File "/usr/lib/python3.13/glob.py", line 5, in 330s import re 330s File "/usr/lib/python3.13/re/__init__.py", line 126, in 330s from . import _compiler, _parser 330s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 330s from . import _parser 330s File "/usr/lib/python3.13/re/_parser.py", line 15, in 330s from ._constants import * 330s File "/usr/lib/python3.13/re/_constants.py", line 130, in 330s ATCODES = _makecodes( 330s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 330s ...<5 lines>... 330s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 330s ) 330s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 330s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 330s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 330s KeyboardInterrupt 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmprqu3eg2j/runtime/kernel-329b2c1e-533b-494c-9e19-5e77e62a723e.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51957 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47497 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 329b2c1e-533b-494c-9e19-5e77e62a723e, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.910000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/329b2c1e-533b-494c-9e19-5e77e62a723e (127.0.0.1) 4.250000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 330s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 330s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 1.950000ms referer=None 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 329b2c1e-533b-494c-9e19-5e77e62a723e 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 329b2c1e-533b-494c-9e19-5e77e62a723e 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/329b2c1e-533b-494c-9e19-5e77e62a723e (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/329b2c1e-533b-494c-9e19-5e77e62a723e', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 330s yielded = ctx_run(next, result) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 330s yield maybe_future(km.shutdown_kernel(kernel_id)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/329b2c1e-533b-494c-9e19-5e77e62a723e (127.0.0.1) 11.920000ms referer=None 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.770000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 49527a2a-39e8-4afa-ac65-0039cb677dea 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 49527a2a-39e8-4afa-ac65-0039cb677dea 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/49527a2a-39e8-4afa-ac65-0039cb677dea (127.0.0.1) 2.690000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 329b2c1e-533b-494c-9e19-5e77e62a723e 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 329b2c1e-533b-494c-9e19-5e77e62a723e 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/329b2c1e-533b-494c-9e19-5e77e62a723e (127.0.0.1) 2.610000ms 330s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 330s 330s self = 330s 330s def test_main_kernel_handler(self): 330s # POST request 330s r = self.kern_api.start() 330s kern1 = r.json() 330s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 330s self.assertEqual(r.status_code, 201) 330s self.assertIsInstance(kern1, dict) 330s 330s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 330s expected_csp = '; '.join([ 330s "frame-ancestors 'self'", 330s 'report-uri ' + report_uri, 330s "default-src 'none'" 330s ]) 330s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 330s 330s # GET request 330s r = self.kern_api.list() 330s self.assertEqual(r.status_code, 200) 330s assert isinstance(r.json(), list) 330s self.assertEqual(r.json()[0]['id'], kern1['id']) 330s self.assertEqual(r.json()[0]['name'], kern1['name']) 330s 330s # create another kernel and check that they both are added to the 330s # list of kernels from a GET request 330s kern2 = self.kern_api.start().json() 330s assert isinstance(kern2, dict) 330s r = self.kern_api.list() 330s kernels = r.json() 330s self.assertEqual(r.status_code, 200) 330s assert isinstance(kernels, list) 330s self.assertEqual(len(kernels), 2) 330s 330s # Interrupt a kernel 330s r = self.kern_api.interrupt(kern2['id']) 330s self.assertEqual(r.status_code, 204) 330s 330s # Restart a kernel 330s > r = self.kern_api.restart(kern2['id']) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 330s return self._req('POST', url_path_join(id, 'restart')) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/9ae25daa-c158-469a-8526-fce4e72bbc99/restart 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 330s import functools 330s File "/usr/lib/python3.13/functools.py", line 18, in 330s from collections import namedtuple 330s File "/usr/lib/python3.13/collections/__init__.py", line 989, in 330s class ChainMap(_collections_abc.MutableMapping): 330s File "/usr/lib/python3.13/collections/__init__.py", line 1039, in ChainMap 330s @_recursive_repr() 330s File "/usr/lib/python3.13/reprlib.py", line 13, in decorating_function 330s repr_running = set() 330s KeyboardInterrupt 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmprqu3eg2j/runtime/kernel-a6f31de7-af87-44d1-981e-e192b8b77a61.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34577 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48111 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: a6f31de7-af87-44d1-981e-e192b8b77a61, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 25.650000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.760000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmprqu3eg2j/runtime/kernel-9ae25daa-c158-469a-8526-fce4e72bbc99.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45025 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55531 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9ae25daa-c158-469a-8526-fce4e72bbc99, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.580000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.690000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 9ae25daa-c158-469a-8526-fce4e72bbc99 330s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/9ae25daa-c158-469a-8526-fce4e72bbc99/interrupt (127.0.0.1) 3.720000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 330s yield maybe_future(km.restart_kernel(kernel_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 330s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 330s await ensure_async(kernel.restart_kernel(now=now)) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 330s await self._async_shutdown_kernel(now=now, restart=True) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _asy/usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 330s gc.collect() 330s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 330s nc_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/9ae25daa-c158-469a-8526-fce4e72bbc99/restart (127.0.0.1) 8.760000ms referer=None 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.710000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a6f31de7-af87-44d1-981e-e192b8b77a61 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a6f31de7-af87-44d1-981e-e192b8b77a61 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/a6f31de7-af87-44d1-981e-e192b8b77a61 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/a6f31de7-af87-44d1-981e-e192b8b77a61', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 330s yielded = ctx_run(next, result) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 330s yield maybe_future(km.shutdown_kernel(kernel_id)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/a6f31de7-af87-44d1-981e-e192b8b77a61 (127.0.0.1) 11.690000ms referer=None 330s ________________________ KernelAPITest.test_no_kernels _________________________ 330s 330s self = 330s 330s def test_no_kernels(self): 330s """Make sure there are no kernels running at the start""" 330s kernels = self.kern_api.list().json() 330s > self.assertEqual(kernels, []) 330s E AssertionError: Lists differ: [{'id': 'a6f31de7-af87-44d1-981e-e192b8b77[281 chars]: 0}] != [] 330s E 330s E First list contains 2 additional elements. 330s E First extra element 0: 330s E {'id': 'a6f31de7-af87-44d1-981e-e192b8b77a61', 'name': 'python3', 'last_activity': '2026-01-24T03:34:25.561101Z', 'execution_state': 'starting', 'connections': 0} 330s E 330s E + [] 330s E - [{'connections': 0, 330s E - 'execution_state': 'starting', 330s E - 'id': 'a6f31de7-af87-44d1-981e-e192b8b77a61', 330s E - 'last_activity': '2026-01-24T03:34:25.561101Z', 330s E - 'name': 'python3'}, 330s E - {'connections': 0, 330s E - 'execution_state': 'starting', 330s E - 'id': '9ae25daa-c158-469a-8526-fce4e72bbc99', 330s E - 'last_activity': '2026-01-24T03:34:25.595493Z', 330s E - 'name': 'python3'}] 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.840000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.960000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a6f31de7-af87-44d1-981e-e192b8b77a61 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a6f31de7-af87-44d1-981e-e192b8b77a61 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/a6f31de7-af87-44d1-981e-e192b8b77a61 (127.0.0.1) 3.950000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9ae25daa-c158-469a-8526-fce4e72bbc99 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9ae25daa-c158-469a-8526-fce4e72bbc99 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/9ae25daa-c158-469a-8526-fce4e72bbc99 (127.0.0.1) 2.920000ms 330s ---------------------------- Captured log teardown ----------------------------- 330s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 330s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 330s _____________________ AsyncKernelAPITest.test_connections ______________________ 330s 330s self = 330s 330s def tearDown(self): 330s for k in self.kern_api.list().json(): 330s > self.kern_api.shutdown(k['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ------------------------------ Captured log setup ------------------------------ 330s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp1nbsle56/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp1nbsle56/etc/jupyter'] for config files 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp1nbsle56/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp1nbsle56/config 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp1nbsle56/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp1nbsle56/config 330s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp1nbsle56/notebooks 330s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 330s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 330s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 330s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 330s WARNING NotebookApp:handlers.py:612 Forbidden 330s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.470000ms referer=None 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp1nbsle56/runtime/kernel-0881f8b5-7d6a-44bb-b6e9-aa1669778224.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48199 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55029 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 0881f8b5-7d6a-44bb-b6e9-aa1669778224, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 24.130000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224 (127.0.0.1) 3.140000ms 330s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224/channels 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 330s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46091 330s DEBUG NotebookApp:kernelmanager.py:423 activity on 0881f8b5-7d6a-44bb-b6e9-aa1669778224: status (starting) 330s DEBUG NotebookApp:kernelmanager.py:423 activity on 0881f8b5-7d6a-44bb-b6e9-aa1669778224: status (busy) 330s DEBUG NotebookApp:handlers.py:306 Received kernel info: {'status': 'ok', 'protocol_version': '5.3', 'implementation': 'ipython', 'implementation_version': '8.35.0', 'language_info': {'name': 'python', 'version': '3.13.11', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': "Python 3.13.11 (main, Dec 6 2025, 13:15:20) [GCC 15.2.0]\nType 'copyright', 'credits' or 'license' for more information\nIPython 8.35.0 -- An enhanced Interactive Python. Type '?' for help.\n", 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.13'}, {'text': 'IPython Reference', 'url': 'https://ipython.org/documentation.html'}, {'text': 'NumPy Reference', 'url': 'https://docs.scipy.org/doc/numpy/reference/'}, {'text': 'SciPy Reference', 'url': 'https://docs.scipy.org/doc/scipy/reference/'}, {'text': 'Matplotlib Reference', 'url': 'https://matplotlib.org/contents.html'}, {'text': 'SymPy Reference', 'url': 'http://docs.sympy.org/latest/index.html'}, {'text': 'pandas Reference', 'url': 'https://pandas.pydata.org/pandas-docs/stable/'}]} 330s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel 0881f8b5-7d6a-44bb-b6e9-aa1669778224) to 5.4 (client). 330s DEBUG NotebookApp:kernelmanager.py:423 activity on 0881f8b5-7d6a-44bb-b6e9-aa1669778224: status (idle) 330s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224/channels (127.0.0.1) 962.140000ms 330s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224/channels 330s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55029 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46091 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48199 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54039 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46091 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48199 330s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 330s Setting websocket_ping_timeout=30000 330s DEBUG NotebookApp:handlers.py:255 Nudge: attempt 1 on kernel 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224 (127.0.0.1) 1.610000ms 330s DEBUG NotebookApp:handlers.py:207 Nudge: IOPub received: 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:handlers.py:210 Nudge: resolving iopub future: 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:kernelmanager.py:423 activity on 0881f8b5-7d6a-44bb-b6e9-aa1669778224: status (busy) 330s DEBUG NotebookApp:handlers.py:195 Nudge: shell info reply received: 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:handlers.py:197 Nudge: resolving shell future: 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:kernelmanager.py:423 activity on 0881f8b5-7d6a-44bb-b6e9-aa1669778224: status (busy) 330s DEBUG NotebookApp:kernelmanager.py:423 activity on 0881f8b5-7d6a-44bb-b6e9-aa1669778224: status (idle) 330s DEBUG NotebookApp:handlers.py:201 Nudge: control info reply received: 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:kernelmanager.py:423 activity on 0881f8b5-7d6a-44bb-b6e9-aa1669778224: status (idle) 330s DEBUG NotebookApp:handlers.py:579 Websocket closed 0881f8b5-7d6a-44bb-b6e9-aa1669778224:0d9ecad8-d8b5da68687051b1b679b267 330s INFO NotebookApp:kernelmanager.py:222 Starting buffering for 0881f8b5-7d6a-44bb-b6e9-aa1669778224:0d9ecad8-d8b5da68687051b1b679b267 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 0881f8b5-7d6a-44bb-b6e9-aa1669778224:iopub 330s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 0881f8b5-7d6a-44bb-b6e9-aa1669778224:iopub 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 0881f8b5-7d6a-44bb-b6e9-aa1669778224:iopub 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224 (127.0.0.1) 2.060000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224 (127.0.0.1) 1.760000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.760000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s INFO NotebookApp:kernelmanager.py:286 Discarding 3 buffered messages for 0881f8b5-7d6a-44bb-b6e9-aa1669778224:0d9ecad8-d8b5da68687051b1b679b267 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 330s future.result() 330s ~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 330s yield maybe_future(km.shutdown_kernel(kernel_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 330s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 330s raise km.ready.exception() # type: ignore[misc] 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224 (127.0.0.1) 10.790000ms referer=None 330s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 330s 330s self = 330s 330s def tearDown(self): 330s for k in self.kern_api.list().json(): 330s > self.kern_api.shutdown(k['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/42628ff6-58d7-4447-82a1-4bef38ae164d 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp1nbsle56/runtime/kernel-42628ff6-58d7-4447-82a1-4bef38ae164d.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48209 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57901 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 42628ff6-58d7-4447-82a1-4bef38ae164d, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.120000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.920000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/0881f8b5-7d6a-44bb-b6e9-aa1669778224 (127.0.0.1) 2.060000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 42628ff6-58d7-4447-82a1-4bef38ae164d 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 42628ff6-58d7-4447-82a1-4bef38ae164d 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/42628ff6-58d7-4447-82a1-4bef38ae164d (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/42628ff6-58d7-4447-82a1-4bef38ae164d', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 330s future.result() 330s ~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 330s yield maybe_future(km.shutdown_kernel(kernel_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 330s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 330s raise km.ready.exception() # type: ignore[misc] 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/42628ff6-58d7-4447-82a1-4bef38ae164d (127.0.0.1) 10.690000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 330s from glob import _Globber, _no_recurse_symlinks 330s File "/usr/lib/python3.13/glob.py", line 6, in 330s import fnmatch 330s File "", line 1360, in _find_and_load 330s File "", line 1322, in _find_and_load_unlocked 330s File "", line 1262, in _find_spec 330s File "", line 1556, in find_spec 330s File "", line 1529, in _get_spec 330s KeyboardInterrupt 330s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 330s 330s self = 330s 330s def test_kernel_handler(self): 330s # GET kernel with given id 330s kid = self.kern_api.start().json()['id'] 330s r = self.kern_api.get(kid) 330s kern1 = r.json() 330s self.assertEqual(r.status_code, 200) 330s assert isinstance(kern1, dict) 330s self.assertIn('id', kern1) 330s self.assertEqual(kern1['id'], kid) 330s 330s # Request a bad kernel id and check that a JSON 330s # message is returned! 330s bad_id = '111-111-111-111-111' 330s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 330s self.kern_api.get(bad_id) 330s 330s # DELETE kernel with id 330s > r = self.kern_api.shutdown(kid) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 330s from glob import _Globber, _no_recurse_symlinks 330s File "/usr/lib/python3.13/glob.py", line 5, in 330s import re 330s File "/usr/lib/python3.13/re/__init__.py", line 381, in 330s import copyreg 330s File "", line 1357, in _find_and_load 330s File "", line 418, in __enter__ 330s File "", line 316, in acquire 330s KeyboardInterrupt 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp1nbsle56/runtime/kernel-3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34613 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55763 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.920000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 (127.0.0.1) 2.030000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1): Kernel does not exist: 111-111-111-111-111 330s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 330s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (127.0.0.1) 2.230000ms referer=None 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 330s future.result() 330s ~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 330s yield maybe_future(km.shutdown_kernel(kernel_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 330s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 330s raise km.ready.exception() # type: ignore[misc] 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 (127.0.0.1) 11.150000ms referer=None 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.960000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 42628ff6-58d7-4447-82a1-4bef38ae164d 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 42628ff6-58d7-4447-82a1-4bef38ae164d 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/42628ff6-58d7-4447-82a1-4bef38ae164d (127.0.0.1) 2.190000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 (127.0.0.1) 2.010000ms 330s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 330s 330s self = 330s 330s def test_main_kernel_handler(self): 330s # POST request 330s r = self.kern_api.start() 330s kern1 = r.json() 330s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 330s self.assertEqual(r.status_code, 201) 330s self.assertIsInstance(kern1, dict) 330s 330s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 330s expected_csp = '; '.join([ 330s "frame-ancestors 'self'", 330s 'report-uri ' + report_uri, 330s "default-src 'none'" 330s ]) 330s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 330s 330s # GET request 330s r = self.kern_api.list() 330s self.assertEqual(r.status_code, 200) 330s assert isinstance(r.json(), list) 330s self.assertEqual(r.json()[0]['id'], kern1['id']) 330s self.assertEqual(r.json()[0]['name'], kern1['name']) 330s 330s # create another kernel and check that they both are added to the 330s # list of kernels from a GET request 330s kern2 = self.kern_api.start().json() 330s assert isinstance(kern2, dict) 330s r = self.kern_api.list() 330s kernels = r.json() 330s self.assertEqual(r.status_code, 200) 330s assert isinstance(kernels, list) 330s self.assertEqual(len(kernels), 2) 330s 330s # Interrupt a kernel 330s r = self.kern_api.interrupt(kern2['id']) 330s self.assertEqual(r.status_code, 204) 330s 330s # Restart a kernel 330s > r = self.kern_api.restart(kern2['id']) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 330s return self._req('POST', url_path_join(id, 'restart')) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/d6101f6c-53d8-4932-82bf-a1d7354b7c2e/restart 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 330s from glob import _Globber, _no_recurse_symlinks 330s File "/usr/lib/python3.13/glob.py", line 3, in 330s import contextlib 330s File "", line 1357, in _find_and_load 330s File "", line 418, in __enter__ 330s File "", line 311, in acquire 330s File "", line 170, in __enter__ 330s File "", line 132, in setdefault 330s File "", line 74, in __new__ 330s KeyboardInterrupt 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp1nbsle56/runtime/kernel-88d266f6-eb3f-4500-a25d-6059db09de4c.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40623 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33459 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 88d266f6-eb3f-4500-a25d-6059db09de4c, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.570000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 2.020000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp1nbsle56/runtime/kernel-d6101f6c-53d8-4932-82bf-a1d7354b7c2e.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45929 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56733 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: d6101f6c-53d8-4932-82bf-a1d7354b7c2e, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 22.440000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.990000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: d6101f6c-53d8-4932-82bf-a1d7354b7c2e 330s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/d6101f6c-53d8-4932-82bf-a1d7354b7c2e/interrupt (127.0.0.1) 2.170000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 330s yield maybe_future(km.restart_kernel(kernel_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 330s result = coro.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 330s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 330s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 330s yield self # This tells Task to wait for completion. 330s ^^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 330s future.result() 330s ~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 330s await ensure_async(kernel.restart_kernel(now=now)) 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 330s await self._async_shutdown_kernel(now=now, restart=True) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/d6101f6c-53d8-4932-82bf-a1d7354b7c2e/restart (127.0.0.1) 9.540000ms referer=None 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.940000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 88d266f6-eb3f-4500-a25d-6059db09de4c 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 88d266f6-eb3f-4500-a25d-6059db09de4c 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/88d266f6-eb3f-4500-a25d-6059db09de4c (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/88d266f6-eb3f-4500-a25d-6059db09de4c', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 330s future.result() 330s ~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 330s yield maybe_future(km.shutdown_kernel(kernel_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 330s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 330s raise km.ready.exception() # type: ignore[misc] 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/88d266f6-eb3f-4500-a25d-6059db09de4c (127.0.0.1) 10.750000ms referer=None 330s ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 330s 330s self = 330s 330s def test_no_kernels(self): 330s """Make sure there are no kernels running at the start""" 330s kernels = self.kern_api.list().json() 330s > self.assertEqual(kernels, []) 330s E AssertionError: Lists differ: [{'id': '88d266f6-eb3f-4500-a25d-6059db09d[281 chars]: 0}] != [] 330s E 330s E First list contains 2 additional elements. 330s E First extra element 0: 330s E {'id': '88d266f6-eb3f-4500-a25d-6059db09de4c', 'name': 'python3', 'last_activity': '2026-01-24T03:34:27.191745Z', 'execution_state': 'starting', 'connections': 0} 330s E 330s E + [] 330s E - [{'connections': 0, 330s E - 'execution_state': 'starting', 330s E - 'id': '88d266f6-eb3f-4500-a25d-6059db09de4c', 330s E - 'last_activity': '2026-01-24T03:34:27.191745Z', 330s E - 'name': 'python3'}, 330s E - {'connections': 0, 330s E - 'execution_state': 'starting', 330s E - 'id': 'd6101f6c-53d8-4932-82bf-a1d7354b7c2e', 330s E - 'last_activity': '2026-01-24T03:34:27.225589Z', 330s E - 'name': 'python3'}] 330s 330s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.980000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 3.340000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 88d266f6-eb3f-4500-a25d-6059db09de4c 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 88d266f6-eb3f-4500-a25d-6059db09de4c 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/88d266f6-eb3f-4500-a25d-6059db09de4c (127.0.0.1) 2.210000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d6101f6c-53d8-4932-82bf-a1d7354b7c2e 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d6101f6c-53d8-4932-82bf-a1d7354b7c2e 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/d6101f6c-53d8-4932-82bf-a1d7354b7c2e (127.0.0.1) 2.320000ms 330s ---------------------------- Captured log teardown ----------------------------- 330s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3dbfc855-a0cd-4cf1-b0c9-cf3ab162a305 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 88d266f6-eb3f-4500-a25d-6059db09de4c 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0881f8b5-7d6a-44bb-b6e9-aa1669778224 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 42628ff6-58d7-4447-82a1-4bef38ae164d 330s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 330s __________________________ SessionAPITest.test_create __________________________ 330s 330s @self.addCleanup 330s def cleanup_sessions(): 330s for session in self.sess_api.list().json(): 330s > self.sess_api.delete(session['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f9e6bd93-d677-4add-83ea-b35296b157d8 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ------------------------------ Captured log setup ------------------------------ 330s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp29ses7j_/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp29ses7j_/etc/jupyter'] for config files 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp29ses7j_/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp29ses7j_/config 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp29ses7j_/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp29ses7j_/config 330s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp29ses7j_/notebooks 330s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 330s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 330s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 330s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 330s WARNING NotebookApp:handlers.py:612 Forbidden 330s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.630000ms referer=None 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.610000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp29ses7j_/runtime/kernel-47626dc9-79b2-4a8b-a12a-f0c162537bd4.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44611 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38533 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 47626dc9-79b2-4a8b-a12a-f0c162537bd4, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp29ses7j_/notebooks/foo'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 30.180000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.060000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/f9e6bd93-d677-4add-83ea-b35296b157d8 (127.0.0.1) 2.260000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.830000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 47626dc9-79b2-4a8b-a12a-f0c162537bd4 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 47626dc9-79b2-4a8b-a12a-f0c162537bd4 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f9e6bd93-d677-4add-83ea-b35296b157d8 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f9e6bd93-d677-4add-83ea-b35296b157d8', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 330s yielded = self.gen.send(value) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f9e6bd93-d677-4add-83ea-b35296b157d8 (127.0.0.1) 13.880000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 330s from ipykernel import kernelapp as app 330s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 330s from .connect import * # noqa: F403 330s ^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 330s from subprocess import PIPE, Popen 330s File "/usr/lib/python3.13/subprocess.py", line 46, in 330s import locale 330s File "", line 1360, in _find_and_load 330s File "", line 1331, in _find_and_load_unlocked 330s File "", line 935, in _load_unlocked 330s File "", line 1019, in exec_module 330s File "", line 1115, in get_code 330s File "", line 1215, in get_data 330s KeyboardInterrupt 330s __________________ SessionAPITest.test_create_console_session __________________ 330s 330s @self.addCleanup 330s def cleanup_sessions(): 330s for session in self.sess_api.list().json(): 330s > self.sess_api.delete(session['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f42d9b8a-432e-4cb0-8deb-4c03b77ed64b 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 330s from ._local import * 330s File "/usr/lib/python3.13/pathlib/_local.py", line 12, in 330s import pwd 330s File "", line 1360, in _find_and_load 330s File "", line 1331, in _find_and_load_unlocked 330s File "", line 935, in _load_unlocked 330s File "", line 997, in exec_module 330s KeyboardInterrupt 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp29ses7j_/runtime/kernel-21d88fa5-a497-4536-8d56-5c5db0b4a531.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48865 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52683 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 21d88fa5-a497-4536-8d56-5c5db0b4a531, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp29ses7j_/notebooks/foo'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 24.220000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.080000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 47626dc9-79b2-4a8b-a12a-f0c162537bd4 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 47626dc9-79b2-4a8b-a12a-f0c162537bd4 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/f9e6bd93-d677-4add-83ea-b35296b157d8 (127.0.0.1) 3.150000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 21d88fa5-a497-4536-8d56-5c5db0b4a531 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 21d88fa5-a497-4536-8d56-5c5db0b4a531 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f42d9b8a-432e-4cb0-8deb-4c03b77ed64b (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f42d9b8a-432e-4cb0-8deb-4c03b77ed64b', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 330s yielded = self.gen.send(value) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/f42d9b8a-432e-4cb0-8deb-4c03b77ed64b (127.0.0.1) 13.020000ms referer=None 330s ____________________ SessionAPITest.test_create_deprecated _____________________ 330s 330s @self.addCleanup 330s def cleanup_sessions(): 330s for session in self.sess_api.list().json(): 330s > self.sess_api.delete(session['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/c3d6ad9c-009a-4c16-b7d6-10c17ceb72c1 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp29ses7j_/runtime/kernel-82dd4c0d-4e57-4f92-82db-2311ab509c84.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44349 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50929 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 82dd4c0d-4e57-4f92-82db-2311ab509c84, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp29ses7j_/notebooks/foo'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 24.200000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.900000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 21d88fa5-a497-4536-8d56-5c5db0b4a531 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 21d88fa5-a497-4536-8d56-5c5db0b4a531 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/f42d9b8a-432e-4cb0-8deb-4c03b77ed64b (127.0.0.1) 2.710000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 82dd4c0d-4e57-4f92-82db-2311ab509c84 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 82dd4c0d-4e57-4f92-82db-2311ab509c84 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/c3d6ad9c-009a-4c16-b7d6-10c17ceb72c1 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/c3d6ad9c-009a-4c16-b7d6-10c17ceb72c1', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 330s yielded = self.gen.send(value) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/c3d6ad9c-009a-4c16-b7d6-10c17ceb72c1 (127.0.0.1) 12.120000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 101, in 330s class PurePathBase: 330s ...<297 lines>... 330s return match(self._pattern_str) is not None 330s KeyboardInterrupt 330s ___________________ SessionAPITest.test_create_file_session ____________________ 330s 330s @self.addCleanup 330s def cleanup_sessions(): 330s for session in self.sess_api.list().json(): 330s > self.sess_api.delete(session['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/47504c0d-35d2-4a96-aac0-93e8c132a989 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp29ses7j_/runtime/kernel-e265784e-2fd0-425d-99c6-f9ef37bb257f.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50109 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45319 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: e265784e-2fd0-425d-99c6-f9ef37bb257f, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp29ses7j_/notebooks/foo'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 23.640000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.810000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 82dd4c0d-4e57-4f92-82db-2311ab509c84 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 82dd4c0d-4e57-4f92-82db-2311ab509c84 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/c3d6ad9c-009a-4c16-b7d6-10c17ceb72c1 (127.0.0.1) 3.060000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e265784e-2fd0-425d-99c6-f9ef37bb257f 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e265784e-2fd0-425d-99c6-f9ef37bb257f 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/47504c0d-35d2-4a96-aac0-93e8c132a989 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/47504c0d-35d2-4a96-aac0-93e8c132a989', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 330s yielded = self.gen.send(value) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/47504c0d-35d2-4a96-aac0-93e8c132a989 (127.0.0.1) 13.000000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 330s from glob import _Globber, _no_recurse_symlinks 330s File "/usr/lib/python3.13/glob.py", line 5, in 330s import re 330s File "/usr/lib/python3.13/re/__init__.py", line 381, in 330s import copyreg 330s File "", line 1360, in _find_and_load 330s File "", line 1331, in _find_and_load_unlocked 330s File "", line 935, in _load_unlocked 330s File "", line 1019, in exec_module 330s File "", line 1152, in get_code 330s File "", line 781, in _compile_bytecode 330s KeyboardInterrupt 330s __________________ SessionAPITest.test_create_with_kernel_id ___________________ 330s 330s self = 330s 330s def test_create_with_kernel_id(self): 330s # create a new kernel 330s r = self.request('POST', 'api/kernels') 330s r.raise_for_status() 330s kernel = r.json() 330s 330s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 330s self.assertEqual(resp.status_code, 201) 330s newsession = resp.json() 330s self.assertIn('id', newsession) 330s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 330s self.assertEqual(newsession['kernel']['id'], kernel['id']) 330s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 330s 330s sessions = self.sess_api.list().json() 330s > self.assertEqual(sessions, [newsession]) 330s E AssertionError: Lists differ: [{'id': '47504c0d-35d2-4a96-aac0-93e8c132a989', 'p[553 chars]ne}}] != [{'id': '2bfd36d5-0359-46b7-b262-07e820ab5566', 'p[279 chars]ne}}] 330s E 330s E First differing element 0: 330s E {'id': '47504c0d-35d2-4a96-aac0-93e8c132a989', 'p[218 chars]: 0}} 330s E {'id': '2bfd36d5-0359-46b7-b262-07e820ab5566', 'p[278 chars]one}} 330s E 330s E First list contains 1 additional elements. 330s E First extra element 1: 330s E {'id': '2bfd36d5-0359-46b7-b262-07e820ab5566', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '5c0b690a-ddef-454c-b635-fb2fd955aa7c', 'name': 'python3', 'last_activity': '2026-01-24T03:34:28.027688Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 330s E 330s E Diff is 830 characters long. Set self.maxDiff to None to see it. 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp29ses7j_/runtime/kernel-5c0b690a-ddef-454c-b635-fb2fd955aa7c.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37117 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57131 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 5c0b690a-ddef-454c-b635-fb2fd955aa7c, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 23.080000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.110000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.970000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.860000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e265784e-2fd0-425d-99c6-f9ef37bb257f 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e265784e-2fd0-425d-99c6-f9ef37bb257f 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/47504c0d-35d2-4a96-aac0-93e8c132a989 (127.0.0.1) 3.110000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 5c0b690a-ddef-454c-b635-fb2fd955aa7c 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5c0b690a-ddef-454c-b635-fb2fd955aa7c 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 330s yielded = self.gen.send(value) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 12.430000ms referer=None 330s _____________________ SessionAPITest.test_modify_kernel_id _____________________ 330s 330s @self.addCleanup 330s def cleanup_sessions(): 330s for session in self.sess_api.list().json(): 330s > self.sess_api.delete(session['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.260000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp29ses7j_/runtime/kernel-195ce360-a533-4003-8728-7113cfd6c9d5.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34909 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59047 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 195ce360-a533-4003-8728-7113cfd6c9d5, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 25.480000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 5c0b690a-ddef-454c-b635-fb2fd955aa7c 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5c0b690a-ddef-454c-b635-fb2fd955aa7c 330s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 3.480000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.910000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.740000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 195ce360-a533-4003-8728-7113cfd6c9d5 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 195ce360-a533-4003-8728-7113cfd6c9d5 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 330s yielded = self.gen.send(value) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 13.020000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 330s from ipykernel import kernelapp as app 330s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 330s from .connect import * # noqa: F403 330s ^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 330s from subprocess import PIPE, Popen 330s File "", line 1360, in _find_and_load 330s File "", line 1331, in _find_and_load_unlocked 330s File "", line 935, in _load_unlocked 330s File "", line 1019, in exec_module 330s File "", line 1152, in get_code 330s File "", line 781, in _compile_bytecode 330s KeyboardInterrupt 330s ____________________ SessionAPITest.test_modify_kernel_name ____________________ 330s 330s @self.addCleanup 330s def cleanup_sessions(): 330s for session in self.sess_api.list().json(): 330s > self.sess_api.delete(session['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.050000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp29ses7j_/runtime/kernel-f496b65b-7a9c-441e-a44d-ad998d9be4fe.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49553 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55825 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: f496b65b-7a9c-441e-a44d-ad998d9be4fe, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmp29ses7j_/notebooks/foo'} 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 195ce360-a533-4003-8728-7113cfd6c9d5 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 195ce360-a533-4003-8728-7113cfd6c9d5 330s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 24.870000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 3.110000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 3.090000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f496b65b-7a9c-441e-a44d-ad998d9be4fe 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f496b65b-7a9c-441e-a44d-ad998d9be4fe 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 330s yielded = self.gen.send(value) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 330s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 330s stopper = ensure_async(km.shutdown_kernel(now, restart)) 330s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 330s return _runner_map[name].run(inner) 330s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 330s return fut.result(None) 330s ~~~~~~~~~~^^^^^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 330s return self.__get_result() 330s ~~~~~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 330s raise self._exception 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 330s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/2bfd36d5-0359-46b7-b262-07e820ab5566 (127.0.0.1) 12.460000ms referer=None 330s --------------------------- Captured stderr teardown --------------------------- 330s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 330s return _run_code(code, main_globals, None, 330s "__main__", mod_spec) 330s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 330s exec(code, run_globals) 330s ~~~~^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 330s from pathlib import Path 330s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 330s from ._abc import * 330s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 330s from glob import _Globber, _no_recurse_symlinks 330s File "/usr/lib/python3.13/glob.py", line 5, in 330s import re 330s File "/usr/lib/python3.13/re/__init__.py", line 381, in 330s import copyreg 330s File "/usr/lib/python3.13/copyreg.py", line 31, in 330s pickle(complex, pickle_complex, complex) 330s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3.13/copyreg.py", line 12, in pickle 330s def pickle(ob_type, pickle_function, constructor_ob=None): 330s 330s KeyboardInterrupt 330s ---------------------------- Captured log teardown ----------------------------- 330s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f496b65b-7a9c-441e-a44d-ad998d9be4fe 330s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 330s _______________________ AsyncSessionAPITest.test_create ________________________ 330s 330s @self.addCleanup 330s def cleanup_sessions(): 330s for session in self.sess_api.list().json(): 330s > self.sess_api.delete(session['id']) 330s 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 330s return self._req('DELETE', id) 330s ^^^^^^^^^^^^^^^^^^^^^^^ 330s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 330s response.raise_for_status() 330s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 330s 330s self = 330s 330s def raise_for_status(self): 330s """Raises :class:`HTTPError`, if one occurred.""" 330s 330s http_error_msg = "" 330s if isinstance(self.reason, bytes): 330s # We attempt to decode utf-8 first because some servers 330s # choose to localize their reason strings. If the string 330s # isn't utf-8, we fall back to iso-8859-1 for all other 330s # encodings. (See PR #3538) 330s try: 330s reason = self.reason.decode("utf-8") 330s except UnicodeDecodeError: 330s reason = self.reason.decode("iso-8859-1") 330s else: 330s reason = self.reason 330s 330s if 400 <= self.status_code < 500: 330s http_error_msg = ( 330s f"{self.status_code} Client Error: {reason} for url: {self.url}" 330s ) 330s 330s elif 500 <= self.status_code < 600: 330s http_error_msg = ( 330s f"{self.status_code} Server Error: {reason} for url: {self.url}" 330s ) 330s 330s if http_error_msg: 330s > raise HTTPError(http_error_msg, response=self) 330s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/785aa88a-d82a-4800-9642-4873558e2402 330s 330s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 330s ------------------------------ Captured log setup ------------------------------ 330s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpqyjow075/config', '/tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpqyjow075/etc/jupyter'] for config files 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpqyjow075/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpqyjow075/config 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpqyjow075/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.CmXq4V/autopkgtest_tmp/home/.local/etc/jupyter 330s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpqyjow075/config 330s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpqyjow075/notebooks 330s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 330s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 330s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 330s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 330s WARNING NotebookApp:handlers.py:612 Forbidden 330s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (127.0.0.1) 1.510000ms referer=None 330s ----------------------------- Captured stderr call ----------------------------- 330s Traceback (most recent call last): 330s File "", line 1360, in _find_and_load 330s File "", line 1324, in _find_and_load_unlocked 330s ModuleNotFoundError: No module named 'nt' 330s 330s During handling of the above exception, another exception occurred: 330s 330s Traceback (most recent call last): 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.390000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 330s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqyjow075/runtime/kernel-e85d15ad-c677-4480-8e9b-dd2e4094da0b.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33401 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33147 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: e85d15ad-c677-4480-8e9b-dd2e4094da0b, name: python3 330s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpqyjow075/notebooks/foo'} 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 23.360000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.970000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/785aa88a-d82a-4800-9642-4873558e2402 (127.0.0.1) 1.920000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.850000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e85d15ad-c677-4480-8e9b-dd2e4094da0b 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e85d15ad-c677-4480-8e9b-dd2e4094da0b 330s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/785aa88a-d82a-4800-9642-4873558e2402 (127.0.0.1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/785aa88a-d82a-4800-9642-4873558e2402', version='HTTP/1.1', remote_ip='127.0.0.1') 330s Traceback (most recent call last): 330s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 330s result = await result 330s ^^^^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 330s future.result() 330s ~~~~~~~~~~~~~^^ 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 330s yield maybe_future(sm.delete_session(session_id)) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 330s yielded = self.gen.throw(exc) 330s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 330s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 330s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 330s value = future.result() 330s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 330s raise self._exception.with_traceback(self._exception_tb) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 330s result = coro.send(None) 330s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 330s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 330s raise km.ready.exception() # type: ignore[misc] 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 330s await kernel_awaitable 330s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 330s result = await obj 330s ^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 330s raise e 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 330s out = await method(self, *args, **kwargs) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 330s await self._async_finish_shutdown(restart=restart) 330s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 330s await asyncio.wait_for( 330s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 330s ) 330s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 330s async with timeouts.timeout(timeout): 330s ~~~~~~~~~~~~~~~~^^^^^^^^^ 330s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 330s raise RuntimeError("Timeout should be used inside a task") 330s RuntimeError: Timeout should be used inside a task 330s WARNING NotebookApp:handlers.py:612 Unhandled error 330s ERROR NotebookApp:log.py:55 { 330s "Host": "localhost:12341", 330s "Accept": "*/*", 330s "User-Agent": "python-requests/2.32.5" 330s } 331s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/785aa88a-d82a-4800-9642-4873558e2402 (127.0.0.1) 11.380000ms referer=None 331s --------------------------- Captured stderr teardown --------------------------- 331s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 331s return _run_code(code, main_globals, None, 331s "__main__", mod_spec) 331s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 331s ~~~~^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 331s from pathlib import Path 331s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 331s from ._local import * 331s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 331s class PureWindowsPath(PurePath): 331s ...<7 lines>... 331s __slots__ = () 331s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 331s import ntpath 331s File "/usr/lib/python3.13/ntpath.py", line 170, in 331s from nt import _path_splitroot_ex as splitroot 331s File "", line 1357, in _find_and_load 331s File "", line 421, in __exit__ 331s File "", line 378, in release 331s KeyboardInterrupt 331s _______________ AsyncSessionAPITest.test_create_console_session ________________ 331s 331s @self.addCleanup 331s def cleanup_sessions(): 331s for session in self.sess_api.list().json(): 331s > self.sess_api.delete(session['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 331s response.raise_for_status() 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s 331s def raise_for_status(self): 331s """Raises :class:`HTTPError`, if one occurred.""" 331s 331s http_error_msg = "" 331s if isinstance(self.reason, bytes): 331s # We attempt to decode utf-8 first because some servers 331s # choose to localize their reason strings. If the string 331s # isn't utf-8, we fall back to iso-8859-1 for all other 331s # encodings. (See PR #3538) 331s try: 331s reason = self.reason.decode("utf-8") 331s except UnicodeDecodeError: 331s reason = self.reason.decode("iso-8859-1") 331s else: 331s reason = self.reason 331s 331s if 400 <= self.status_code < 500: 331s http_error_msg = ( 331s f"{self.status_code} Client Error: {reason} for url: {self.url}" 331s ) 331s 331s elif 500 <= self.status_code < 600: 331s http_error_msg = ( 331s f"{self.status_code} Server Error: {reason} for url: {self.url}" 331s ) 331s 331s if http_error_msg: 331s > raise HTTPError(http_error_msg, response=self) 331s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/1ca7b4fe-4140-4cdf-9e0b-cf4aedb06643 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ----------------------------- Captured stderr call ----------------------------- 331s Traceback (most recent call last): 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 331s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqyjow075/runtime/kernel-35e856a7-fd4b-4137-a647-9abc3f278bd8.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48753 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:32785 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 35e856a7-fd4b-4137-a647-9abc3f278bd8, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpqyjow075/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.820000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.950000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e85d15ad-c677-4480-8e9b-dd2e4094da0b 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e85d15ad-c677-4480-8e9b-dd2e4094da0b 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/785aa88a-d82a-4800-9642-4873558e2402 (127.0.0.1) 2.570000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 35e856a7-fd4b-4137-a647-9abc3f278bd8 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 35e856a7-fd4b-4137-a647-9abc3f278bd8 331s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/1ca7b4fe-4140-4cdf-9e0b-cf4aedb06643 (127.0.0.1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/1ca7b4fe-4140-4cdf-9e0b-cf4aedb06643', version='HTTP/1.1', remote_ip='127.0.0.1') 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 331s result = await result 331s ^^^^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 331s future.result() 331s ~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 331s yield maybe_future(sm.delete_session(session_id)) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 331s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 331s raise self._exception.with_traceback(self._exception_tb) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 331s result = coro.send(None) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 331s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 331s raise km.ready.exception() # type: ignore[misc] 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s WARNING NotebookApp:handlers.py:612 Unhandled error 331s ERROR NotebookApp:log.py:55 { 331s "Host": "localhost:12341", 331s "Accept": "*/*", 331s "User-Agent": "python-requests/2.32.5" 331s } 331s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/1ca7b4fe-4140-4cdf-9e0b-cf4aedb06643 (127.0.0.1) 10.980000ms referer=None 331s --------------------------- Captured stderr teardown --------------------------- 331s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 331s return _run_code(code, main_globals, None, 331s "__main__", mod_spec) 331s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 331s ~~~~^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 331s from pathlib import Path 331s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 331s from ._abc import * 331s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 331s from glob import _Globber, _no_recurse_symlinks 331s File "/usr/lib/python3.13/glob.py", line 6, in 331s import fnmatch 331s File "/usr/lib/python3.13/fnmatch.py", line 38, in 331s @functools.lru_cache(maxsize=32768, typed=True) 331s ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3.13/functools.py", line 547, in decorating_function 331s return update_wrapper(wrapper, user_function) 331s File "/usr/lib/python3.13/functools.py", line 59, in update_wrapper 331s getattr(wrapper, attr).update(getattr(wrapped, attr, {})) 331s ~~~~~~~^^^^^^^^^^^^^^^ 331s KeyboardInterrupt 331s __________________ AsyncSessionAPITest.test_create_deprecated __________________ 331s 331s @self.addCleanup 331s def cleanup_sessions(): 331s for session in self.sess_api.list().json(): 331s > self.sess_api.delete(session['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 331s response.raise_for_status() 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s 331s def raise_for_status(self): 331s """Raises :class:`HTTPError`, if one occurred.""" 331s 331s http_error_msg = "" 331s if isinstance(self.reason, bytes): 331s # We attempt to decode utf-8 first because some servers 331s # choose to localize their reason strings. If the string 331s # isn't utf-8, we fall back to iso-8859-1 for all other 331s # encodings. (See PR #3538) 331s try: 331s reason = self.reason.decode("utf-8") 331s except UnicodeDecodeError: 331s reason = self.reason.decode("iso-8859-1") 331s else: 331s reason = self.reason 331s 331s if 400 <= self.status_code < 500: 331s http_error_msg = ( 331s f"{self.status_code} Client Error: {reason} for url: {self.url}" 331s ) 331s 331s elif 500 <= self.status_code < 600: 331s http_error_msg = ( 331s f"{self.status_code} Server Error: {reason} for url: {self.url}" 331s ) 331s 331s if http_error_msg: 331s > raise HTTPError(http_error_msg, response=self) 331s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/3ec492fc-0d90-4ea5-8639-e1d3fddc20e2 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ----------------------------- Captured stderr call ----------------------------- 331s Traceback (most recent call last): 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 331s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 331s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqyjow075/runtime/kernel-cb3f484a-fb61-403e-95bd-06c6e602f483.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40167 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49039 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: cb3f484a-fb61-403e-95bd-06c6e602f483, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpqyjow075/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 21.880000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.960000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 35e856a7-fd4b-4137-a647-9abc3f278bd8 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 35e856a7-fd4b-4137-a647-9abc3f278bd8 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/1ca7b4fe-4140-4cdf-9e0b-cf4aedb06643 (127.0.0.1) 2.300000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for cb3f484a-fb61-403e-95bd-06c6e602f483 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: cb3f484a-fb61-403e-95bd-06c6e602f483 331s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/3ec492fc-0d90-4ea5-8639-e1d3fddc20e2 (127.0.0.1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/3ec492fc-0d90-4ea5-8639-e1d3fddc20e2', version='HTTP/1.1', remote_ip='127.0.0.1') 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 331s result = await result 331s ^^^^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 331s future.result() 331s ~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 331s yield maybe_future(sm.delete_session(session_id)) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 331s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 331s raise self._exception.with_traceback(self._exception_tb) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 331s result = coro.send(None) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 331s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 331s raise km.ready.exception() # type: ignore[misc] 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s WARNING NotebookApp:handlers.py:612 Unhandled error 331s ERROR NotebookApp:log.py:55 { 331s "Host": "localhost:12341", 331s "Accept": "*/*", 331s "User-Agent": "python-requests/2.32.5" 331s } 331s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/3ec492fc-0d90-4ea5-8639-e1d3fddc20e2 (127.0.0.1) 11.260000ms referer=None 331s --------------------------- Captured stderr teardown --------------------------- 331s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 331s return _run_code(code, main_globals, None, 331s "__main__", mod_spec) 331s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 331s ~~~~^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 331s from pathlib import Path 331s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 331s from ._local import * 331s File "", line 1360, in _find_and_load 331s File "", line 1331, in _find_and_load_unlocked 331s File "", line 935, in _load_unlocked 331s File "", line 1019, in exec_module 331s File "", line 1152, in get_code 331s File "", line 781, in _compile_bytecode 331s KeyboardInterrupt 331s _________________ AsyncSessionAPITest.test_create_file_session _________________ 331s 331s @self.addCleanup 331s def cleanup_sessions(): 331s for session in self.sess_api.list().json(): 331s > self.sess_api.delete(session['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 331s response.raise_for_status() 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s 331s def raise_for_status(self): 331s """Raises :class:`HTTPError`, if one occurred.""" 331s 331s http_error_msg = "" 331s if isinstance(self.reason, bytes): 331s # We attempt to decode utf-8 first because some servers 331s # choose to localize their reason strings. If the string 331s # isn't utf-8, we fall back to iso-8859-1 for all other 331s # encodings. (See PR #3538) 331s try: 331s reason = self.reason.decode("utf-8") 331s except UnicodeDecodeError: 331s reason = self.reason.decode("iso-8859-1") 331s else: 331s reason = self.reason 331s 331s if 400 <= self.status_code < 500: 331s http_error_msg = ( 331s f"{self.status_code} Client Error: {reason} for url: {self.url}" 331s ) 331s 331s elif 500 <= self.status_code < 600: 331s http_error_msg = ( 331s f"{self.status_code} Server Error: {reason} for url: {self.url}" 331s ) 331s 331s if http_error_msg: 331s > raise HTTPError(http_error_msg, response=self) 331s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/8612390e-9a46-49c2-815e-a8055909b037 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ----------------------------- Captured stderr call ----------------------------- 331s Traceback (most recent call last): 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 331s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqyjow075/runtime/kernel-2caefedf-b1f0-4179-acd5-4d9b29354e9b.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43609 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36147 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2caefedf-b1f0-4179-acd5-4d9b29354e9b, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpqyjow075/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 22.720000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.060000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for cb3f484a-fb61-403e-95bd-06c6e602f483 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: cb3f484a-fb61-403e-95bd-06c6e602f483 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/3ec492fc-0d90-4ea5-8639-e1d3fddc20e2 (127.0.0.1) 2.480000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2caefedf-b1f0-4179-acd5-4d9b29354e9b 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2caefedf-b1f0-4179-acd5-4d9b29354e9b 331s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/8612390e-9a46-49c2-815e-a8055909b037 (127.0.0.1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/8612390e-9a46-49c2-815e-a8055909b037', version='HTTP/1.1', remote_ip='127.0.0.1') 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 331s result = await result 331s ^^^^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 331s future.result() 331s ~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 331s yield maybe_future(sm.delete_session(session_id)) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 331s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 331s raise self._exception.with_traceback(self._exception_tb) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 331s result = coro.send(None) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 331s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 331s raise km.ready.exception() # type: ignore[misc] 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s WARNING NotebookApp:handlers.py:612 Unhandled error 331s ERROR NotebookApp:log.py:55 { 331s "Host": "localhost:12341", 331s "Accept": "*/*", 331s "User-Agent": "python-requests/2.32.5" 331s } 331s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/8612390e-9a46-49c2-815e-a8055909b037 (127.0.0.1) 11.720000ms referer=None 331s --------------------------- Captured stderr teardown --------------------------- 331s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 331s return _run_code(code, main_globals, None, 331s "__main__", mod_spec) 331s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 331s ~~~~^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 331s from pathlib import Path 331s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 331s from ._local import * 331s File "", line 1360, in _find_and_load 331s File "", line 1331, in _find_and_load_unlocked 331s File "", line 935, in _load_unlocked 331s File "", line 1019, in exec_module 331s File "", line 1152, in get_code 331s File "", line 781, in _compile_bytecode 331s KeyboardInterrupt 331s ________________ AsyncSessionAPITest.test_create_with_kernel_id ________________ 331s 331s self = 331s 331s def test_create_with_kernel_id(self): 331s # create a new kernel 331s r = self.request('POST', 'api/kernels') 331s r.raise_for_status() 331s kernel = r.json() 331s 331s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 331s self.assertEqual(resp.status_code, 201) 331s newsession = resp.json() 331s self.assertIn('id', newsession) 331s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 331s self.assertEqual(newsession['kernel']['id'], kernel['id']) 331s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 331s 331s sessions = self.sess_api.list().json() 331s > self.assertEqual(sessions, [newsession]) 331s E AssertionError: Lists differ: [{'id': '8612390e-9a46-49c2-815e-a8055909b037', 'p[553 chars]ne}}] != [{'id': 'cfc6a0db-86a0-4b34-90ff-63a4b3e00587', 'p[279 chars]ne}}] 331s E 331s E First differing element 0: 331s E {'id': '8612390e-9a46-49c2-815e-a8055909b037', 'p[218 chars]: 0}} 331s E {'id': 'cfc6a0db-86a0-4b34-90ff-63a4b3e00587', 'p[278 chars]one}} 331s E 331s E First list contains 1 additional elements. 331s E First extra element 1: 331s E {'id': 'cfc6a0db-86a0-4b34-90ff-63a4b3e00587', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '31df915f-bf32-4343-8ea4-0874e36d2134', 'name': 'python3', 'last_activity': '2026-01-24T03:34:28.804882Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 331s E 331s E Diff is 830 characters long. Set self.maxDiff to None to see it. 331s 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 331s ----------------------------- Captured stderr call ----------------------------- 331s Traceback (most recent call last): 331s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 331s return _run_code(code, main_globals, None, 331s "__main__", mod_spec) 331s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 331s ~~~~^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 331s from ipykernel import kernelapp as app 331s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 331s from .connect import * # noqa: F403 331s ^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 331s from typing import TYPE_CHECKING, Any 331s File "", line 1360, in _find_and_load 331s File "", line 1331, in _find_and_load_unlocked 331s File "", line 935, in _load_unlocked 331s File "", line 1019, in exec_module 331s File "", line 1115, in get_code 331s File "", line 1215, in get_data 331s KeyboardInterrupt 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 331s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqyjow075/runtime/kernel-31df915f-bf32-4343-8ea4-0874e36d2134.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52019 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46757 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 31df915f-bf32-4343-8ea4-0874e36d2134, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.370000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.140000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 2.060000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.990000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2caefedf-b1f0-4179-acd5-4d9b29354e9b 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2caefedf-b1f0-4179-acd5-4d9b29354e9b 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/8612390e-9a46-49c2-815e-a8055909b037 (127.0.0.1) 2.280000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 31df915f-bf32-4343-8ea4-0874e36d2134 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 31df915f-bf32-4343-8ea4-0874e36d2134 331s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587', version='HTTP/1.1', remote_ip='127.0.0.1') 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 331s result = await result 331s ^^^^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 331s future.result() 331s ~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 331s yield maybe_future(sm.delete_session(session_id)) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 331s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 331s raise self._exception.with_traceback(self._exception_tb) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 331s result = coro.send(None) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 331s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 331s raise km.ready.exception() # type: ignore[misc] 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s WARNING NotebookApp:handlers.py:612 Unhandled error 331s ERROR NotebookApp:log.py:55 { 331s "Host": "localhost:12341", 331s "Accept": "*/*", 331s "User-Agent": "python-requests/2.32.5" 331s } 331s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 11.080000ms referer=None 331s __________________ AsyncSessionAPITest.test_modify_kernel_id ___________________ 331s 331s @self.addCleanup 331s def cleanup_sessions(): 331s for session in self.sess_api.list().json(): 331s > self.sess_api.delete(session['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 331s response.raise_for_status() 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s 331s def raise_for_status(self): 331s """Raises :class:`HTTPError`, if one occurred.""" 331s 331s http_error_msg = "" 331s if isinstance(self.reason, bytes): 331s # We attempt to decode utf-8 first because some servers 331s # choose to localize their reason strings. If the string 331s # isn't utf-8, we fall back to iso-8859-1 for all other 331s # encodings. (See PR #3538) 331s try: 331s reason = self.reason.decode("utf-8") 331s except UnicodeDecodeError: 331s reason = self.reason.decode("iso-8859-1") 331s else: 331s reason = self.reason 331s 331s if 400 <= self.status_code < 500: 331s http_error_msg = ( 331s f"{self.status_code} Client Error: {reason} for url: {self.url}" 331s ) 331s 331s elif 500 <= self.status_code < 600: 331s http_error_msg = ( 331s f"{self.status_code} Server Error: {reason} for url: {self.url}" 331s ) 331s 331s if http_error_msg: 331s > raise HTTPError(http_error_msg, response=self) 331s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ----------------------------- Captured stderr call ----------------------------- 331s Traceback (most recent call last): 331s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 331s return _run_code(code, main_globals, None, 331s "__main__", mod_spec) 331s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 331s ~~~~^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 331s from ipykernel import kernelapp as app 331s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 331s from .connect import * # noqa: F403 331s ^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 331s from subprocess import PIPE, Popen 331s File "", line 1357, in _find_and_load 331s File "", line 417, in __enter__ 331s File "", line 443, in _get_module_lock 331s File "", line 232, in __init__ 331s KeyboardInterrupt 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.250000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 331s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqyjow075/runtime/kernel-16fcdbd6-6dd2-4b81-bfe8-03c9e77bdd71.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45535 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60383 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 16fcdbd6-6dd2-4b81-bfe8-03c9e77bdd71, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (127.0.0.1) 21.580000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 31df915f-bf32-4343-8ea4-0874e36d2134 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 31df915f-bf32-4343-8ea4-0874e36d2134 331s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 2.730000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.710000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.950000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 16fcdbd6-6dd2-4b81-bfe8-03c9e77bdd71 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 16fcdbd6-6dd2-4b81-bfe8-03c9e77bdd71 331s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587', version='HTTP/1.1', remote_ip='127.0.0.1') 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 331s result = await result 331s ^^^^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 331s future.result() 331s ~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 331s yield maybe_future(sm.delete_session(session_id)) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 331s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 331s raise self._exception.with_traceback(self._exception_tb) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 331s result = coro.send(None) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 331s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 331s raise km.ready.exception() # type: ignore[misc] 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s WARNING NotebookApp:handlers.py:612 Unhandled error 331s ERROR NotebookApp:log.py:55 { 331s "Host": "localhost:12341", 331s "Accept": "*/*", 331s "User-Agent": "python-requests/2.32.5" 331s } 331s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 11.460000ms referer=None 331s _________________ AsyncSessionAPITest.test_modify_kernel_name __________________ 331s 331s @self.addCleanup 331s def cleanup_sessions(): 331s for session in self.sess_api.list().json(): 331s > self.sess_api.delete(session['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 331s response.raise_for_status() 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s 331s def raise_for_status(self): 331s """Raises :class:`HTTPError`, if one occurred.""" 331s 331s http_error_msg = "" 331s if isinstance(self.reason, bytes): 331s # We attempt to decode utf-8 first because some servers 331s # choose to localize their reason strings. If the string 331s # isn't utf-8, we fall back to iso-8859-1 for all other 331s # encodings. (See PR #3538) 331s try: 331s reason = self.reason.decode("utf-8") 331s except UnicodeDecodeError: 331s reason = self.reason.decode("iso-8859-1") 331s else: 331s reason = self.reason 331s 331s if 400 <= self.status_code < 500: 331s http_error_msg = ( 331s f"{self.status_code} Client Error: {reason} for url: {self.url}" 331s ) 331s 331s elif 500 <= self.status_code < 600: 331s http_error_msg = ( 331s f"{self.status_code} Server Error: {reason} for url: {self.url}" 331s ) 331s 331s if http_error_msg: 331s > raise HTTPError(http_error_msg, response=self) 331s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ----------------------------- Captured stderr call ----------------------------- 331s Traceback (most recent call last): 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (127.0.0.1) 2.180000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 331s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpqyjow075/runtime/kernel-09cd55e3-b0e9-4849-947d-ee4be418f3c4.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51407 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36955 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 09cd55e3-b0e9-4849-947d-ee4be418f3c4, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpqyjow075/notebooks/foo'} 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 16fcdbd6-6dd2-4b81-bfe8-03c9e77bdd71 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 16fcdbd6-6dd2-4b81-bfe8-03c9e77bdd71 331s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 23.110000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (127.0.0.1) 1.760000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (127.0.0.1) 1.920000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 09cd55e3-b0e9-4849-947d-ee4be418f3c4 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 09cd55e3-b0e9-4849-947d-ee4be418f3c4 331s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587', version='HTTP/1.1', remote_ip='127.0.0.1') 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 331s result = await result 331s ^^^^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 331s future.result() 331s ~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 331s yield maybe_future(sm.delete_session(session_id)) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 331s yielded = self.gen.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 331s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 331s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 331s value = future.result() 331s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 331s raise self._exception.with_traceback(self._exception_tb) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 331s result = coro.send(None) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 331s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 331s raise km.ready.exception() # type: ignore[misc] 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 331s await kernel_awaitable 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 331s result = await obj 331s ^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 331s raise e 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 331s out = await method(self, *args, **kwargs) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 331s await self._async_finish_shutdown(restart=restart) 331s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 331s await asyncio.wait_for( 331s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 331s ) 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 331s async with timeouts.timeout(timeout): 331s ~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 331s raise RuntimeError("Timeout should be used inside a task") 331s RuntimeError: Timeout should be used inside a task 331s WARNING NotebookApp:handlers.py:612 Unhandled error 331s ERROR NotebookApp:log.py:55 { 331s "Host": "localhost:12341", 331s "Accept": "*/*", 331s "User-Agent": "python-requests/2.32.5" 331s } 331s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/cfc6a0db-86a0-4b34-90ff-63a4b3e00587 (127.0.0.1) 10.940000ms referer=None 331s --------------------------- Captured stderr teardown --------------------------- 331s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 331s return _run_code(code, main_globals, None, 331s "__main__", mod_spec) 331s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 331s ~~~~^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 331s from pathlib import Path 331s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 331s from ._abc import * 331s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 331s from glob import _Globber, _no_recurse_symlinks 331s File "/usr/lib/python3.13/glob.py", line 269, in 331s _dir_open_flags = os.O_RDONLY | getattr(os, 'O_DIRECTORY', 0) 331s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ 331s KeyboardInterrupt 331s ---------------------------- Captured log teardown ----------------------------- 331s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 09cd55e3-b0e9-4849-947d-ee4be418f3c4 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 31df915f-bf32-4343-8ea4-0874e36d2134 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e85d15ad-c677-4480-8e9b-dd2e4094da0b 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 16fcdbd6-6dd2-4b81-bfe8-03c9e77bdd71 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: cb3f484a-fb61-403e-95bd-06c6e602f483 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2caefedf-b1f0-4179-acd5-4d9b29354e9b 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 35e856a7-fd4b-4137-a647-9abc3f278bd8 331s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 331s =============================== warnings summary =============================== 331s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 331s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 331s /usr/lib/python3/dist-packages/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. 331s return LooseVersion(v) >= LooseVersion(check) 331s 331s ../../../usr/lib/python3/dist-packages/notebook/_tz.py:29: 1 warning 331s services/kernels/tests/test_kernels_api.py: 72 warnings 331s services/sessions/tests/test_sessions_api.py: 88 warnings 331s /usr/lib/python3/dist-packages/notebook/_tz.py:29: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). 331s dt = unaware(*args, **kwargs) 331s 331s ../../../usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14 331s /usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.integration_tests - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 331s pytestmark = pytest.mark.integration_tests 331s 331s services/kernels/tests/test_kernels_api.py: 6 warnings 331s services/sessions/tests/test_sessions_api.py: 6 warnings 331s /usr/lib/python3/dist-packages/nest_asyncio.py:71: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 331s policy = events.get_event_loop_policy() 331s 331s services/kernels/tests/test_kernels_api.py: 22 warnings 331s services/sessions/tests/test_sessions_api.py: 17 warnings 331s /usr/lib/python3/dist-packages/nest_asyncio.py:40: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 331s loop = events.get_event_loop_policy().get_event_loop() 331s 331s services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first 331s loop.make_current() 331s 331s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 331s =========================== short test summary info ============================ 331s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_default_kernel 331s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_kernel_handler 331s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 331s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_no_kernels 331s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 331s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_default_kernel 331s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_kernel_handler 331s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 331s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_no_kernels 331s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 331s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_console_session 331s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_deprecated 331s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_file_session 331s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 331s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 331s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 331s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create 331s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_console_session 331s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_deprecated 331s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_file_session 331s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 331s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 331s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 331s ERROR services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 331s ERROR services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 331s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 331s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 331s ========== 23 failed, 307 deselected, 216 warnings, 4 errors in 8.71s ========== 332s *** END OF RUN 5: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 332s *** SOME TESTS FAILED/ERRORED EVERY RUN, ABORTING *** 332s autopkgtest [03:34:31]: test pytest: -----------------------] 336s autopkgtest [03:34:35]: test pytest: - - - - - - - - - - results - - - - - - - - - - 336s pytest FAIL non-zero exit status 1 340s autopkgtest [03:34:39]: @@@@@@@@@@@@@@@@@@@@ summary 340s pytest FAIL non-zero exit status 1