0s autopkgtest [02:17:01]: starting date and time: 2026-02-06 02:17:01+0000 0s autopkgtest [02:17:01]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [02:17:01]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.rwey2zld/out --timeout-copy=6000 --needs-internet=try --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:jinja2,src:underscore --apt-upgrade jupyter-notebook --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=jinja2/3.1.6-1build1 underscore/1.13.7~dfsg+~1.13.0-6' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-ppc64el --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-15@sto01-ppc64el-5.secgroup --name adt-resolute-ppc64el-jupyter-notebook-20260206-021700-juju-7f2275-prod-proposed-migration-environment-15-6c3d21cb-61bb-4164-8089-fe4c2a5f790f --image adt/ubuntu-resolute-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --net-id=net_prod-autopkgtest-workers-ppc64el -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 5s Creating nova instance adt-resolute-ppc64el-jupyter-notebook-20260206-021700-juju-7f2275-prod-proposed-migration-environment-15-6c3d21cb-61bb-4164-8089-fe4c2a5f790f from image adt/ubuntu-resolute-ppc64el-server-20260205.img (UUID f866c950-0b62-4023-bac6-0f13279e15ed)... 65s autopkgtest [02:18:06]: testbed dpkg architecture: ppc64el 65s autopkgtest [02:18:06]: testbed apt version: 3.1.14 66s autopkgtest [02:18:07]: @@@@@@@@@@@@@@@@@@@@ test bed setup 66s autopkgtest [02:18:07]: testbed release detected to be: None 67s autopkgtest [02:18:08]: updating testbed package index (apt update) 67s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 67s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 67s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 67s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 67s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [221 kB] 67s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [31.4 kB] 67s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1631 kB] 67s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [5260 B] 67s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el Packages [262 kB] 67s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe ppc64el Packages [1416 kB] 67s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse ppc64el Packages [19.7 kB] 68s Fetched 3711 kB in 1s (4812 kB/s) 68s Reading package lists... 69s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 69s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 69s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 69s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 70s Reading package lists... 70s Reading package lists... 70s Building dependency tree... 70s Reading state information... 70s Calculating upgrade... 71s The following packages will be upgraded: 71s libdrm-amdgpu1 libdrm-common libdrm2 mawk pollinate python3-jinja2 71s python3-referencing sed 71s 8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 71s Need to get 593 kB of archives. 71s After this operation, 0 B of additional disk space will be used. 71s Get:1 http://ftpmaster.internal/ubuntu resolute/main ppc64el sed ppc64el 4.9-2build3 [211 kB] 71s Get:2 http://ftpmaster.internal/ubuntu resolute/main ppc64el mawk ppc64el 1.3.4.20260129-1 [147 kB] 71s Get:3 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdrm-common all 2.4.131-1 [9774 B] 71s Get:4 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdrm2 ppc64el 2.4.131-1 [51.4 kB] 71s Get:5 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdrm-amdgpu1 ppc64el 2.4.131-1 [27.5 kB] 71s Get:6 http://ftpmaster.internal/ubuntu resolute/main ppc64el pollinate all 4.33-4ubuntu5 [14.0 kB] 71s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el python3-jinja2 all 3.1.6-1build1 [109 kB] 71s Get:8 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-referencing all 0.36.2-1ubuntu2 [22.2 kB] 71s dpkg-preconfigure: unable to re-open stdin: No such file or directory 71s Fetched 593 kB in 0s (29.6 MB/s) 71s (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 ... 82008 files and directories currently installed.) 71s Preparing to unpack .../sed_4.9-2build3_ppc64el.deb ... 71s Unpacking sed (4.9-2build3) over (4.9-2build2) ... 71s Setting up sed (4.9-2build3) ... 71s (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 ... 82008 files and directories currently installed.) 71s Preparing to unpack .../0-mawk_1.3.4.20260129-1_ppc64el.deb ... 71s Unpacking mawk (1.3.4.20260129-1) over (1.3.4.20250131-2) ... 71s Preparing to unpack .../1-libdrm-common_2.4.131-1_all.deb ... 71s Unpacking libdrm-common (2.4.131-1) over (2.4.129-1) ... 71s Preparing to unpack .../2-libdrm2_2.4.131-1_ppc64el.deb ... 71s Unpacking libdrm2:ppc64el (2.4.131-1) over (2.4.129-1) ... 72s Preparing to unpack .../3-libdrm-amdgpu1_2.4.131-1_ppc64el.deb ... 72s Unpacking libdrm-amdgpu1:ppc64el (2.4.131-1) over (2.4.129-1) ... 72s Preparing to unpack .../4-pollinate_4.33-4ubuntu5_all.deb ... 72s Unpacking pollinate (4.33-4ubuntu5) over (4.33-4ubuntu4) ... 72s Preparing to unpack .../5-python3-jinja2_3.1.6-1build1_all.deb ... 72s Unpacking python3-jinja2 (3.1.6-1build1) over (3.1.6-1) ... 72s Preparing to unpack .../6-python3-referencing_0.36.2-1ubuntu2_all.deb ... 72s Unpacking python3-referencing (0.36.2-1ubuntu2) over (0.36.2-1ubuntu1) ... 72s Setting up python3-jinja2 (3.1.6-1build1) ... 72s Setting up pollinate (4.33-4ubuntu5) ... 83s Setting up mawk (1.3.4.20260129-1) ... 83s Setting up libdrm-common (2.4.131-1) ... 83s Setting up python3-referencing (0.36.2-1ubuntu2) ... 84s Setting up libdrm2:ppc64el (2.4.131-1) ... 84s Setting up libdrm-amdgpu1:ppc64el (2.4.131-1) ... 84s Processing triggers for man-db (2.13.1-1) ... 85s Processing triggers for install-info (7.2-5) ... 85s Processing triggers for libc-bin (2.42-2ubuntu4) ... 85s autopkgtest [02:18:26]: upgrading testbed (apt dist-upgrade and autopurge) 85s Reading package lists... 85s Building dependency tree... 85s Reading state information... 85s Calculating upgrade... 85s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 86s Reading package lists... 86s Building dependency tree... 86s Reading state information... 86s Solving dependencies... 86s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 86s autopkgtest [02:18:27]: rebooting testbed after setup commands that affected boot 206s autopkgtest [02:20:27]: testbed running kernel: Linux 6.18.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 12 16:45:54 UTC 2026 208s autopkgtest [02:20:29]: @@@@@@@@@@@@@@@@@@@@ apt-source jupyter-notebook 211s Get:1 http://ftpmaster.internal/ubuntu resolute/universe jupyter-notebook 6.4.13-5ubuntu0.1 (dsc) [3737 B] 211s Get:2 http://ftpmaster.internal/ubuntu resolute/universe jupyter-notebook 6.4.13-5ubuntu0.1 (tar) [8501 kB] 211s Get:3 http://ftpmaster.internal/ubuntu resolute/universe jupyter-notebook 6.4.13-5ubuntu0.1 (diff) [52.5 kB] 211s gpgv: Signature made Tue Apr 22 01:32:11 2025 UTC 211s gpgv: using RSA key 00F6164E9C2D21BAFBC47E0E58DAD120A6939167 211s gpgv: Can't check signature: No public key 211s dpkg-source: warning: cannot verify inline signature for ./jupyter-notebook_6.4.13-5ubuntu0.1.dsc: no acceptable signature found 212s autopkgtest [02:20:33]: testing package jupyter-notebook version 6.4.13-5ubuntu0.1 212s autopkgtest [02:20:33]: build not needed 230s autopkgtest [02:20:51]: test pytest: preparing testbed 230s Reading package lists... 230s Building dependency tree... 230s Reading state information... 230s Solving dependencies... 230s The following NEW packages will be installed: 230s fonts-font-awesome fonts-glyphicons-halflings fonts-lato fonts-mathjax gdb 230s jupyter-core jupyter-notebook libargon2-1 libbabeltrace1 libjs-backbone 230s libjs-bootstrap libjs-bootstrap-tour libjs-codemirror libjs-es6-promise 230s libjs-jed libjs-jquery libjs-jquery-typeahead libjs-jquery-ui libjs-marked 230s libjs-mathjax libjs-moment libjs-requirejs libjs-requirejs-text 230s libjs-text-encoding libjs-underscore libjs-xterm libnorm1t64 libpgm-5.3-0t64 230s libpython3.14 libpython3.14-minimal libpython3.14-stdlib libsodium23 230s libsource-highlight-common libsource-highlight4t64 libzmq5 node-jed 230s python-notebook-doc python-tinycss2-common python3-all python3-argon2 230s python3-argon2-cffi-bindings python3-astroid python3-asttokens 230s python3-bleach python3-bs4 python3-cffi python3-comm python3-coverage 230s python3-debugpy python3-decorator python3-defusedxml python3-executing 230s python3-fastjsonschema python3-html5lib python3-iniconfig python3-ipykernel 230s python3-ipython python3-ipython-genutils python3-jedi python3-jupyter-client 230s python3-jupyter-core python3-jupyterlab-pygments python3-matplotlib-inline 230s python3-mistune python3-nbclient python3-nbconvert python3-nbformat 230s python3-nest-asyncio python3-notebook python3-pandocfilters python3-parso 230s python3-platformdirs python3-pluggy python3-ply python3-prometheus-client 230s python3-prompt-toolkit python3-psutil python3-pure-eval python3-pycparser 230s python3-pytest python3-requests-unixsocket python3-send2trash 230s python3-soupsieve python3-stack-data python3-terminado python3-tinycss2 230s python3-tornado python3-traitlets python3-typeshed python3-wcwidth 230s python3-webencodings python3-zmq python3.14 python3.14-minimal 230s sphinx-rtd-theme-common 230s 0 upgraded, 95 newly installed, 0 to remove and 0 not upgraded. 230s Need to get 43.1 MB of archives. 230s After this operation, 216 MB of additional disk space will be used. 230s Get:1 http://ftpmaster.internal/ubuntu resolute/main ppc64el fonts-lato all 2.015-1build1 [2779 kB] 231s Get:2 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpython3.14-minimal ppc64el 3.14.2-1 [921 kB] 231s Get:3 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3.14-minimal ppc64el 3.14.2-1 [2712 kB] 231s Get:4 http://ftpmaster.internal/ubuntu resolute/main ppc64el fonts-font-awesome all 5.0.10+really4.7.0~dfsg-4.1build1 [531 kB] 231s Get:5 http://ftpmaster.internal/ubuntu resolute/universe ppc64el fonts-glyphicons-halflings all 1.009~3.4.1+dfsg-6 [119 kB] 231s Get:6 http://ftpmaster.internal/ubuntu resolute/main ppc64el fonts-mathjax all 2.7.9+dfsg-1build1 [2283 kB] 231s Get:7 http://ftpmaster.internal/ubuntu resolute/main ppc64el libbabeltrace1 ppc64el 1.5.11-5 [209 kB] 231s Get:8 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpython3.14-stdlib ppc64el 3.14.2-1 [2444 kB] 231s Get:9 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpython3.14 ppc64el 3.14.2-1 [2731 kB] 231s Get:10 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsource-highlight-common all 3.1.9-4.3build2 [64.2 kB] 231s Get:11 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsource-highlight4t64 ppc64el 3.1.9-4.3build2 [296 kB] 231s Get:12 http://ftpmaster.internal/ubuntu resolute/main ppc64el gdb ppc64el 17.1-1ubuntu2 [5426 kB] 231s Get:13 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-platformdirs all 4.5.1-1 [17.1 kB] 231s Get:14 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-traitlets all 5.14.3+really5.14.3-2 [71.7 kB] 231s Get:15 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-jupyter-core all 5.9.1-1 [28.9 kB] 231s Get:16 http://ftpmaster.internal/ubuntu resolute/universe ppc64el jupyter-core all 5.9.1-1 [6938 B] 231s Get:17 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el libjs-underscore all 1.13.7~dfsg+~1.13.0-6 [86.7 kB] 232s Get:18 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-backbone all 1.4.1~dfsg+~1.4.15-3build1 [186 kB] 232s Get:19 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-bootstrap all 3.4.1+dfsg-6 [129 kB] 232s Get:20 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjs-jquery all 3.7.1+dfsg+~3.5.33-1build1 [321 kB] 232s Get:21 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-bootstrap-tour all 0.12.0+dfsg-6 [21.6 kB] 232s Get:22 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-codemirror all 5.65.20+~cs5.83.25-1 [710 kB] 232s Get:23 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-es6-promise all 4.2.8-12 [14.1 kB] 232s Get:24 http://ftpmaster.internal/ubuntu resolute/universe ppc64el node-jed all 1.1.1-4 [15.2 kB] 232s Get:25 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-jed all 1.1.1-4 [2584 B] 232s Get:26 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-jquery-typeahead all 2.11.0+dfsg1-3build1 [48.3 kB] 232s Get:27 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-jquery-ui all 1.13.2+dfsg-1build1 [251 kB] 232s Get:28 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-marked all 4.2.3+ds+~4.0.7-4 [36.2 kB] 232s Get:29 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjs-mathjax all 2.7.9+dfsg-1build1 [6017 kB] 232s Get:30 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-moment all 2.29.4+ds-1 [147 kB] 232s Get:31 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-requirejs all 2.3.8+ds+~2.1.37-1 [201 kB] 232s Get:32 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-requirejs-text all 2.0.12-2 [9732 B] 232s Get:33 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-text-encoding all 0.7.0-5 [140 kB] 232s Get:34 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-xterm all 5.3.0-4 [475 kB] 232s Get:35 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-tornado ppc64el 6.5.4-0.1 [306 kB] 232s Get:36 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-terminado all 0.18.1-1 [13.2 kB] 232s Get:37 http://ftpmaster.internal/ubuntu resolute/main ppc64el libargon2-1 ppc64el 0~20190702+dfsg-5 [27.0 kB] 232s Get:38 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-ply all 3.11-10 [45.9 kB] 232s Get:39 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-pycparser all 2.23-2 [77.0 kB] 232s Get:40 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-cffi all 2.0.0-2 [75.5 kB] 232s Get:41 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-argon2-cffi-bindings ppc64el 25.1.0-2 [15.5 kB] 232s Get:42 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-argon2 ppc64el 25.1.0-2 [13.8 kB] 232s Get:43 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-comm all 0.2.1-1build1 [7148 B] 232s Get:44 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3.14 ppc64el 3.14.2-1 [816 kB] 232s Get:45 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-coverage ppc64el 7.8.2+dfsg1-1ubuntu1 [160 kB] 232s Get:46 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-debugpy ppc64el 1.8.19+ds-1ubuntu1 [927 kB] 232s Get:47 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-decorator all 5.2.1-2 [28.1 kB] 232s Get:48 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-parso all 0.8.5-1 [68.0 kB] 232s Get:49 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-typeshed all 0.0~git20241223.ea91db2-4 [1554 kB] 233s Get:50 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-jedi all 0.19.1+ds1-1build1 [694 kB] 233s Get:51 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-matplotlib-inline all 0.2.1-1 [9462 B] 233s Get:52 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-wcwidth all 0.2.14+dfsg1-1build1 [26.5 kB] 233s Get:53 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-prompt-toolkit all 3.0.52-2 [258 kB] 233s Get:54 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-astroid all 4.0.2-1ubuntu1 [172 kB] 233s Get:55 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-asttokens all 3.0.1-1 [20.7 kB] 233s Get:56 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-executing all 2.2.1-0.1 [26.2 kB] 233s Get:57 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pure-eval all 0.2.3-1 [11.4 kB] 233s Get:58 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-stack-data all 0.6.3-3 [22.2 kB] 233s Get:59 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-ipython all 8.35.0-2 [575 kB] 233s Get:60 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-psutil ppc64el 7.1.0-1ubuntu1 [192 kB] 233s Get:61 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libnorm1t64 ppc64el 1.5.9+dfsg-4 [198 kB] 233s Get:62 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libpgm-5.3-0t64 ppc64el 5.3.128~dfsg-2.1build2 [184 kB] 233s Get:63 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsodium23 ppc64el 1.0.18-2 [160 kB] 233s Get:64 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libzmq5 ppc64el 4.3.5-1build3 [302 kB] 233s Get:65 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-zmq ppc64el 27.1.0-1 [232 kB] 233s Get:66 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-jupyter-client all 8.7.0-1 [78.5 kB] 233s Get:67 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-nest-asyncio all 1.6.0-1 [6686 B] 233s Get:68 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-ipykernel all 6.30.1-1 [82.8 kB] 233s Get:69 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-ipython-genutils all 0.2.0-7 [22.0 kB] 233s Get:70 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python-tinycss2-common all 1.5.1-1 [47.3 kB] 233s Get:71 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-webencodings all 0.5.1-5build1 [11.7 kB] 233s Get:72 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-tinycss2 all 1.5.1-1 [23.3 kB] 233s Get:73 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-html5lib all 1.2-3 [90.6 kB] 233s Get:74 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-bleach all 6.3.0-1 [44.2 kB] 233s Get:75 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-soupsieve all 2.8.3-1 [34.0 kB] 233s Get:76 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-bs4 all 4.14.3-2build1 [84.8 kB] 233s Get:77 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-defusedxml all 0.7.1-3build1 [42.4 kB] 233s Get:78 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-jupyterlab-pygments all 0.2.2-3build1 [6188 B] 233s Get:79 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-mistune all 3.1.4-1 [35.0 kB] 233s Get:80 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-fastjsonschema all 2.21.1-1 [20.4 kB] 233s Get:81 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-nbformat all 5.10.4-1 [39.2 kB] 233s Get:82 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-nbclient all 0.10.4-1 [22.6 kB] 233s Get:83 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pandocfilters all 1.5.1-1 [23.6 kB] 233s Get:84 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-nbconvert all 7.16.6-1 [140 kB] 233s Get:85 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-prometheus-client all 0.21.1+ds1-1build1 [46.0 kB] 233s Get:86 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-send2trash all 1.8.3-1 [14.6 kB] 233s Get:87 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-notebook all 6.4.13-5ubuntu0.1 [1624 kB] 233s Get:88 http://ftpmaster.internal/ubuntu resolute/universe ppc64el jupyter-notebook all 6.4.13-5ubuntu0.1 [10.4 kB] 233s Get:89 http://ftpmaster.internal/ubuntu resolute/main ppc64el sphinx-rtd-theme-common all 3.0.2+dfsg-3 [1013 kB] 233s Get:90 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python-notebook-doc all 6.4.13-5ubuntu0.1 [2545 kB] 233s Get:91 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-all ppc64el 3.13.9-3 [890 B] 233s Get:92 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-iniconfig all 2.1.0-2 [6962 B] 233s Get:93 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pluggy all 1.6.0-2 [21.1 kB] 233s Get:94 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pytest all 9.0.2-2 [277 kB] 233s Get:95 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-requests-unixsocket all 1.0.1-1 [8620 B] 233s Fetched 43.1 MB in 2s (17.2 MB/s) 233s Selecting previously unselected package fonts-lato. 234s (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 ... 82008 files and directories currently installed.) 234s Preparing to unpack .../00-fonts-lato_2.015-1build1_all.deb ... 234s Unpacking fonts-lato (2.015-1build1) ... 234s Selecting previously unselected package libpython3.14-minimal:ppc64el. 234s Preparing to unpack .../01-libpython3.14-minimal_3.14.2-1_ppc64el.deb ... 234s Unpacking libpython3.14-minimal:ppc64el (3.14.2-1) ... 234s Selecting previously unselected package python3.14-minimal. 234s Preparing to unpack .../02-python3.14-minimal_3.14.2-1_ppc64el.deb ... 234s Unpacking python3.14-minimal (3.14.2-1) ... 234s Selecting previously unselected package fonts-font-awesome. 234s Preparing to unpack .../03-fonts-font-awesome_5.0.10+really4.7.0~dfsg-4.1build1_all.deb ... 234s Unpacking fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1build1) ... 234s Selecting previously unselected package fonts-glyphicons-halflings. 234s Preparing to unpack .../04-fonts-glyphicons-halflings_1.009~3.4.1+dfsg-6_all.deb ... 234s Unpacking fonts-glyphicons-halflings (1.009~3.4.1+dfsg-6) ... 234s Selecting previously unselected package fonts-mathjax. 234s Preparing to unpack .../05-fonts-mathjax_2.7.9+dfsg-1build1_all.deb ... 234s Unpacking fonts-mathjax (2.7.9+dfsg-1build1) ... 234s Selecting previously unselected package libbabeltrace1:ppc64el. 234s Preparing to unpack .../06-libbabeltrace1_1.5.11-5_ppc64el.deb ... 234s Unpacking libbabeltrace1:ppc64el (1.5.11-5) ... 234s Selecting previously unselected package libpython3.14-stdlib:ppc64el. 234s Preparing to unpack .../07-libpython3.14-stdlib_3.14.2-1_ppc64el.deb ... 234s Unpacking libpython3.14-stdlib:ppc64el (3.14.2-1) ... 235s Selecting previously unselected package libpython3.14:ppc64el. 235s Preparing to unpack .../08-libpython3.14_3.14.2-1_ppc64el.deb ... 235s Unpacking libpython3.14:ppc64el (3.14.2-1) ... 235s Selecting previously unselected package libsource-highlight-common. 235s Preparing to unpack .../09-libsource-highlight-common_3.1.9-4.3build2_all.deb ... 235s Unpacking libsource-highlight-common (3.1.9-4.3build2) ... 235s Selecting previously unselected package libsource-highlight4t64:ppc64el. 235s Preparing to unpack .../10-libsource-highlight4t64_3.1.9-4.3build2_ppc64el.deb ... 235s Unpacking libsource-highlight4t64:ppc64el (3.1.9-4.3build2) ... 235s Selecting previously unselected package gdb. 235s Preparing to unpack .../11-gdb_17.1-1ubuntu2_ppc64el.deb ... 235s Unpacking gdb (17.1-1ubuntu2) ... 235s Selecting previously unselected package python3-platformdirs. 235s Preparing to unpack .../12-python3-platformdirs_4.5.1-1_all.deb ... 235s Unpacking python3-platformdirs (4.5.1-1) ... 235s Selecting previously unselected package python3-traitlets. 235s Preparing to unpack .../13-python3-traitlets_5.14.3+really5.14.3-2_all.deb ... 235s Unpacking python3-traitlets (5.14.3+really5.14.3-2) ... 235s Selecting previously unselected package python3-jupyter-core. 235s Preparing to unpack .../14-python3-jupyter-core_5.9.1-1_all.deb ... 235s Unpacking python3-jupyter-core (5.9.1-1) ... 235s Selecting previously unselected package jupyter-core. 235s Preparing to unpack .../15-jupyter-core_5.9.1-1_all.deb ... 235s Unpacking jupyter-core (5.9.1-1) ... 235s Selecting previously unselected package libjs-underscore. 235s Preparing to unpack .../16-libjs-underscore_1.13.7~dfsg+~1.13.0-6_all.deb ... 235s Unpacking libjs-underscore (1.13.7~dfsg+~1.13.0-6) ... 235s Selecting previously unselected package libjs-backbone. 235s Preparing to unpack .../17-libjs-backbone_1.4.1~dfsg+~1.4.15-3build1_all.deb ... 235s Unpacking libjs-backbone (1.4.1~dfsg+~1.4.15-3build1) ... 235s Selecting previously unselected package libjs-bootstrap. 235s Preparing to unpack .../18-libjs-bootstrap_3.4.1+dfsg-6_all.deb ... 235s Unpacking libjs-bootstrap (3.4.1+dfsg-6) ... 235s Selecting previously unselected package libjs-jquery. 235s Preparing to unpack .../19-libjs-jquery_3.7.1+dfsg+~3.5.33-1build1_all.deb ... 235s Unpacking libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 235s Selecting previously unselected package libjs-bootstrap-tour. 235s Preparing to unpack .../20-libjs-bootstrap-tour_0.12.0+dfsg-6_all.deb ... 235s Unpacking libjs-bootstrap-tour (0.12.0+dfsg-6) ... 235s Selecting previously unselected package libjs-codemirror. 235s Preparing to unpack .../21-libjs-codemirror_5.65.20+~cs5.83.25-1_all.deb ... 235s Unpacking libjs-codemirror (5.65.20+~cs5.83.25-1) ... 235s Selecting previously unselected package libjs-es6-promise. 235s Preparing to unpack .../22-libjs-es6-promise_4.2.8-12_all.deb ... 235s Unpacking libjs-es6-promise (4.2.8-12) ... 235s Selecting previously unselected package node-jed. 235s Preparing to unpack .../23-node-jed_1.1.1-4_all.deb ... 235s Unpacking node-jed (1.1.1-4) ... 235s Selecting previously unselected package libjs-jed. 235s Preparing to unpack .../24-libjs-jed_1.1.1-4_all.deb ... 235s Unpacking libjs-jed (1.1.1-4) ... 235s Selecting previously unselected package libjs-jquery-typeahead. 235s Preparing to unpack .../25-libjs-jquery-typeahead_2.11.0+dfsg1-3build1_all.deb ... 235s Unpacking libjs-jquery-typeahead (2.11.0+dfsg1-3build1) ... 235s Selecting previously unselected package libjs-jquery-ui. 235s Preparing to unpack .../26-libjs-jquery-ui_1.13.2+dfsg-1build1_all.deb ... 235s Unpacking libjs-jquery-ui (1.13.2+dfsg-1build1) ... 235s Selecting previously unselected package libjs-marked. 235s Preparing to unpack .../27-libjs-marked_4.2.3+ds+~4.0.7-4_all.deb ... 235s Unpacking libjs-marked (4.2.3+ds+~4.0.7-4) ... 235s Selecting previously unselected package libjs-mathjax. 235s Preparing to unpack .../28-libjs-mathjax_2.7.9+dfsg-1build1_all.deb ... 235s Unpacking libjs-mathjax (2.7.9+dfsg-1build1) ... 236s Selecting previously unselected package libjs-moment. 236s Preparing to unpack .../29-libjs-moment_2.29.4+ds-1_all.deb ... 236s Unpacking libjs-moment (2.29.4+ds-1) ... 236s Selecting previously unselected package libjs-requirejs. 236s Preparing to unpack .../30-libjs-requirejs_2.3.8+ds+~2.1.37-1_all.deb ... 236s Unpacking libjs-requirejs (2.3.8+ds+~2.1.37-1) ... 236s Selecting previously unselected package libjs-requirejs-text. 236s Preparing to unpack .../31-libjs-requirejs-text_2.0.12-2_all.deb ... 236s Unpacking libjs-requirejs-text (2.0.12-2) ... 236s Selecting previously unselected package libjs-text-encoding. 236s Preparing to unpack .../32-libjs-text-encoding_0.7.0-5_all.deb ... 236s Unpacking libjs-text-encoding (0.7.0-5) ... 236s Selecting previously unselected package libjs-xterm. 236s Preparing to unpack .../33-libjs-xterm_5.3.0-4_all.deb ... 236s Unpacking libjs-xterm (5.3.0-4) ... 236s Selecting previously unselected package python3-tornado. 236s Preparing to unpack .../34-python3-tornado_6.5.4-0.1_ppc64el.deb ... 236s Unpacking python3-tornado (6.5.4-0.1) ... 236s Selecting previously unselected package python3-terminado. 236s Preparing to unpack .../35-python3-terminado_0.18.1-1_all.deb ... 236s Unpacking python3-terminado (0.18.1-1) ... 236s Selecting previously unselected package libargon2-1:ppc64el. 236s Preparing to unpack .../36-libargon2-1_0~20190702+dfsg-5_ppc64el.deb ... 236s Unpacking libargon2-1:ppc64el (0~20190702+dfsg-5) ... 236s Selecting previously unselected package python3-ply. 236s Preparing to unpack .../37-python3-ply_3.11-10_all.deb ... 236s Unpacking python3-ply (3.11-10) ... 236s Selecting previously unselected package python3-pycparser. 236s Preparing to unpack .../38-python3-pycparser_2.23-2_all.deb ... 236s Unpacking python3-pycparser (2.23-2) ... 236s Selecting previously unselected package python3-cffi. 236s Preparing to unpack .../39-python3-cffi_2.0.0-2_all.deb ... 236s Unpacking python3-cffi (2.0.0-2) ... 236s Selecting previously unselected package python3-argon2-cffi-bindings. 236s Preparing to unpack .../40-python3-argon2-cffi-bindings_25.1.0-2_ppc64el.deb ... 236s Unpacking python3-argon2-cffi-bindings (25.1.0-2) ... 236s Selecting previously unselected package python3-argon2. 236s Preparing to unpack .../41-python3-argon2_25.1.0-2_ppc64el.deb ... 236s Unpacking python3-argon2 (25.1.0-2) ... 236s Selecting previously unselected package python3-comm. 236s Preparing to unpack .../42-python3-comm_0.2.1-1build1_all.deb ... 236s Unpacking python3-comm (0.2.1-1build1) ... 236s Selecting previously unselected package python3.14. 236s Preparing to unpack .../43-python3.14_3.14.2-1_ppc64el.deb ... 236s Unpacking python3.14 (3.14.2-1) ... 236s Selecting previously unselected package python3-coverage. 236s Preparing to unpack .../44-python3-coverage_7.8.2+dfsg1-1ubuntu1_ppc64el.deb ... 236s Unpacking python3-coverage (7.8.2+dfsg1-1ubuntu1) ... 236s Selecting previously unselected package python3-debugpy. 236s Preparing to unpack .../45-python3-debugpy_1.8.19+ds-1ubuntu1_ppc64el.deb ... 236s Unpacking python3-debugpy (1.8.19+ds-1ubuntu1) ... 237s Selecting previously unselected package python3-decorator. 237s Preparing to unpack .../46-python3-decorator_5.2.1-2_all.deb ... 237s Unpacking python3-decorator (5.2.1-2) ... 237s Selecting previously unselected package python3-parso. 237s Preparing to unpack .../47-python3-parso_0.8.5-1_all.deb ... 237s Unpacking python3-parso (0.8.5-1) ... 237s Selecting previously unselected package python3-typeshed. 237s Preparing to unpack .../48-python3-typeshed_0.0~git20241223.ea91db2-4_all.deb ... 237s Unpacking python3-typeshed (0.0~git20241223.ea91db2-4) ... 237s Selecting previously unselected package python3-jedi. 237s Preparing to unpack .../49-python3-jedi_0.19.1+ds1-1build1_all.deb ... 237s Unpacking python3-jedi (0.19.1+ds1-1build1) ... 237s Selecting previously unselected package python3-matplotlib-inline. 237s Preparing to unpack .../50-python3-matplotlib-inline_0.2.1-1_all.deb ... 237s Unpacking python3-matplotlib-inline (0.2.1-1) ... 237s Selecting previously unselected package python3-wcwidth. 237s Preparing to unpack .../51-python3-wcwidth_0.2.14+dfsg1-1build1_all.deb ... 237s Unpacking python3-wcwidth (0.2.14+dfsg1-1build1) ... 238s Selecting previously unselected package python3-prompt-toolkit. 238s Preparing to unpack .../52-python3-prompt-toolkit_3.0.52-2_all.deb ... 238s Unpacking python3-prompt-toolkit (3.0.52-2) ... 238s Selecting previously unselected package python3-astroid. 238s Preparing to unpack .../53-python3-astroid_4.0.2-1ubuntu1_all.deb ... 238s Unpacking python3-astroid (4.0.2-1ubuntu1) ... 238s Selecting previously unselected package python3-asttokens. 238s Preparing to unpack .../54-python3-asttokens_3.0.1-1_all.deb ... 238s Unpacking python3-asttokens (3.0.1-1) ... 238s Selecting previously unselected package python3-executing. 238s Preparing to unpack .../55-python3-executing_2.2.1-0.1_all.deb ... 238s Unpacking python3-executing (2.2.1-0.1) ... 238s Selecting previously unselected package python3-pure-eval. 238s Preparing to unpack .../56-python3-pure-eval_0.2.3-1_all.deb ... 238s Unpacking python3-pure-eval (0.2.3-1) ... 238s Selecting previously unselected package python3-stack-data. 238s Preparing to unpack .../57-python3-stack-data_0.6.3-3_all.deb ... 238s Unpacking python3-stack-data (0.6.3-3) ... 238s Selecting previously unselected package python3-ipython. 238s Preparing to unpack .../58-python3-ipython_8.35.0-2_all.deb ... 238s Unpacking python3-ipython (8.35.0-2) ... 238s Selecting previously unselected package python3-psutil. 238s Preparing to unpack .../59-python3-psutil_7.1.0-1ubuntu1_ppc64el.deb ... 238s Unpacking python3-psutil (7.1.0-1ubuntu1) ... 238s Selecting previously unselected package libnorm1t64:ppc64el. 238s Preparing to unpack .../60-libnorm1t64_1.5.9+dfsg-4_ppc64el.deb ... 238s Unpacking libnorm1t64:ppc64el (1.5.9+dfsg-4) ... 238s Selecting previously unselected package libpgm-5.3-0t64:ppc64el. 238s Preparing to unpack .../61-libpgm-5.3-0t64_5.3.128~dfsg-2.1build2_ppc64el.deb ... 238s Unpacking libpgm-5.3-0t64:ppc64el (5.3.128~dfsg-2.1build2) ... 238s Selecting previously unselected package libsodium23:ppc64el. 238s Preparing to unpack .../62-libsodium23_1.0.18-2_ppc64el.deb ... 238s Unpacking libsodium23:ppc64el (1.0.18-2) ... 238s Selecting previously unselected package libzmq5:ppc64el. 238s Preparing to unpack .../63-libzmq5_4.3.5-1build3_ppc64el.deb ... 238s Unpacking libzmq5:ppc64el (4.3.5-1build3) ... 238s Selecting previously unselected package python3-zmq. 238s Preparing to unpack .../64-python3-zmq_27.1.0-1_ppc64el.deb ... 238s Unpacking python3-zmq (27.1.0-1) ... 238s Selecting previously unselected package python3-jupyter-client. 238s Preparing to unpack .../65-python3-jupyter-client_8.7.0-1_all.deb ... 238s Unpacking python3-jupyter-client (8.7.0-1) ... 238s Selecting previously unselected package python3-nest-asyncio. 238s Preparing to unpack .../66-python3-nest-asyncio_1.6.0-1_all.deb ... 238s Unpacking python3-nest-asyncio (1.6.0-1) ... 238s Selecting previously unselected package python3-ipykernel. 238s Preparing to unpack .../67-python3-ipykernel_6.30.1-1_all.deb ... 238s Unpacking python3-ipykernel (6.30.1-1) ... 238s Selecting previously unselected package python3-ipython-genutils. 238s Preparing to unpack .../68-python3-ipython-genutils_0.2.0-7_all.deb ... 238s Unpacking python3-ipython-genutils (0.2.0-7) ... 238s Selecting previously unselected package python-tinycss2-common. 238s Preparing to unpack .../69-python-tinycss2-common_1.5.1-1_all.deb ... 238s Unpacking python-tinycss2-common (1.5.1-1) ... 238s Selecting previously unselected package python3-webencodings. 238s Preparing to unpack .../70-python3-webencodings_0.5.1-5build1_all.deb ... 238s Unpacking python3-webencodings (0.5.1-5build1) ... 238s Selecting previously unselected package python3-tinycss2. 238s Preparing to unpack .../71-python3-tinycss2_1.5.1-1_all.deb ... 238s Unpacking python3-tinycss2 (1.5.1-1) ... 238s Selecting previously unselected package python3-html5lib. 238s Preparing to unpack .../72-python3-html5lib_1.2-3_all.deb ... 238s Unpacking python3-html5lib (1.2-3) ... 238s Selecting previously unselected package python3-bleach. 238s Preparing to unpack .../73-python3-bleach_6.3.0-1_all.deb ... 238s Unpacking python3-bleach (6.3.0-1) ... 238s Selecting previously unselected package python3-soupsieve. 238s Preparing to unpack .../74-python3-soupsieve_2.8.3-1_all.deb ... 238s Unpacking python3-soupsieve (2.8.3-1) ... 238s Selecting previously unselected package python3-bs4. 238s Preparing to unpack .../75-python3-bs4_4.14.3-2build1_all.deb ... 238s Unpacking python3-bs4 (4.14.3-2build1) ... 238s Selecting previously unselected package python3-defusedxml. 238s Preparing to unpack .../76-python3-defusedxml_0.7.1-3build1_all.deb ... 238s Unpacking python3-defusedxml (0.7.1-3build1) ... 238s Selecting previously unselected package python3-jupyterlab-pygments. 238s Preparing to unpack .../77-python3-jupyterlab-pygments_0.2.2-3build1_all.deb ... 238s Unpacking python3-jupyterlab-pygments (0.2.2-3build1) ... 238s Selecting previously unselected package python3-mistune. 238s Preparing to unpack .../78-python3-mistune_3.1.4-1_all.deb ... 238s Unpacking python3-mistune (3.1.4-1) ... 238s Selecting previously unselected package python3-fastjsonschema. 238s Preparing to unpack .../79-python3-fastjsonschema_2.21.1-1_all.deb ... 238s Unpacking python3-fastjsonschema (2.21.1-1) ... 238s Selecting previously unselected package python3-nbformat. 238s Preparing to unpack .../80-python3-nbformat_5.10.4-1_all.deb ... 238s Unpacking python3-nbformat (5.10.4-1) ... 238s Selecting previously unselected package python3-nbclient. 238s Preparing to unpack .../81-python3-nbclient_0.10.4-1_all.deb ... 238s Unpacking python3-nbclient (0.10.4-1) ... 238s Selecting previously unselected package python3-pandocfilters. 238s Preparing to unpack .../82-python3-pandocfilters_1.5.1-1_all.deb ... 238s Unpacking python3-pandocfilters (1.5.1-1) ... 238s Selecting previously unselected package python3-nbconvert. 238s Preparing to unpack .../83-python3-nbconvert_7.16.6-1_all.deb ... 238s Unpacking python3-nbconvert (7.16.6-1) ... 238s Selecting previously unselected package python3-prometheus-client. 238s Preparing to unpack .../84-python3-prometheus-client_0.21.1+ds1-1build1_all.deb ... 238s Unpacking python3-prometheus-client (0.21.1+ds1-1build1) ... 238s Selecting previously unselected package python3-send2trash. 238s Preparing to unpack .../85-python3-send2trash_1.8.3-1_all.deb ... 238s Unpacking python3-send2trash (1.8.3-1) ... 238s Selecting previously unselected package python3-notebook. 238s Preparing to unpack .../86-python3-notebook_6.4.13-5ubuntu0.1_all.deb ... 238s Unpacking python3-notebook (6.4.13-5ubuntu0.1) ... 238s Selecting previously unselected package jupyter-notebook. 238s Preparing to unpack .../87-jupyter-notebook_6.4.13-5ubuntu0.1_all.deb ... 238s Unpacking jupyter-notebook (6.4.13-5ubuntu0.1) ... 238s Selecting previously unselected package sphinx-rtd-theme-common. 238s Preparing to unpack .../88-sphinx-rtd-theme-common_3.0.2+dfsg-3_all.deb ... 238s Unpacking sphinx-rtd-theme-common (3.0.2+dfsg-3) ... 238s Selecting previously unselected package python-notebook-doc. 238s Preparing to unpack .../89-python-notebook-doc_6.4.13-5ubuntu0.1_all.deb ... 238s Unpacking python-notebook-doc (6.4.13-5ubuntu0.1) ... 239s Selecting previously unselected package python3-all. 239s Preparing to unpack .../90-python3-all_3.13.9-3_ppc64el.deb ... 239s Unpacking python3-all (3.13.9-3) ... 239s Selecting previously unselected package python3-iniconfig. 239s Preparing to unpack .../91-python3-iniconfig_2.1.0-2_all.deb ... 239s Unpacking python3-iniconfig (2.1.0-2) ... 239s Selecting previously unselected package python3-pluggy. 239s Preparing to unpack .../92-python3-pluggy_1.6.0-2_all.deb ... 239s Unpacking python3-pluggy (1.6.0-2) ... 239s Selecting previously unselected package python3-pytest. 239s Preparing to unpack .../93-python3-pytest_9.0.2-2_all.deb ... 239s Unpacking python3-pytest (9.0.2-2) ... 239s Selecting previously unselected package python3-requests-unixsocket. 239s Preparing to unpack .../94-python3-requests-unixsocket_1.0.1-1_all.deb ... 239s Unpacking python3-requests-unixsocket (1.0.1-1) ... 239s Setting up libjs-jquery-typeahead (2.11.0+dfsg1-3build1) ... 239s Setting up python3-iniconfig (2.1.0-2) ... 239s Setting up python3-tornado (6.5.4-0.1) ... 240s Setting up libnorm1t64:ppc64el (1.5.9+dfsg-4) ... 270s Setting up python3-pure-eval (0.2.3-1) ... 270s Setting up python3-send2trash (1.8.3-1) ... 270s Setting up fonts-lato (2.015-1build1) ... 270s Setting up fonts-mathjax (2.7.9+dfsg-1build1) ... 270s Setting up libsodium23:ppc64el (1.0.18-2) ... 270s Setting up libjs-mathjax (2.7.9+dfsg-1build1) ... 270s Setting up libjs-requirejs-text (2.0.12-2) ... 270s Setting up python3-parso (0.8.5-1) ... 270s Setting up python3-defusedxml (0.7.1-3build1) ... 270s Setting up python3-ipython-genutils (0.2.0-7) ... 270s Setting up fonts-glyphicons-halflings (1.009~3.4.1+dfsg-6) ... 270s Setting up libargon2-1:ppc64el (0~20190702+dfsg-5) ... 270s Setting up python3-ply (3.11-10) ... 270s Setting up libpython3.14-minimal:ppc64el (3.14.2-1) ... 270s Setting up libjs-moment (2.29.4+ds-1) ... 270s Setting up python3-pandocfilters (1.5.1-1) ... 270s Setting up libjs-requirejs (2.3.8+ds+~2.1.37-1) ... 270s Setting up libjs-es6-promise (4.2.8-12) ... 270s Setting up libjs-text-encoding (0.7.0-5) ... 270s Setting up python3-webencodings (0.5.1-5build1) ... 270s Setting up python3-platformdirs (4.5.1-1) ... 270s Setting up python3-psutil (7.1.0-1ubuntu1) ... 270s Setting up libsource-highlight-common (3.1.9-4.3build2) ... 270s Setting up python3-pycparser (2.23-2) ... 270s Setting up python3-requests-unixsocket (1.0.1-1) ... 270s Setting up python3-jupyterlab-pygments (0.2.2-3build1) ... 270s Setting up libpgm-5.3-0t64:ppc64el (5.3.128~dfsg-2.1build2) ... 270s Setting up python3-decorator (5.2.1-2) ... 270s Setting up python3-wcwidth (0.2.14+dfsg1-1build1) ... 270s Setting up node-jed (1.1.1-4) ... 270s Setting up python3-typeshed (0.0~git20241223.ea91db2-4) ... 270s Setting up libjs-xterm (5.3.0-4) ... 270s Setting up python3-nest-asyncio (1.6.0-1) ... 270s Setting up libjs-codemirror (5.65.20+~cs5.83.25-1) ... 270s Setting up libjs-jed (1.1.1-4) ... 270s Setting up python3-html5lib (1.2-3) ... 270s Setting up libbabeltrace1:ppc64el (1.5.11-5) ... 270s Setting up python3-pluggy (1.6.0-2) ... 270s Setting up python3-fastjsonschema (2.21.1-1) ... 270s Setting up python3-terminado (0.18.1-1) ... 270s Setting up python3-astroid (4.0.2-1ubuntu1) ... 270s Setting up python3-traitlets (5.14.3+really5.14.3-2) ... 270s Setting up python-tinycss2-common (1.5.1-1) ... 270s Setting up libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 270s Setting up python3-mistune (3.1.4-1) ... 270s Setting up python3-soupsieve (2.8.3-1) ... 270s Setting up fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1build1) ... 270s Setting up sphinx-rtd-theme-common (3.0.2+dfsg-3) ... 270s Setting up python3.14-minimal (3.14.2-1) ... 270s Setting up python3-jupyter-core (5.9.1-1) ... 270s Setting up libjs-bootstrap (3.4.1+dfsg-6) ... 270s Setting up libjs-underscore (1.13.7~dfsg+~1.13.0-6) ... 270s Setting up libjs-marked (4.2.3+ds+~4.0.7-4) ... 270s Setting up python3-prompt-toolkit (3.0.52-2) ... 270s Setting up python3-tinycss2 (1.5.1-1) ... 270s Setting up libzmq5:ppc64el (4.3.5-1build3) ... 270s Setting up python3-jedi (0.19.1+ds1-1build1) ... 270s Setting up libpython3.14-stdlib:ppc64el (3.14.2-1) ... 270s Setting up python3-asttokens (3.0.1-1) ... 270s Setting up python3-pytest (9.0.2-2) ... 270s Setting up python3-cffi (2.0.0-2) ... 270s Setting up libjs-bootstrap-tour (0.12.0+dfsg-6) ... 270s Setting up libjs-backbone (1.4.1~dfsg+~1.4.15-3build1) ... 270s Setting up libsource-highlight4t64:ppc64el (3.1.9-4.3build2) ... 270s Setting up python3-nbformat (5.10.4-1) ... 270s Setting up python-notebook-doc (6.4.13-5ubuntu0.1) ... 270s Setting up python3-bs4 (4.14.3-2build1) ... 270s Setting up python3-bleach (6.3.0-1) ... 270s Setting up python3-matplotlib-inline (0.2.1-1) ... 270s Setting up python3-comm (0.2.1-1build1) ... 270s Setting up python3-prometheus-client (0.21.1+ds1-1build1) ... 270s Setting up libjs-jquery-ui (1.13.2+dfsg-1build1) ... 270s Setting up python3-executing (2.2.1-0.1) ... 270s Setting up python3-zmq (27.1.0-1) ... 270s Setting up python3-argon2-cffi-bindings (25.1.0-2) ... 270s Setting up python3-argon2 (25.1.0-2) ... 270s Setting up libpython3.14:ppc64el (3.14.2-1) ... 270s Setting up python3-jupyter-client (8.7.0-1) ... 270s Setting up jupyter-core (5.9.1-1) ... 270s Setting up python3.14 (3.14.2-1) ... 270s Setting up python3-stack-data (0.6.3-3) ... 270s Setting up python3-all (3.13.9-3) ... 270s Setting up python3-coverage (7.8.2+dfsg1-1ubuntu1) ... 270s Setting up python3-nbclient (0.10.4-1) ... 270s Setting up gdb (17.1-1ubuntu2) ... 270s Setting up python3-ipython (8.35.0-2) ... 270s /usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:3141: SyntaxWarning: 'return' in a 'finally' block 270s return result 270s Setting up python3-nbconvert (7.16.6-1) ... 270s Setting up python3-debugpy (1.8.19+ds-1ubuntu1) ... 270s Setting up python3-ipykernel (6.30.1-1) ... 270s Setting up python3-notebook (6.4.13-5ubuntu0.1) ... 270s Setting up jupyter-notebook (6.4.13-5ubuntu0.1) ... 270s Processing triggers for systemd (259-1ubuntu3) ... 270s Processing triggers for man-db (2.13.1-1) ... 270s Processing triggers for libc-bin (2.42-2ubuntu4) ... 270s autopkgtest [02:21:21]: test pytest: [----------------------- 270s Testing with python3.14 270s *** 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 270s ============================= test session starts ============================== 270s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 270s rootdir: /tmp/autopkgtest.tpx4mW/autopkgtest_tmp 270s plugins: typeguard-4.4.4 270s collected 330 items / 6 deselected / 324 selected 270s 270s auth/tests/test_login.py .. [ 0%] 270s auth/tests/test_security.py .... [ 1%] 270s bundler/tests/test_bundler_api.py ..... [ 3%] 270s bundler/tests/test_bundler_tools.py ............. [ 7%] 270s bundler/tests/test_bundlerextension.py ... [ 8%] 270s nbconvert/tests/test_nbconvert_handlers.py ssssss [ 10%] 270s services/api/tests/test_api.py ... [ 11%] 270s services/config/tests/test_config_api.py ... [ 12%] 270s services/contents/tests/test_contents_api.py .s..........ss..s.......... [ 20%] 270s ................s...........ss..s......................... [ 38%] 270s services/contents/tests/test_fileio.py ... [ 39%] 270s services/contents/tests/test_largefilemanager.py . [ 39%] 271s services/contents/tests/test_manager.py .....s........ss..........ss.... [ 49%] 275s .... [ 50%] 282s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF.. [ 54%] 283s services/kernelspecs/tests/test_kernelspecs_api.py ....... [ 56%] 284s services/nbconvert/tests/test_nbconvert_api.py . [ 56%] 284s services/sessions/tests/test_sessionmanager.py ......... [ 59%] 286s services/sessions/tests/test_sessions_api.py FFFFFE.FEFE.FFFFFFFE.FEFE.F [ 65%] 286s F [ 66%] 290s terminal/tests/test_terminals_api.py ........ [ 68%] 290s tests/test_config_manager.py . [ 68%] 290s tests/test_files.py ..... [ 70%] 290s tests/test_gateway.py ...... [ 72%] 290s tests/test_i18n.py . [ 72%] 290s tests/test_log.py . [ 72%] 291s tests/test_nbextensions.py ................................... [ 83%] 292s tests/test_notebookapp.py .......................... [ 91%] 292s tests/test_paths.py ... [ 92%] 292s tests/test_serialize.py .. [ 93%] 293s tests/test_serverextensions.py ..... [ 94%] 293s tests/test_traittypes.py ........... [ 98%] 294s tests/test_utils.py ....s [ 99%] 295s tree/tests/test_tree_handler.py . [100%] 295s 295s ==================================== ERRORS ==================================== 295s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 295s 295s self = 295s 295s def tearDown(self): 295s for k in self.kern_api.list().json(): 295s > self.kern_api.shutdown(k['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/698a32cf-98e6-4f04-b03b-232e2fa9502c 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 295s from glob import _Globber, _no_recurse_symlinks 295s File "/usr/lib/python3.13/glob.py", line 3, in 295s import contextlib 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1152, in get_code 295s File "", line 781, in _compile_bytecode 295s KeyboardInterrupt 295s Exception ignored in: .cb at 0x7efdd680cf40> 295s Traceback (most recent call last): 295s File "", line 445, in cb 295s KeyboardInterrupt: 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpenhkv6gx/runtime/kernel-698a32cf-98e6-4f04-b03b-232e2fa9502c.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57545 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37197 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 698a32cf-98e6-4f04-b03b-232e2fa9502c, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.320000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.730000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpenhkv6gx/runtime/kernel-d8723f2d-7016-483c-8f1a-f6594fd0a836.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50689 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43565 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: d8723f2d-7016-483c-8f1a-f6594fd0a836, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.010000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.800000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: d8723f2d-7016-483c-8f1a-f6594fd0a836 295s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/d8723f2d-7016-483c-8f1a-f6594fd0a836/interrupt (::1) 4.190000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 295s yield maybe_future(km.restart_kernel(kernel_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 295s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 295s await ensure_async(kernel.restart_kernel(now=now)) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 295s await self._async_shutdown_kernel(now=now, restart=True) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/d8723f2d-7016-483c-8f1a-f6594fd0a836/restart (::1) 6.040000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 3.540000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 698a32cf-98e6-4f04-b03b-232e2fa9502c 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 698a32cf-98e6-4f04-b03b-232e2fa9502c 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/698a32cf-98e6-4f04-b03b-232e2fa9502c (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/698a32cf-98e6-4f04-b03b-232e2fa9502c', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 295s yielded = ctx_run(next, result) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 295s yield maybe_future(km.shutdown_kernel(kernel_id)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/698a32cf-98e6-4f04-b03b-232e2fa9502c (::1) 8.110000ms referer=None 295s _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 295s 295s self = 295s 295s def tearDown(self): 295s for k in self.kern_api.list().json(): 295s > self.kern_api.shutdown(k['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 295s from glob import _Globber, _no_recurse_symlinks 295s File "/usr/lib/python3.13/glob.py", line 5, in 295s import re 295s File "/usr/lib/python3.13/re/__init__.py", line 125, in 295s import enum 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1152, in get_code 295s File "", line 781, in _compile_bytecode 295s KeyboardInterrupt 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnbkrp1h7/runtime/kernel-9fc9fd81-a804-4b4c-9a65-928c50fc9ae9.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37581 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55289 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9fc9fd81-a804-4b4c-9a65-928c50fc9ae9, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.600000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.600000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnbkrp1h7/runtime/kernel-68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53765 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39893 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.900000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 5.390000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6 295s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6/interrupt (::1) 0.710000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 295s yield maybe_future(km.restart_kernel(kernel_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 295s result = coro.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 295s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 295s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 295s yield self # This tells Task to wait for completion. 295s ^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 295s await ensure_async(kernel.restart_kernel(now=now)) 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 295s await self._async_shutdown_kernel(now=now, restart=True) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6/restart (::1) 7.550000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.680000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/9fc9fd81-a804-4b4c-9a65-928c50fc9ae9', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 295s yield maybe_future(km.shutdown_kernel(kernel_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 (::1) 6.600000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 295s import jupyter_client 295s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 295s from .asynchronous import AsyncKernelClient 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 295s from .client import AsyncKernelClient # noqa 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 295s import zmq.asyncio 295s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 295s import asyncio 295s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 295s from .base_events import * 295s File "", line 1360, in _find_and_load 295s File "", line 1322, in _find_and_load_unlocked 295s File "", line 1262, in _find_spec 295s File "", line 1556, in find_spec 295s File "", line 1530, in _get_spec 295s File "", line 1629, in find_spec 295s File "", line 152, in _path_stat 295s KeyboardInterrupt 295s ________ ERROR at teardown of SessionAPITest.test_create_with_kernel_id ________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/c6f6ecc1-00d2-4142-9552-7dadb3820fa3 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-2b7cf963-6b1b-4dbf-ab19-910c01550125.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47259 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35993 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2b7cf963-6b1b-4dbf-ab19-910c01550125, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.180000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.810000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 2.980000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.620000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 03245deb-1845-4695-9432-d40ba8110583 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 03245deb-1845-4695-9432-d40ba8110583 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/9f3a4358-779c-4ade-9093-2f53287a6180 (::1) 1.120000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2b7cf963-6b1b-4dbf-ab19-910c01550125 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2b7cf963-6b1b-4dbf-ab19-910c01550125 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/c6f6ecc1-00d2-4142-9552-7dadb3820fa3 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/c6f6ecc1-00d2-4142-9552-7dadb3820fa3', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 295s from subprocess import PIPE, Popen 295s File "/usr/lib/python3.13/subprocess.py", line 46, in 295s import locale 295s File "/usr/lib/python3.13/locale.py", line 180, in 295s _percent_re = re.compile(r'%(?:\((?P.*?)\))?' 295s r'(?P[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]') 295s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 295s return _compile(pattern, flags) 295s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 295s p = _compiler.compile(pattern, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 295s code = _code(p, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 295s _compile(code, p.data, flags) 295s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 117, in _compile 295s _compile(code, av[2], flags) 295s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 126, in _compile 295s _compile(code, p, _combine_flags(flags, add_flags, del_flags)) 295s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 109, in _compile 295s _compile(code, av[2], flags) 295s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 102, in _compile 295s emit(ANY) 295s ~~~~^^^^^ 295s KeyboardInterrupt 295s __________ ERROR at teardown of SessionAPITest.test_modify_kernel_id ___________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 295s import jupyter_client 295s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 295s from .asynchronous import AsyncKernelClient 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 295s from .client import AsyncKernelClient # noqa 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 295s import zmq.asyncio 295s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 52, in 295s from zmq import backend 295s File "/usr/lib/python3/dist-packages/zmq/backend/__init__.py", line 25, in 295s _ns = select_backend(first) 295s File "/usr/lib/python3/dist-packages/zmq/backend/select.py", line 31, in select_backend 295s mod = import_module(name) 295s File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module 295s return _bootstrap._gcd_import(name[level:], package, level) 295s ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/zmq/backend/cython/__init__.py", line 6, in 295s from . import _zmq 295s File "_zmq.py", line 156, in init zmq.backend.cython._zmq 295s File "/usr/lib/python3/dist-packages/zmq/constants.py", line 134, in 295s class SocketOption(IntEnum): 295s ...<138 lines>... 295s NORM_PUSH = 124 295s File "/usr/lib/python3/dist-packages/zmq/constants.py", line 217, in SocketOption 295s MULTICAST_MAXTPDU = 84 295s ^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/enum.py", line 354, in __setitem__ 295s def __setitem__(self, key, value): 295s 295s KeyboardInterrupt 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-2e522dc5-f3ea-4654-bba1-54688cd1ffe4.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33563 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42881 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2e522dc5-f3ea-4654-bba1-54688cd1ffe4, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.430000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-e1fa8998-eab9-4ef9-92fd-ea1535426418.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49057 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46421 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: e1fa8998-eab9-4ef9-92fd-ea1535426418, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 18.180000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2e522dc5-f3ea-4654-bba1-54688cd1ffe4 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2e522dc5-f3ea-4654-bba1-54688cd1ffe4 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception PATCH /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='PATCH', uri='/a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 154, in patch 295s km.shutdown_kernel(before['kernel']['id']) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 PATCH /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 19.570000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.660000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e1fa8998-eab9-4ef9-92fd-ea1535426418 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e1fa8998-eab9-4ef9-92fd-ea1535426418 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s --------------------------- Captured stderr teardown --------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 295s from subprocess import PIPE, Popen 295s File "/usr/lib/python3.13/subprocess.py", line 49, in 295s import signal 295s File "/usr/lib/python3.13/signal.py", line 19, in 295s _IntEnum._convert_( 295s ~~~~~~~~~~~~~~~~~~^ 295s 'Sigmasks', __name__, 295s ^^^^^^^^^^^^^^^^^^^^^ 295s lambda name: name in ('SIG_BLOCK', 'SIG_UNBLOCK', 'SIG_SETMASK')) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/enum.py", line 928, in _convert_ 295s cls = _simple_enum(etype=cls, boundary=boundary or KEEP)(tmp_cls) 295s File "/usr/lib/python3.13/enum.py", line 1805, in convert_class 295s enum_class = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) 295s File "/usr/lib/python3.13/enum.py", line 505, in __new__ 295s return super().__new__(metacls, cls, bases, classdict, **kwds) 295s ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s KeyboardInterrupt 295s _________ ERROR at teardown of SessionAPITest.test_modify_kernel_name __________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.820000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-7910a507-ff24-4865-a2f2-39791781e05c.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55545 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52905 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 7910a507-ff24-4865-a2f2-39791781e05c, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e1fa8998-eab9-4ef9-92fd-ea1535426418 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e1fa8998-eab9-4ef9-92fd-ea1535426418 295s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 19.190000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.580000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.630000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7910a507-ff24-4865-a2f2-39791781e05c 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7910a507-ff24-4865-a2f2-39791781e05c 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 7.560000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 295s from glob import _Globber, _no_recurse_symlinks 295s File "/usr/lib/python3.13/glob.py", line 5, in 295s import re 295s File "/usr/lib/python3.13/re/__init__.py", line 126, in 295s from . import _compiler, _parser 295s File "/usr/lib/python3.13/re/_compiler.py", line 16, in 295s from ._casefix import _EXTRA_CASES 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1097, in get_code 295s File "", line 671, in _check_name_wrapper 295s KeyboardInterrupt 295s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_kernel_id ______ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/660b8839-56cd-4f69-aaaa-c0ab099e90b6 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-fd847240-b433-4562-b566-dbca87cc1b64.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57777 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53807 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: fd847240-b433-4562-b566-dbca87cc1b64, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.190000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.700000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.590000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.600000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a1dbba1c-2f18-4fe4-8f13-4f90357584bc 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a1dbba1c-2f18-4fe4-8f13-4f90357584bc 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/e14df48c-6736-4131-9eeb-107e670fb304 (::1) 0.730000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fd847240-b433-4562-b566-dbca87cc1b64 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fd847240-b433-4562-b566-dbca87cc1b64 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/660b8839-56cd-4f69-aaaa-c0ab099e90b6 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/660b8839-56cd-4f69-aaaa-c0ab099e90b6', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 295s import json 295s File "", line 1357, in _find_and_load 295s File "", line 417, in __enter__ 295s File "", line 443, in _get_module_lock 295s File "", line 232, in __init__ 295s KeyboardInterrupt 295s ________ ERROR at teardown of AsyncSessionAPITest.test_modify_kernel_id ________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 295s import jupyter_client 295s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 295s from .asynchronous import AsyncKernelClient 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 295s from .client import AsyncKernelClient # noqa 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 295s import zmq.asyncio 295s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 52, in 295s from zmq import backend 295s File "/usr/lib/python3/dist-packages/zmq/backend/__init__.py", line 19, in 295s if platform.python_implementation() == 'PyPy': 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.13/platform.py", line 1242, in python_implementation 295s return _sys_version()[0] 295s ~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.13/platform.py", line 1193, in _sys_version 295s cpython_sys_version_parser = re.compile( 295s r'([\w.+]+)\s*' # "version" 295s ...<3 lines>... 295s r'(?:,\s*([\w :]*))?)?\)\s*' # ", buildtime)" 295s r'\[([^\]]+)\]?', re.ASCII) # "[compiler]" 295s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 295s return _compile(pattern, flags) 295s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 295s p = _compiler.compile(pattern, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 748, in compile 295s p = _parser.parse(p, flags) 295s File "/usr/lib/python3.13/re/_parser.py", line 980, in parse 295s p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) 295s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 295s itemsappend(_parse(source, state, verbose, nested + 1, 295s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s not nested and not items)) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_parser.py", line 863, in _parse 295s p = _parse_sub(source, state, sub_verbose, nested + 1) 295s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 295s itemsappend(_parse(source, state, verbose, nested + 1, 295s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s not nested and not items)) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_parser.py", line 547, in _parse 295s subpatternappend((LITERAL, _ord(this))) 295s ~~~~^^^^^^ 295s KeyboardInterrupt 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-5156565e-04dc-4ef5-bfbe-7d9b7cbda467.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52605 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35579 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 5156565e-04dc-4ef5-bfbe-7d9b7cbda467, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.230000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-9c86aaaa-d914-4b2f-bad0-4e080a723987.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52391 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44743 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9c86aaaa-d914-4b2f-bad0-4e080a723987, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 18.940000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 5156565e-04dc-4ef5-bfbe-7d9b7cbda467 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5156565e-04dc-4ef5-bfbe-7d9b7cbda467 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception PATCH /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='PATCH', uri='/a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 153, in patch 295s yield maybe_future( 295s km.shutdown_kernel(before['kernel']['id']) 295s ) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 PATCH /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 15.290000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.700000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9c86aaaa-d914-4b2f-bad0-4e080a723987 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9c86aaaa-d914-4b2f-bad0-4e080a723987 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 10.680000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 295s from subprocess import PIPE, Popen 295s File "/usr/lib/python3.13/subprocess.py", line 46, in 295s import locale 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1152, in get_code 295s File "", line 781, in _compile_bytecode 295s KeyboardInterrupt 295s _______ ERROR at teardown of AsyncSessionAPITest.test_modify_kernel_name _______ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 295s from ._local import * 295s File "/usr/lib/python3.13/pathlib/_local.py", line 6, in 295s import warnings 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1115, in get_code 295s File "", line 1214, in get_data 295s KeyboardInterrupt 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.870000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-98bb45f2-6fdd-453d-b4b9-27340a4e2ea5.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50379 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56619 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 98bb45f2-6fdd-453d-b4b9-27340a4e2ea5, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9c86aaaa-d914-4b2f-bad0-4e080a723987 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9c86aaaa-d914-4b2f-bad0-4e080a723987 295s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 17.000000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.610000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 3.020000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 98bb45f2-6fdd-453d-b4b9-27340a4e2ea5 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 98bb45f2-6fdd-453d-b4b9-27340a4e2ea5 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 8.320000ms referer=None 295s =================================== FAILURES =================================== 295s ______________________ KernelAPITest.test_default_kernel _______________________ 295s 295s self = 295s 295s def tearDown(self): 295s for k in self.kern_api.list().json(): 295s > self.kern_api.shutdown(k['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/f65d81ce-406a-439a-855d-34a65538bb4c 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ------------------------------ Captured log setup ------------------------------ 295s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpenhkv6gx/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpenhkv6gx/etc/jupyter'] for config files 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpenhkv6gx/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpenhkv6gx/config 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpenhkv6gx/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpenhkv6gx/config 295s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpenhkv6gx/notebooks 295s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 295s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 295s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 295s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 295s WARNING NotebookApp:handlers.py:612 Forbidden 295s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.420000ms referer=None 295s ----------------------------- Captured stderr call ----------------------------- 295s Fatal Python error: init_import_site: Failed to import the site module 295s Python runtime state: initialized 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpenhkv6gx/runtime/kernel-f65d81ce-406a-439a-855d-34a65538bb4c.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60177 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58559 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: f65d81ce-406a-439a-855d-34a65538bb4c, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 71.210000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f65d81ce-406a-439a-855d-34a65538bb4c 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f65d81ce-406a-439a-855d-34a65538bb4c 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/f65d81ce-406a-439a-855d-34a65538bb4c (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/f65d81ce-406a-439a-855d-34a65538bb4c', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 295s yielded = ctx_run(next, result) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 295s yield maybe_future(km.shutdown_kernel(kernel_id)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/f65d81ce-406a-439a-855d-34a65538bb4c (::1) 9.750000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/site.py", line 735, in 295s main() 295s ~~~~^^ 295s File "/usr/lib/python3.13/site.py", line 722, in main 295s known_paths = addsitepackages(known_paths) 295s File "/usr/lib/python3.13/site.py", line 441, in addsitepackages 295s addsitedir(sitedir, known_paths) 295s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/site.py", line 248, in addsitedir 295s names = os.listdir(sitedir) 295s KeyboardInterrupt 295s ______________________ KernelAPITest.test_kernel_handler _______________________ 295s 295s self = 295s 295s def test_kernel_handler(self): 295s # GET kernel with given id 295s kid = self.kern_api.start().json()['id'] 295s r = self.kern_api.get(kid) 295s kern1 = r.json() 295s self.assertEqual(r.status_code, 200) 295s assert isinstance(kern1, dict) 295s self.assertIn('id', kern1) 295s self.assertEqual(kern1['id'], kid) 295s 295s # Request a bad kernel id and check that a JSON 295s # message is returned! 295s bad_id = '111-111-111-111-111' 295s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 295s self.kern_api.get(bad_id) 295s 295s # DELETE kernel with id 295s > r = self.kern_api.shutdown(kid) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/844ba114-d0fe-45ef-a7e6-e9ab2529c23a 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpenhkv6gx/runtime/kernel-844ba114-d0fe-45ef-a7e6-e9ab2529c23a.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49059 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41427 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 844ba114-d0fe-45ef-a7e6-e9ab2529c23a, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.030000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/844ba114-d0fe-45ef-a7e6-e9ab2529c23a (::1) 0.580000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1): Kernel does not exist: 111-111-111-111-111 295s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 295s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1) 0.600000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 844ba114-d0fe-45ef-a7e6-e9ab2529c23a 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 844ba114-d0fe-45ef-a7e6-e9ab2529c23a 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/844ba114-d0fe-45ef-a7e6-e9ab2529c23a (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/844ba114-d0fe-45ef-a7e6-e9ab2529c23a', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 295s yielded = ctx_run(next, result) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 295s yield maybe_future(km.shutdown_kernel(kernel_id)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/844ba114-d0fe-45ef-a7e6-e9ab2529c23a (::1) 6.680000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f65d81ce-406a-439a-855d-34a65538bb4c 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f65d81ce-406a-439a-855d-34a65538bb4c 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/f65d81ce-406a-439a-855d-34a65538bb4c (::1) 1.390000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 844ba114-d0fe-45ef-a7e6-e9ab2529c23a 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 844ba114-d0fe-45ef-a7e6-e9ab2529c23a 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/844ba114-d0fe-45ef-a7e6-e9ab2529c23a (::1) 0.900000ms 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 295s import functools 295s File "/usr/lib/python3.13/functools.py", line 18, in 295s from collections import namedtuple 295s File "/usr/lib/python3.13/collections/__init__.py", line 989, in 295s class ChainMap(_collections_abc.MutableMapping): 295s ...<124 lines>... 295s return self.__class__(m) 295s File "/usr/lib/python3.13/abc.py", line 106, in __new__ 295s cls = super().__new__(mcls, name, bases, namespace, **kwargs) 295s KeyboardInterrupt 295s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 295s 295s self = 295s 295s def test_main_kernel_handler(self): 295s # POST request 295s r = self.kern_api.start() 295s kern1 = r.json() 295s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 295s self.assertEqual(r.status_code, 201) 295s self.assertIsInstance(kern1, dict) 295s 295s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 295s expected_csp = '; '.join([ 295s "frame-ancestors 'self'", 295s 'report-uri ' + report_uri, 295s "default-src 'none'" 295s ]) 295s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 295s 295s # GET request 295s r = self.kern_api.list() 295s self.assertEqual(r.status_code, 200) 295s assert isinstance(r.json(), list) 295s self.assertEqual(r.json()[0]['id'], kern1['id']) 295s self.assertEqual(r.json()[0]['name'], kern1['name']) 295s 295s # create another kernel and check that they both are added to the 295s # list of kernels from a GET request 295s kern2 = self.kern_api.start().json() 295s assert isinstance(kern2, dict) 295s r = self.kern_api.list() 295s kernels = r.json() 295s self.assertEqual(r.status_code, 200) 295s assert isinstance(kernels, list) 295s self.assertEqual(len(kernels), 2) 295s 295s # Interrupt a kernel 295s r = self.kern_api.interrupt(kern2['id']) 295s self.assertEqual(r.status_code, 204) 295s 295s # Restart a kernel 295s > r = self.kern_api.restart(kern2['id']) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 295s return self._req('POST', url_path_join(id, 'restart')) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/d8723f2d-7016-483c-8f1a-f6594fd0a836/restart 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 295s from glob import _Globber, _no_recurse_symlinks 295s File "/usr/lib/python3.13/glob.py", line 3, in 295s import contextlib 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1152, in get_code 295s File "", line 781, in _compile_bytecode 295s KeyboardInterrupt 295s Exception ignored in: .cb at 0x7efdd680cf40> 295s Traceback (most recent call last): 295s File "", line 445, in cb 295s KeyboardInterrupt: 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpenhkv6gx/runtime/kernel-698a32cf-98e6-4f04-b03b-232e2fa9502c.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57545 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37197 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 698a32cf-98e6-4f04-b03b-232e2fa9502c, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.320000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.730000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpenhkv6gx/runtime/kernel-d8723f2d-7016-483c-8f1a-f6594fd0a836.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50689 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43565 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: d8723f2d-7016-483c-8f1a-f6594fd0a836, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.010000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.800000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: d8723f2d-7016-483c-8f1a-f6594fd0a836 295s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/d8723f2d-7016-483c-8f1a-f6594fd0a836/interrupt (::1) 4.190000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 295s yield maybe_future(km.restart_kernel(kernel_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 295s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 295s await ensure_async(kernel.restart_kernel(now=now)) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 295s await self._async_shutdown_kernel(now=now, restart=True) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/d8723f2d-7016-483c-8f1a-f6594fd0a836/restart (::1) 6.040000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 3.540000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 698a32cf-98e6-4f04-b03b-232e2fa9502c 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 698a32cf-98e6-4f04-b03b-232e2fa9502c 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/698a32cf-98e6-4f04-b03b-232e2fa9502c (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/698a32cf-98e6-4f04-b03b-232e2fa9502c', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 295s yielded = ctx_run(next, result) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 295s yield maybe_future(km.shutdown_kernel(kernel_id)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/698a32cf-98e6-4f04-b03b-232e2fa9502c (::1) 8.110000ms referer=None 295s ________________________ KernelAPITest.test_no_kernels _________________________ 295s 295s self = 295s 295s def test_no_kernels(self): 295s """Make sure there are no kernels running at the start""" 295s kernels = self.kern_api.list().json() 295s > self.assertEqual(kernels, []) 295s E AssertionError: Lists differ: [{'id': '698a32cf-98e6-4f04-b03b-232e2fa95[281 chars]: 0}] != [] 295s E 295s E First list contains 2 additional elements. 295s E First extra element 0: 295s E {'id': '698a32cf-98e6-4f04-b03b-232e2fa9502c', 'name': 'python3', 'last_activity': '2026-02-06T02:21:32.243750Z', 'execution_state': 'starting', 'connections': 0} 295s E 295s E + [] 295s E - [{'connections': 0, 295s E - 'execution_state': 'starting', 295s E - 'id': '698a32cf-98e6-4f04-b03b-232e2fa9502c', 295s E - 'last_activity': '2026-02-06T02:21:32.243750Z', 295s E - 'name': 'python3'}, 295s E - {'connections': 0, 295s E - 'execution_state': 'starting', 295s E - 'id': 'd8723f2d-7016-483c-8f1a-f6594fd0a836', 295s E - 'last_activity': '2026-02-06T02:21:32.264358Z', 295s E - 'name': 'python3'}] 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 2.150000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.490000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 698a32cf-98e6-4f04-b03b-232e2fa9502c 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 698a32cf-98e6-4f04-b03b-232e2fa9502c 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/698a32cf-98e6-4f04-b03b-232e2fa9502c (::1) 1.750000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d8723f2d-7016-483c-8f1a-f6594fd0a836 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d8723f2d-7016-483c-8f1a-f6594fd0a836 295s ---------------------------- Captured log teardown ----------------------------- 295s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 295s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 295s _____________________ AsyncKernelAPITest.test_connections ______________________ 295s 295s self = 295s 295s def tearDown(self): 295s for k in self.kern_api.list().json(): 295s > self.kern_api.shutdown(k['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ------------------------------ Captured log setup ------------------------------ 295s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpnbkrp1h7/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpnbkrp1h7/etc/jupyter'] for config files 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpnbkrp1h7/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpnbkrp1h7/config 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpnbkrp1h7/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpnbkrp1h7/config 295s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpnbkrp1h7/notebooks 295s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 295s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 295s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 295s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 295s WARNING NotebookApp:handlers.py:612 Forbidden 295s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.420000ms referer=None 295s ----------------------------- Captured stderr call ----------------------------- 295s /usr/lib/python3/dist-packages/IPython/paths.py:69: UserWarning: IPython parent '/tmp/tmpenhkv6gx/home' is not a writable location, using a temp directory. 295s warn("IPython parent '{0}' is not a writable location," 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnbkrp1h7/runtime/kernel-055376e1-bb31-48d3-8c7a-5742971d105b.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36083 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34843 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 055376e1-bb31-48d3-8c7a-5742971d105b, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 22.570000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b (::1) 0.550000ms 295s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b/channels 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 295s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41775 295s DEBUG NotebookApp:kernelmanager.py:423 activity on 055376e1-bb31-48d3-8c7a-5742971d105b: status (starting) 295s DEBUG NotebookApp:kernelmanager.py:423 activity on 055376e1-bb31-48d3-8c7a-5742971d105b: status (busy) 295s DEBUG NotebookApp:kernelmanager.py:423 activity on 055376e1-bb31-48d3-8c7a-5742971d105b: status (idle) 295s 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/'}]} 295s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel 055376e1-bb31-48d3-8c7a-5742971d105b) to 5.4 (client). 295s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b/channels (::1) 540.420000ms 295s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b/channels 295s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34843 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41775 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36083 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41877 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41775 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36083 295s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 295s Setting websocket_ping_timeout=30000 295s DEBUG NotebookApp:handlers.py:255 Nudge: attempt 1 on kernel 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b (::1) 2.130000ms 295s DEBUG NotebookApp:kernelmanager.py:423 activity on 055376e1-bb31-48d3-8c7a-5742971d105b: status (busy) 295s DEBUG NotebookApp:handlers.py:207 Nudge: IOPub received: 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:handlers.py:210 Nudge: resolving iopub future: 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:kernelmanager.py:423 activity on 055376e1-bb31-48d3-8c7a-5742971d105b: status (busy) 295s DEBUG NotebookApp:handlers.py:201 Nudge: control info reply received: 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:handlers.py:203 Nudge: resolving control future: 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:handlers.py:195 Nudge: shell info reply received: 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:kernelmanager.py:423 activity on 055376e1-bb31-48d3-8c7a-5742971d105b: status (idle) 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:423 activity on 055376e1-bb31-48d3-8c7a-5742971d105b: status (idle) 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b (::1) 1.170000ms 295s DEBUG NotebookApp:handlers.py:579 Websocket closed 055376e1-bb31-48d3-8c7a-5742971d105b:a4ec08b7-e8f90c0427dbcb414deb2e11 295s INFO NotebookApp:kernelmanager.py:222 Starting buffering for 055376e1-bb31-48d3-8c7a-5742971d105b:a4ec08b7-e8f90c0427dbcb414deb2e11 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 055376e1-bb31-48d3-8c7a-5742971d105b:iopub 295s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 055376e1-bb31-48d3-8c7a-5742971d105b:iopub 295s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 055376e1-bb31-48d3-8c7a-5742971d105b:iopub 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b (::1) 0.650000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b (::1) 0.480000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.820000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 055376e1-bb31-48d3-8c7a-5742971d105b 295s INFO NotebookApp:kernelmanager.py:286 Discarding 3 buffered messages for 055376e1-bb31-48d3-8c7a-5742971d105b:a4ec08b7-e8f90c0427dbcb414deb2e11 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 055376e1-bb31-48d3-8c7a-5742971d105b 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 295s yield maybe_future(km.shutdown_kernel(kernel_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b (::1) 10.450000ms referer=None 295s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 295s 295s self = 295s 295s def tearDown(self): 295s for k in self.kern_api.list().json(): 295s > self.kern_api.shutdown(k['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/9a3aa6d0-89d5-4254-9080-d638e41e51a6 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnbkrp1h7/runtime/kernel-9a3aa6d0-89d5-4254-9080-d638e41e51a6.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52131 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47133 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9a3aa6d0-89d5-4254-9080-d638e41e51a6, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 18.750000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.640000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 055376e1-bb31-48d3-8c7a-5742971d105b 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 055376e1-bb31-48d3-8c7a-5742971d105b 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/055376e1-bb31-48d3-8c7a-5742971d105b (::1) 0.670000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9a3aa6d0-89d5-4254-9080-d638e41e51a6 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9a3aa6d0-89d5-4254-9080-d638e41e51a6 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/9a3aa6d0-89d5-4254-9080-d638e41e51a6 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/9a3aa6d0-89d5-4254-9080-d638e41e51a6', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 295s yield maybe_future(km.shutdown_kernel(kernel_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/9a3aa6d0-89d5-4254-9080-d638e41e51a6 (::1) 13.150000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 295s from subprocess import PIPE, Popen 295s File "/usr/lib/python3.13/subprocess.py", line 49, in 295s import signal 295s File "/usr/lib/python3.13/signal.py", line 19, in 295s _IntEnum._convert_( 295s ~~~~~~~~~~~~~~~~~~^ 295s 'Sigmasks', __name__, 295s ^^^^^^^^^^^^^^^^^^^^^ 295s lambda name: name in ('SIG_BLOCK', 'SIG_UNBLOCK', 'SIG_SETMASK')) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/enum.py", line 928, in _convert_ 295s cls = _simple_enum(etype=cls, boundary=boundary or KEEP)(tmp_cls) 295s File "/usr/lib/python3.13/enum.py", line 1805, in convert_class 295s enum_class = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) 295s File "/usr/lib/python3.13/enum.py", line 498, in __new__ 295s def __new__(metacls, cls, bases, classdict, *, boundary=None, _simple=False, **kwds): 295s 295s KeyboardInterrupt 295s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 295s 295s self = 295s 295s def test_kernel_handler(self): 295s # GET kernel with given id 295s kid = self.kern_api.start().json()['id'] 295s r = self.kern_api.get(kid) 295s kern1 = r.json() 295s self.assertEqual(r.status_code, 200) 295s assert isinstance(kern1, dict) 295s self.assertIn('id', kern1) 295s self.assertEqual(kern1['id'], kid) 295s 295s # Request a bad kernel id and check that a JSON 295s # message is returned! 295s bad_id = '111-111-111-111-111' 295s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 295s self.kern_api.get(bad_id) 295s 295s # DELETE kernel with id 295s > r = self.kern_api.shutdown(kid) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/7648fa0e-d049-4349-a8fd-41abc661b6d3 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnbkrp1h7/runtime/kernel-7648fa0e-d049-4349-a8fd-41abc661b6d3.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42725 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39151 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 7648fa0e-d049-4349-a8fd-41abc661b6d3, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 19.780000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/7648fa0e-d049-4349-a8fd-41abc661b6d3 (::1) 0.560000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1): Kernel does not exist: 111-111-111-111-111 295s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 295s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1) 0.640000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7648fa0e-d049-4349-a8fd-41abc661b6d3 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7648fa0e-d049-4349-a8fd-41abc661b6d3 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/7648fa0e-d049-4349-a8fd-41abc661b6d3 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/7648fa0e-d049-4349-a8fd-41abc661b6d3', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 295s yield maybe_future(km.shutdown_kernel(kernel_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/7648fa0e-d049-4349-a8fd-41abc661b6d3 (::1) 6.480000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.550000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9a3aa6d0-89d5-4254-9080-d638e41e51a6 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9a3aa6d0-89d5-4254-9080-d638e41e51a6 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/9a3aa6d0-89d5-4254-9080-d638e41e51a6 (::1) 0.610000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7648fa0e-d049-4349-a8fd-41abc661b6d3 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7648fa0e-d049-4349-a8fd-41abc661b6d3 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/7648fa0e-d049-4349-a8fd-41abc661b6d3 (::1) 0.600000ms 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 295s from subprocess import PIPE, Popen 295s File "/usr/lib/python3.13/subprocess.py", line 46, in 295s import locale 295s File "/usr/lib/python3.13/locale.py", line 180, in 295s _percent_re = re.compile(r'%(?:\((?P.*?)\))?' 295s r'(?P[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]') 295s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 295s return _compile(pattern, flags) 295s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 295s p = _compiler.compile(pattern, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 295s code = _code(p, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 295s _compile(code, p.data, flags) 295s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 117, in _compile 295s _compile(code, av[2], flags) 295s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 126, in _compile 295s _compile(code, p, _combine_flags(flags, add_flags, del_flags)) 295s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 109, in _compile 295s _compile(code, av[2], flags) 295s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 102, in _compile 295s emit(ANY) 295s ~~~~^^^^^ 295s KeyboardInterrupt 295s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 295s 295s self = 295s 295s def test_main_kernel_handler(self): 295s # POST request 295s r = self.kern_api.start() 295s kern1 = r.json() 295s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 295s self.assertEqual(r.status_code, 201) 295s self.assertIsInstance(kern1, dict) 295s 295s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 295s expected_csp = '; '.join([ 295s "frame-ancestors 'self'", 295s 'report-uri ' + report_uri, 295s "default-src 'none'" 295s ]) 295s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 295s 295s # GET request 295s r = self.kern_api.list() 295s self.assertEqual(r.status_code, 200) 295s assert isinstance(r.json(), list) 295s self.assertEqual(r.json()[0]['id'], kern1['id']) 295s self.assertEqual(r.json()[0]['name'], kern1['name']) 295s 295s # create another kernel and check that they both are added to the 295s # list of kernels from a GET request 295s kern2 = self.kern_api.start().json() 295s assert isinstance(kern2, dict) 295s r = self.kern_api.list() 295s kernels = r.json() 295s self.assertEqual(r.status_code, 200) 295s assert isinstance(kernels, list) 295s self.assertEqual(len(kernels), 2) 295s 295s # Interrupt a kernel 295s r = self.kern_api.interrupt(kern2['id']) 295s self.assertEqual(r.status_code, 204) 295s 295s # Restart a kernel 295s > r = self.kern_api.restart(kern2['id']) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 295s return self._req('POST', url_path_join(id, 'restart')) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6/restart 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 295s from glob import _Globber, _no_recurse_symlinks 295s File "/usr/lib/python3.13/glob.py", line 5, in 295s import re 295s File "/usr/lib/python3.13/re/__init__.py", line 125, in 295s import enum 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1152, in get_code 295s File "", line 781, in _compile_bytecode 295s KeyboardInterrupt 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnbkrp1h7/runtime/kernel-9fc9fd81-a804-4b4c-9a65-928c50fc9ae9.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37581 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55289 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9fc9fd81-a804-4b4c-9a65-928c50fc9ae9, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.600000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.600000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpnbkrp1h7/runtime/kernel-68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53765 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39893 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.900000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 5.390000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6 295s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6/interrupt (::1) 0.710000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 295s yield maybe_future(km.restart_kernel(kernel_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 295s result = coro.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 295s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 295s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 295s yield self # This tells Task to wait for completion. 295s ^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 295s await ensure_async(kernel.restart_kernel(now=now)) 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 295s await self._async_shutdown_kernel(now=now, restart=True) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6/restart (::1) 7.550000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.680000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/9fc9fd81-a804-4b4c-9a65-928c50fc9ae9', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 295s yield maybe_future(km.shutdown_kernel(kernel_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 (::1) 6.600000ms referer=None 295s ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 295s 295s self = 295s 295s def test_no_kernels(self): 295s """Make sure there are no kernels running at the start""" 295s kernels = self.kern_api.list().json() 295s > self.assertEqual(kernels, []) 295s E AssertionError: Lists differ: [{'id': '9fc9fd81-a804-4b4c-9a65-928c50fc9[281 chars]: 0}] != [] 295s E 295s E First list contains 2 additional elements. 295s E First extra element 0: 295s E {'id': '9fc9fd81-a804-4b4c-9a65-928c50fc9ae9', 'name': 'python3', 'last_activity': '2026-02-06T02:21:33.336724Z', 'execution_state': 'starting', 'connections': 0} 295s E 295s E + [] 295s E - [{'connections': 0, 295s E - 'execution_state': 'starting', 295s E - 'id': '9fc9fd81-a804-4b4c-9a65-928c50fc9ae9', 295s E - 'last_activity': '2026-02-06T02:21:33.336724Z', 295s E - 'name': 'python3'}, 295s E - {'connections': 0, 295s E - 'execution_state': 'starting', 295s E - 'id': '68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6', 295s E - 'last_activity': '2026-02-06T02:21:33.361799Z', 295s E - 'name': 'python3'}] 295s 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.650000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.510000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 (::1) 0.620000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/68685c1e-6d01-4eaa-93e0-82ebe1d3a0d6 (::1) 0.640000ms 295s ---------------------------- Captured log teardown ----------------------------- 295s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9a3aa6d0-89d5-4254-9080-d638e41e51a6 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7648fa0e-d049-4349-a8fd-41abc661b6d3 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 055376e1-bb31-48d3-8c7a-5742971d105b 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9fc9fd81-a804-4b4c-9a65-928c50fc9ae9 295s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 295s __________________________ SessionAPITest.test_create __________________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/b9d0a2a1-99b5-46c9-b064-3a07d293af68 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ------------------------------ Captured log setup ------------------------------ 295s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpb38_fskz/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpb38_fskz/etc/jupyter'] for config files 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpb38_fskz/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpb38_fskz/config 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpb38_fskz/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpb38_fskz/config 295s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpb38_fskz/notebooks 295s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 295s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 295s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 295s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 295s WARNING NotebookApp:handlers.py:612 Forbidden 295s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.470000ms referer=None 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.820000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-a9431b9c-8425-4d66-ad14-90863db65e6c.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41141 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39113 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: a9431b9c-8425-4d66-ad14-90863db65e6c, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 23.340000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.650000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/b9d0a2a1-99b5-46c9-b064-3a07d293af68 (::1) 0.600000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.570000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a9431b9c-8425-4d66-ad14-90863db65e6c 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a9431b9c-8425-4d66-ad14-90863db65e6c 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/b9d0a2a1-99b5-46c9-b064-3a07d293af68 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b9d0a2a1-99b5-46c9-b064-3a07d293af68', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/b9d0a2a1-99b5-46c9-b064-3a07d293af68 (::1) 8.000000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 295s from subprocess import PIPE, Popen 295s File "/usr/lib/python3.13/subprocess.py", line 46, in 295s import locale 295s File "/usr/lib/python3.13/locale.py", line 180, in 295s _percent_re = re.compile(r'%(?:\((?P.*?)\))?' 295s r'(?P[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]') 295s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 295s return _compile(pattern, flags) 295s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 295s p = _compiler.compile(pattern, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 748, in compile 295s p = _parser.parse(p, flags) 295s File "/usr/lib/python3.13/re/_parser.py", line 980, in parse 295s p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) 295s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 295s itemsappend(_parse(source, state, verbose, nested + 1, 295s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s not nested and not items)) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_parser.py", line 685, in _parse 295s if not item or item[0][0] is AT: 295s ^^^^ 295s File "/usr/lib/python3.13/re/_parser.py", line 163, in __len__ 295s def __len__(self): 295s 295s KeyboardInterrupt 295s __________________ SessionAPITest.test_create_console_session __________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/51652510-3f86-4005-97ad-0218a0b45e01 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-2d77c34d-0c1e-4e8e-8e4a-5b28cdb44385.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38579 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38735 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2d77c34d-0c1e-4e8e-8e4a-5b28cdb44385, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 19.530000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.700000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a9431b9c-8425-4d66-ad14-90863db65e6c 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a9431b9c-8425-4d66-ad14-90863db65e6c 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b9d0a2a1-99b5-46c9-b064-3a07d293af68 (::1) 1.640000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2d77c34d-0c1e-4e8e-8e4a-5b28cdb44385 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d77c34d-0c1e-4e8e-8e4a-5b28cdb44385 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/51652510-3f86-4005-97ad-0218a0b45e01 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/51652510-3f86-4005-97ad-0218a0b45e01', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/51652510-3f86-4005-97ad-0218a0b45e01 (::1) 13.100000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 295s from subprocess import PIPE, Popen 295s File "/usr/lib/python3.13/subprocess.py", line 46, in 295s import locale 295s File "/usr/lib/python3.13/locale.py", line 47, in 295s from _locale import * 295s File "", line 1349, in _find_and_load 295s KeyboardInterrupt 295s ____________________ SessionAPITest.test_create_deprecated _____________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/f6649c29-992c-47a5-af48-fa32ad9a5759 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-106a521e-169b-4712-96ef-aee580a5658f.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48117 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53013 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 106a521e-169b-4712-96ef-aee580a5658f, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 17.840000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.330000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2d77c34d-0c1e-4e8e-8e4a-5b28cdb44385 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d77c34d-0c1e-4e8e-8e4a-5b28cdb44385 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/51652510-3f86-4005-97ad-0218a0b45e01 (::1) 2.240000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 106a521e-169b-4712-96ef-aee580a5658f 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 106a521e-169b-4712-96ef-aee580a5658f 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/f6649c29-992c-47a5-af48-fa32ad9a5759 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/f6649c29-992c-47a5-af48-fa32ad9a5759', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 295s import json 295s File "/usr/lib/python3.13/json/__init__.py", line 107, in 295s from .encoder import JSONEncoder 295s File "/usr/lib/python3.13/json/encoder.py", line 20, in 295s HAS_UTF8 = re.compile(b'[\x80-\xff]') 295s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 295s return _compile(pattern, flags) 295s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 295s p = _compiler.compile(pattern, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 295s code = _code(p, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 295s _compile(code, p.data, flags) 295s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 37, in _compile 295s def _compile(code, pattern, flags): 295s 295s KeyboardInterrupt 295s ___________________ SessionAPITest.test_create_file_session ____________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/9f3a4358-779c-4ade-9093-2f53287a6180 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-03245deb-1845-4695-9432-d40ba8110583.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38737 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57829 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 03245deb-1845-4695-9432-d40ba8110583, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 17.320000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.940000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 106a521e-169b-4712-96ef-aee580a5658f 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 106a521e-169b-4712-96ef-aee580a5658f 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/f6649c29-992c-47a5-af48-fa32ad9a5759 (::1) 4.610000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 03245deb-1845-4695-9432-d40ba8110583 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 03245deb-1845-4695-9432-d40ba8110583 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/9f3a4358-779c-4ade-9093-2f53287a6180 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/9f3a4358-779c-4ade-9093-2f53287a6180', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 295s import json 295s File "/usr/lib/python3.13/json/__init__.py", line 106, in 295s from .decoder import JSONDecoder, JSONDecodeError 295s File "/usr/lib/python3.13/json/decoder.py", line 53, in 295s HEXDIGITS = re.compile(r'[0-9A-Fa-f]{4}', FLAGS) 295s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 295s return _compile(pattern, flags) 295s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 295s p = _compiler.compile(pattern, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 295s code = _code(p, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 582, in _code 295s _compile_info(code, p, flags) 295s ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_compiler.py", line 540, in _compile_info 295s emit(INFO) 295s ~~~~^^^^^^ 295s KeyboardInterrupt 295s __________________ SessionAPITest.test_create_with_kernel_id ___________________ 295s 295s self = 295s 295s def test_create_with_kernel_id(self): 295s # create a new kernel 295s r = self.request('POST', 'api/kernels') 295s r.raise_for_status() 295s kernel = r.json() 295s 295s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 295s self.assertEqual(resp.status_code, 201) 295s newsession = resp.json() 295s self.assertIn('id', newsession) 295s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 295s self.assertEqual(newsession['kernel']['id'], kernel['id']) 295s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 295s 295s sessions = self.sess_api.list().json() 295s > self.assertEqual(sessions, [newsession]) 295s E AssertionError: Lists differ: [{'id': '9f3a4358-779c-4ade-9093-2f53287a6180', 'p[553 chars]ne}}] != [{'id': 'c6f6ecc1-00d2-4142-9552-7dadb3820fa3', 'p[279 chars]ne}}] 295s E 295s E First differing element 0: 295s E {'id': '9f3a4358-779c-4ade-9093-2f53287a6180', 'p[218 chars]: 0}} 295s E {'id': 'c6f6ecc1-00d2-4142-9552-7dadb3820fa3', 'p[278 chars]one}} 295s E 295s E First list contains 1 additional elements. 295s E First extra element 1: 295s E {'id': 'c6f6ecc1-00d2-4142-9552-7dadb3820fa3', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '2b7cf963-6b1b-4dbf-ab19-910c01550125', 'name': 'python3', 'last_activity': '2026-02-06T02:21:44.180916Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 295s E 295s E Diff is 830 characters long. Set self.maxDiff to None to see it. 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-2b7cf963-6b1b-4dbf-ab19-910c01550125.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47259 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35993 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2b7cf963-6b1b-4dbf-ab19-910c01550125, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.180000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.810000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 2.980000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.620000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 03245deb-1845-4695-9432-d40ba8110583 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 03245deb-1845-4695-9432-d40ba8110583 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/9f3a4358-779c-4ade-9093-2f53287a6180 (::1) 1.120000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2b7cf963-6b1b-4dbf-ab19-910c01550125 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2b7cf963-6b1b-4dbf-ab19-910c01550125 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/c6f6ecc1-00d2-4142-9552-7dadb3820fa3 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/c6f6ecc1-00d2-4142-9552-7dadb3820fa3', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s _____________________ SessionAPITest.test_modify_kernel_id _____________________ 295s 295s self = 295s 295s def test_modify_kernel_id(self): 295s before = self.sess_api.create('foo/nb1.ipynb').json() 295s sid = before['id'] 295s 295s # create a new kernel 295s r = self.request('POST', 'api/kernels') 295s r.raise_for_status() 295s kernel = r.json() 295s 295s # Attach our session to the existing kernel 295s > after = self.sess_api.modify_kernel_id(sid, kernel['id']).json() 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:250: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:82: in modify_kernel_id 295s return self._req('PATCH', id, body) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 295s import jupyter_client 295s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 295s from .asynchronous import AsyncKernelClient 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 295s from .client import AsyncKernelClient # noqa 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 295s import zmq.asyncio 295s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 52, in 295s from zmq import backend 295s File "/usr/lib/python3/dist-packages/zmq/backend/__init__.py", line 25, in 295s _ns = select_backend(first) 295s File "/usr/lib/python3/dist-packages/zmq/backend/select.py", line 31, in select_backend 295s mod = import_module(name) 295s File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module 295s return _bootstrap._gcd_import(name[level:], package, level) 295s ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/zmq/backend/cython/__init__.py", line 6, in 295s from . import _zmq 295s File "_zmq.py", line 156, in init zmq.backend.cython._zmq 295s File "/usr/lib/python3/dist-packages/zmq/constants.py", line 134, in 295s class SocketOption(IntEnum): 295s ...<138 lines>... 295s NORM_PUSH = 124 295s File "/usr/lib/python3/dist-packages/zmq/constants.py", line 217, in SocketOption 295s MULTICAST_MAXTPDU = 84 295s ^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/enum.py", line 354, in __setitem__ 295s def __setitem__(self, key, value): 295s 295s KeyboardInterrupt 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-2e522dc5-f3ea-4654-bba1-54688cd1ffe4.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33563 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42881 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2e522dc5-f3ea-4654-bba1-54688cd1ffe4, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.430000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-e1fa8998-eab9-4ef9-92fd-ea1535426418.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49057 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46421 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: e1fa8998-eab9-4ef9-92fd-ea1535426418, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 18.180000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2e522dc5-f3ea-4654-bba1-54688cd1ffe4 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2e522dc5-f3ea-4654-bba1-54688cd1ffe4 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception PATCH /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='PATCH', uri='/a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 154, in patch 295s km.shutdown_kernel(before['kernel']['id']) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 PATCH /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 19.570000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.660000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e1fa8998-eab9-4ef9-92fd-ea1535426418 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e1fa8998-eab9-4ef9-92fd-ea1535426418 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ____________________ SessionAPITest.test_modify_kernel_name ____________________ 295s 295s self = 295s 295s def test_modify_kernel_name(self): 295s before = self.sess_api.create('foo/nb1.ipynb').json() 295s sid = before['id'] 295s 295s after = self.sess_api.modify_kernel_name(sid, before['kernel']['name']).json() 295s self.assertEqual(after['id'], sid) 295s self.assertEqual(after['path'], before['path']) 295s self.assertEqual(after['type'], before['type']) 295s self.assertNotEqual(after['kernel']['id'], before['kernel']['id']) 295s 295s # check kernel list, to be sure previous kernel was cleaned up 295s r = self.request('GET', 'api/kernels') 295s r.raise_for_status() 295s kernel_list = r.json() 295s after['kernel'].pop('last_activity') 295s [ k.pop('last_activity') for k in kernel_list ] 295s > self.assertEqual(kernel_list, [after['kernel']]) 295s E AssertionError: Lists differ: [{'id': '2e522dc5-f3ea-4654-bba1-54688cd1ffe4', 'n[177 chars]: 0}] != [{'id': '7910a507-ff24-4865-a2f2-39791781e05c', 'n[61 chars]: 0}] 295s E 295s E First differing element 0: 295s E {'id': '2e522dc5-f3ea-4654-bba1-54688cd1ffe4', 'n[60 chars]': 0} 295s E {'id': '7910a507-ff24-4865-a2f2-39791781e05c', 'n[60 chars]': 0} 295s E 295s E First list contains 1 additional elements. 295s E First extra element 1: 295s E {'id': '7910a507-ff24-4865-a2f2-39791781e05c', 'name': 'python3', 'execution_state': 'starting', 'connections': 0} 295s E 295s E [{'connections': 0, 295s E - 'execution_state': 'starting', 295s E - 'id': '2e522dc5-f3ea-4654-bba1-54688cd1ffe4', 295s E - 'name': 'python3'}, 295s E - {'connections': 0, 295s E 'execution_state': 'starting', 295s E 'id': '7910a507-ff24-4865-a2f2-39791781e05c', 295s E 'name': 'python3'}] 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:238: AssertionError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.820000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-7910a507-ff24-4865-a2f2-39791781e05c.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55545 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52905 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 7910a507-ff24-4865-a2f2-39791781e05c, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e1fa8998-eab9-4ef9-92fd-ea1535426418 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e1fa8998-eab9-4ef9-92fd-ea1535426418 295s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 19.190000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.580000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.630000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7910a507-ff24-4865-a2f2-39791781e05c 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7910a507-ff24-4865-a2f2-39791781e05c 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/01db70ac-6423-4e3e-ba87-ca738dad27e8 (::1) 7.560000ms referer=None 295s __________________ SessionAPITest.test_modify_path_deprecated __________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/91f82b9e-6e9a-4ccb-bb01-aa09bac7e6ab 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-9f8205e6-dfca-4744-975d-1a1b2a266e4b.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45047 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33689 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9f8205e6-dfca-4744-975d-1a1b2a266e4b, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.400000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s WARNING NotebookApp:handlers.py:124 Sessions API changed, see updated swagger docs 295s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/91f82b9e-6e9a-4ccb-bb01-aa09bac7e6ab (::1) 2.010000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.590000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9f8205e6-dfca-4744-975d-1a1b2a266e4b 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9f8205e6-dfca-4744-975d-1a1b2a266e4b 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/91f82b9e-6e9a-4ccb-bb01-aa09bac7e6ab (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/91f82b9e-6e9a-4ccb-bb01-aa09bac7e6ab', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s --------------------------- Captured stderr teardown --------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 295s from glob import _Globber, _no_recurse_symlinks 295s File "/usr/lib/python3.13/glob.py", line 5, in 295s import re 295s File "/usr/lib/python3.13/re/__init__.py", line 126, in 295s from . import _compiler, _parser 295s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 295s from . import _parser 295s File "/usr/lib/python3.13/re/_parser.py", line 15, in 295s from ._constants import * 295s File "/usr/lib/python3.13/re/_constants.py", line 130, in 295s ATCODES = _makecodes( 295s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 295s ...<5 lines>... 295s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 295s ) 295s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 295s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 295s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 295s KeyboardInterrupt 295s _______________________ SessionAPITest.test_modify_type ________________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/fa98bbb0-e6a6-44ea-a824-ab9d743aa854 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 295s import json 295s File "/usr/lib/python3.13/json/__init__.py", line 107, in 295s from .encoder import JSONEncoder 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1152, in get_code 295s File "", line 781, in _compile_bytecode 295s KeyboardInterrupt 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpb38_fskz/runtime/kernel-a69d5b75-9346-48d9-8d66-97ad755c8598.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37521 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33063 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: a69d5b75-9346-48d9-8d66-97ad755c8598, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpb38_fskz/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 16.390000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/fa98bbb0-e6a6-44ea-a824-ab9d743aa854 (::1) 1.600000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.640000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9f8205e6-dfca-4744-975d-1a1b2a266e4b 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9f8205e6-dfca-4744-975d-1a1b2a266e4b 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/91f82b9e-6e9a-4ccb-bb01-aa09bac7e6ab (::1) 1.290000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a69d5b75-9346-48d9-8d66-97ad755c8598 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a69d5b75-9346-48d9-8d66-97ad755c8598 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/fa98bbb0-e6a6-44ea-a824-ab9d743aa854 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/fa98bbb0-e6a6-44ea-a824-ab9d743aa854', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 295s yielded = self.gen.send(value) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 295s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 295s stopper = ensure_async(km.shutdown_kernel(now, restart)) 295s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 295s return _runner_map[name].run(inner) 295s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 295s return fut.result(None) 295s ~~~~~~~~~~^^^^^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 295s return self.__get_result() 295s ~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 295s raise self._exception 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 295s gc.collect() 295s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 295s NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/fa98bbb0-e6a6-44ea-a824-ab9d743aa854 (::1) 8.910000ms referer=None 295s ---------------------------- Captured log teardown ----------------------------- 295s INFO NotebookApp:notebookapp.py:2164 Shutting down 2 kernels 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a69d5b75-9346-48d9-8d66-97ad755c8598 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2e522dc5-f3ea-4654-bba1-54688cd1ffe4 295s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 295s _______________________ AsyncSessionAPITest.test_create ________________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/e15878f6-6f82-466f-ac5b-a876eda3ff38 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ------------------------------ Captured log setup ------------------------------ 295s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpq85gh68i/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpq85gh68i/etc/jupyter'] for config files 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpq85gh68i/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpq85gh68i/config 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpq85gh68i/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 295s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpq85gh68i/config 295s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpq85gh68i/notebooks 295s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 295s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 295s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 295s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 295s WARNING NotebookApp:handlers.py:612 Forbidden 295s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.510000ms referer=None 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.850000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-f8d9d0bd-8a02-4bdf-a7b2-eeff51559c78.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35331 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36175 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: f8d9d0bd-8a02-4bdf-a7b2-eeff51559c78, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.560000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.690000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/e15878f6-6f82-466f-ac5b-a876eda3ff38 (::1) 0.710000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.580000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f8d9d0bd-8a02-4bdf-a7b2-eeff51559c78 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f8d9d0bd-8a02-4bdf-a7b2-eeff51559c78 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/e15878f6-6f82-466f-ac5b-a876eda3ff38 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/e15878f6-6f82-466f-ac5b-a876eda3ff38', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 403, in 295s class PathBase(PurePathBase): 295s ...<526 lines>... 295s raise UnsupportedOperation(self._unsupported_msg('as_uri()')) 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 421, in PathBase 295s @classmethod 295s ^^^^^^^^^^^ 295s KeyboardInterrupt 295s _______________ AsyncSessionAPITest.test_create_console_session ________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/2e339fc5-f7ca-49dc-905e-a80e6e8b511b 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-ba2303cd-b257-43d8-8b84-b9b60cbcb3a7.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58281 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43659 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: ba2303cd-b257-43d8-8b84-b9b60cbcb3a7, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 18.950000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 2.050000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f8d9d0bd-8a02-4bdf-a7b2-eeff51559c78 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f8d9d0bd-8a02-4bdf-a7b2-eeff51559c78 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/e15878f6-6f82-466f-ac5b-a876eda3ff38 (::1) 0.890000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ba2303cd-b257-43d8-8b84-b9b60cbcb3a7 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ba2303cd-b257-43d8-8b84-b9b60cbcb3a7 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/2e339fc5-f7ca-49dc-905e-a80e6e8b511b (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/2e339fc5-f7ca-49dc-905e-a80e6e8b511b', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s --------------------------- Captured stderr teardown --------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 295s from ._local import * 295s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 295s class PureWindowsPath(PurePath): 295s ...<7 lines>... 295s __slots__ = () 295s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 295s import ntpath 295s File "/usr/lib/python3.13/ntpath.py", line 557, in 295s from nt import _findfirstfile, _getfinalpathname, readlink as _nt_readlink 295s File "", line 1360, in _find_and_load 295s File "", line 1322, in _find_and_load_unlocked 295s File "", line 1262, in _find_spec 295s File "", line 1556, in find_spec 295s File "", line 1530, in _get_spec 295s File "", line 1660, in find_spec 295s File "", line 491, in _verbose_message 295s KeyboardInterrupt 295s __________________ AsyncSessionAPITest.test_create_deprecated __________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/16342b02-d0ef-49e0-a937-14d7bde9edcc 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-7709e600-5a0b-48c1-aae1-f8715ed853bf.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33845 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60275 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 7709e600-5a0b-48c1-aae1-f8715ed853bf, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 16.880000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.650000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ba2303cd-b257-43d8-8b84-b9b60cbcb3a7 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ba2303cd-b257-43d8-8b84-b9b60cbcb3a7 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/2e339fc5-f7ca-49dc-905e-a80e6e8b511b (::1) 1.980000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7709e600-5a0b-48c1-aae1-f8715ed853bf 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7709e600-5a0b-48c1-aae1-f8715ed853bf 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/16342b02-d0ef-49e0-a937-14d7bde9edcc (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/16342b02-d0ef-49e0-a937-14d7bde9edcc', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 295s from glob import _Globber, _no_recurse_symlinks 295s File "/usr/lib/python3.13/glob.py", line 5, in 295s import re 295s File "/usr/lib/python3.13/re/__init__.py", line 126, in 295s from . import _compiler, _parser 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 921, in _load_unlocked 295s File "", line 819, in module_from_spec 295s File "", line 743, in _init_module_attrs 295s KeyboardInterrupt 295s _________________ AsyncSessionAPITest.test_create_file_session _________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/e14df48c-6736-4131-9eeb-107e670fb304 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-a1dbba1c-2f18-4fe4-8f13-4f90357584bc.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56535 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50549 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: a1dbba1c-2f18-4fe4-8f13-4f90357584bc, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.450000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.680000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7709e600-5a0b-48c1-aae1-f8715ed853bf 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7709e600-5a0b-48c1-aae1-f8715ed853bf 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/16342b02-d0ef-49e0-a937-14d7bde9edcc (::1) 0.790000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a1dbba1c-2f18-4fe4-8f13-4f90357584bc 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a1dbba1c-2f18-4fe4-8f13-4f90357584bc 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/e14df48c-6736-4131-9eeb-107e670fb304 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/e14df48c-6736-4131-9eeb-107e670fb304', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/e14df48c-6736-4131-9eeb-107e670fb304 (::1) 7.240000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 295s from glob import _Globber, _no_recurse_symlinks 295s File "/usr/lib/python3.13/glob.py", line 5, in 295s import re 295s File "/usr/lib/python3.13/re/__init__.py", line 374, in 295s @functools.lru_cache(_MAXCACHE) 295s ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 295s File "/usr/lib/python3.13/functools.py", line 545, in decorating_function 295s wrapper = _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo) 295s KeyboardInterrupt 295s ________________ AsyncSessionAPITest.test_create_with_kernel_id ________________ 295s 295s self = 295s 295s def test_create_with_kernel_id(self): 295s # create a new kernel 295s r = self.request('POST', 'api/kernels') 295s r.raise_for_status() 295s kernel = r.json() 295s 295s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 295s self.assertEqual(resp.status_code, 201) 295s newsession = resp.json() 295s self.assertIn('id', newsession) 295s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 295s self.assertEqual(newsession['kernel']['id'], kernel['id']) 295s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 295s 295s sessions = self.sess_api.list().json() 295s > self.assertEqual(sessions, [newsession]) 295s E AssertionError: Lists differ: [{'id': 'e14df48c-6736-4131-9eeb-107e670fb304', 'p[553 chars]ne}}] != [{'id': '660b8839-56cd-4f69-aaaa-c0ab099e90b6', 'p[279 chars]ne}}] 295s E 295s E First differing element 0: 295s E {'id': 'e14df48c-6736-4131-9eeb-107e670fb304', 'p[218 chars]: 0}} 295s E {'id': '660b8839-56cd-4f69-aaaa-c0ab099e90b6', 'p[278 chars]one}} 295s E 295s E First list contains 1 additional elements. 295s E First extra element 1: 295s E {'id': '660b8839-56cd-4f69-aaaa-c0ab099e90b6', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': 'fd847240-b433-4562-b566-dbca87cc1b64', 'name': 'python3', 'last_activity': '2026-02-06T02:21:45.159637Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 295s E 295s E Diff is 830 characters long. Set self.maxDiff to None to see it. 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-fd847240-b433-4562-b566-dbca87cc1b64.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57777 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53807 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: fd847240-b433-4562-b566-dbca87cc1b64, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.190000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.700000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.590000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.600000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a1dbba1c-2f18-4fe4-8f13-4f90357584bc 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a1dbba1c-2f18-4fe4-8f13-4f90357584bc 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/e14df48c-6736-4131-9eeb-107e670fb304 (::1) 0.730000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fd847240-b433-4562-b566-dbca87cc1b64 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fd847240-b433-4562-b566-dbca87cc1b64 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/660b8839-56cd-4f69-aaaa-c0ab099e90b6 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/660b8839-56cd-4f69-aaaa-c0ab099e90b6', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s __________________ AsyncSessionAPITest.test_modify_kernel_id ___________________ 295s 295s self = 295s 295s def test_modify_kernel_id(self): 295s before = self.sess_api.create('foo/nb1.ipynb').json() 295s sid = before['id'] 295s 295s # create a new kernel 295s r = self.request('POST', 'api/kernels') 295s r.raise_for_status() 295s kernel = r.json() 295s 295s # Attach our session to the existing kernel 295s > after = self.sess_api.modify_kernel_id(sid, kernel['id']).json() 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:250: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:82: in modify_kernel_id 295s return self._req('PATCH', id, body) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 295s from ipykernel import kernelapp as app 295s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 295s from .connect import * # noqa: F403 295s ^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 295s import jupyter_client 295s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 295s from .asynchronous import AsyncKernelClient 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 295s from .client import AsyncKernelClient # noqa 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 295s import zmq.asyncio 295s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 52, in 295s from zmq import backend 295s File "/usr/lib/python3/dist-packages/zmq/backend/__init__.py", line 19, in 295s if platform.python_implementation() == 'PyPy': 295s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.13/platform.py", line 1242, in python_implementation 295s return _sys_version()[0] 295s ~~~~~~~~~~~~^^ 295s File "/usr/lib/python3.13/platform.py", line 1193, in _sys_version 295s cpython_sys_version_parser = re.compile( 295s r'([\w.+]+)\s*' # "version" 295s ...<3 lines>... 295s r'(?:,\s*([\w :]*))?)?\)\s*' # ", buildtime)" 295s r'\[([^\]]+)\]?', re.ASCII) # "[compiler]" 295s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 295s return _compile(pattern, flags) 295s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 295s p = _compiler.compile(pattern, flags) 295s File "/usr/lib/python3.13/re/_compiler.py", line 748, in compile 295s p = _parser.parse(p, flags) 295s File "/usr/lib/python3.13/re/_parser.py", line 980, in parse 295s p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) 295s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 295s itemsappend(_parse(source, state, verbose, nested + 1, 295s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s not nested and not items)) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_parser.py", line 863, in _parse 295s p = _parse_sub(source, state, sub_verbose, nested + 1) 295s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 295s itemsappend(_parse(source, state, verbose, nested + 1, 295s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s not nested and not items)) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3.13/re/_parser.py", line 547, in _parse 295s subpatternappend((LITERAL, _ord(this))) 295s ~~~~^^^^^^ 295s KeyboardInterrupt 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-5156565e-04dc-4ef5-bfbe-7d9b7cbda467.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52605 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35579 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 5156565e-04dc-4ef5-bfbe-7d9b7cbda467, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.230000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-9c86aaaa-d914-4b2f-bad0-4e080a723987.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52391 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44743 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9c86aaaa-d914-4b2f-bad0-4e080a723987, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 18.940000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 5156565e-04dc-4ef5-bfbe-7d9b7cbda467 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5156565e-04dc-4ef5-bfbe-7d9b7cbda467 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception PATCH /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='PATCH', uri='/a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 153, in patch 295s yield maybe_future( 295s km.shutdown_kernel(before['kernel']['id']) 295s ) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 PATCH /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 15.290000ms referer=None 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.700000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9c86aaaa-d914-4b2f-bad0-4e080a723987 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9c86aaaa-d914-4b2f-bad0-4e080a723987 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 10.680000ms referer=None 295s _________________ AsyncSessionAPITest.test_modify_kernel_name __________________ 295s 295s self = 295s 295s def test_modify_kernel_name(self): 295s before = self.sess_api.create('foo/nb1.ipynb').json() 295s sid = before['id'] 295s 295s after = self.sess_api.modify_kernel_name(sid, before['kernel']['name']).json() 295s self.assertEqual(after['id'], sid) 295s self.assertEqual(after['path'], before['path']) 295s self.assertEqual(after['type'], before['type']) 295s self.assertNotEqual(after['kernel']['id'], before['kernel']['id']) 295s 295s # check kernel list, to be sure previous kernel was cleaned up 295s r = self.request('GET', 'api/kernels') 295s r.raise_for_status() 295s kernel_list = r.json() 295s after['kernel'].pop('last_activity') 295s [ k.pop('last_activity') for k in kernel_list ] 295s > self.assertEqual(kernel_list, [after['kernel']]) 295s E AssertionError: Lists differ: [{'id': '5156565e-04dc-4ef5-bfbe-7d9b7cbda467', 'n[177 chars]: 0}] != [{'id': '98bb45f2-6fdd-453d-b4b9-27340a4e2ea5', 'n[61 chars]: 0}] 295s E 295s E First differing element 0: 295s E {'id': '5156565e-04dc-4ef5-bfbe-7d9b7cbda467', 'n[60 chars]': 0} 295s E {'id': '98bb45f2-6fdd-453d-b4b9-27340a4e2ea5', 'n[60 chars]': 0} 295s E 295s E First list contains 1 additional elements. 295s E First extra element 1: 295s E {'id': '98bb45f2-6fdd-453d-b4b9-27340a4e2ea5', 'name': 'python3', 'execution_state': 'starting', 'connections': 0} 295s E 295s E [{'connections': 0, 295s E - 'execution_state': 'starting', 295s E - 'id': '5156565e-04dc-4ef5-bfbe-7d9b7cbda467', 295s E - 'name': 'python3'}, 295s E - {'connections': 0, 295s E 'execution_state': 'starting', 295s E 'id': '98bb45f2-6fdd-453d-b4b9-27340a4e2ea5', 295s E 'name': 'python3'}] 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:238: AssertionError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 295s from ._local import * 295s File "/usr/lib/python3.13/pathlib/_local.py", line 6, in 295s import warnings 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1115, in get_code 295s File "", line 1214, in get_data 295s KeyboardInterrupt 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.870000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-98bb45f2-6fdd-453d-b4b9-27340a4e2ea5.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50379 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56619 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 98bb45f2-6fdd-453d-b4b9-27340a4e2ea5, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9c86aaaa-d914-4b2f-bad0-4e080a723987 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9c86aaaa-d914-4b2f-bad0-4e080a723987 295s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 17.000000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.610000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 3.020000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 98bb45f2-6fdd-453d-b4b9-27340a4e2ea5 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 98bb45f2-6fdd-453d-b4b9-27340a4e2ea5 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/76c5c460-3084-41eb-b1ee-39ae843e2f89 (::1) 8.320000ms referer=None 295s _______________ AsyncSessionAPITest.test_modify_path_deprecated ________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/d162768c-2b5e-42a7-ac7f-9f54d86f8564 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-fec4046e-c8f4-4019-aa00-283ce4940a48.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49727 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55143 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: fec4046e-c8f4-4019-aa00-283ce4940a48, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 14.870000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s WARNING NotebookApp:handlers.py:124 Sessions API changed, see updated swagger docs 295s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/d162768c-2b5e-42a7-ac7f-9f54d86f8564 (::1) 2.510000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.620000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fec4046e-c8f4-4019-aa00-283ce4940a48 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fec4046e-c8f4-4019-aa00-283ce4940a48 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/d162768c-2b5e-42a7-ac7f-9f54d86f8564 (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/d162768c-2b5e-42a7-ac7f-9f54d86f8564', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/d162768c-2b5e-42a7-ac7f-9f54d86f8564 (::1) 7.810000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 295s from ._abc import * 295s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 295s from glob import _Globber, _no_recurse_symlinks 295s File "/usr/lib/python3.13/glob.py", line 5, in 295s import re 295s File "/usr/lib/python3.13/re/__init__.py", line 126, in 295s from . import _compiler, _parser 295s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 295s from . import _parser 295s File "/usr/lib/python3.13/re/_parser.py", line 15, in 295s from ._constants import * 295s File "/usr/lib/python3.13/re/_constants.py", line 130, in 295s ATCODES = _makecodes( 295s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 295s ...<5 lines>... 295s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 295s ) 295s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 295s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 295s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 295s KeyboardInterrupt 295s _____________________ AsyncSessionAPITest.test_modify_type _____________________ 295s 295s @self.addCleanup 295s def cleanup_sessions(): 295s for session in self.sess_api.list().json(): 295s > self.sess_api.delete(session['id']) 295s 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 295s return self._req('DELETE', id) 295s ^^^^^^^^^^^^^^^^^^^^^^^ 295s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 295s response.raise_for_status() 295s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 295s 295s self = 295s 295s def raise_for_status(self): 295s """Raises :class:`HTTPError`, if one occurred.""" 295s 295s http_error_msg = "" 295s if isinstance(self.reason, bytes): 295s # We attempt to decode utf-8 first because some servers 295s # choose to localize their reason strings. If the string 295s # isn't utf-8, we fall back to iso-8859-1 for all other 295s # encodings. (See PR #3538) 295s try: 295s reason = self.reason.decode("utf-8") 295s except UnicodeDecodeError: 295s reason = self.reason.decode("iso-8859-1") 295s else: 295s reason = self.reason 295s 295s if 400 <= self.status_code < 500: 295s http_error_msg = ( 295s f"{self.status_code} Client Error: {reason} for url: {self.url}" 295s ) 295s 295s elif 500 <= self.status_code < 600: 295s http_error_msg = ( 295s f"{self.status_code} Server Error: {reason} for url: {self.url}" 295s ) 295s 295s if http_error_msg: 295s > raise HTTPError(http_error_msg, response=self) 295s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/97d3a984-9dfd-4ab0-ab73-2c723146486e 295s 295s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 295s ----------------------------- Captured stderr call ----------------------------- 295s Traceback (most recent call last): 295s ------------------------------ Captured log call ------------------------------- 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 295s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpq85gh68i/runtime/kernel-6d07fad4-b602-47bc-87f6-872d61513761.json'] 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48639 295s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59275 295s INFO NotebookApp:kernelmanager.py:179 Kernel started: 6d07fad4-b602-47bc-87f6-872d61513761, name: python3 295s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpq85gh68i/notebooks/foo'} 295s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.330000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/97d3a984-9dfd-4ab0-ab73-2c723146486e (::1) 2.260000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.670000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fec4046e-c8f4-4019-aa00-283ce4940a48 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fec4046e-c8f4-4019-aa00-283ce4940a48 295s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/d162768c-2b5e-42a7-ac7f-9f54d86f8564 (::1) 0.840000ms 295s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 295s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 6d07fad4-b602-47bc-87f6-872d61513761 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6d07fad4-b602-47bc-87f6-872d61513761 295s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/97d3a984-9dfd-4ab0-ab73-2c723146486e (::1) 295s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/97d3a984-9dfd-4ab0-ab73-2c723146486e', version='HTTP/1.1', remote_ip='::1') 295s Traceback (most recent call last): 295s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 295s result = await result 295s ^^^^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 295s future.result() 295s ~~~~~~~~~~~~~^^ 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 295s yield maybe_future(sm.delete_session(session_id)) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 295s yielded = self.gen.throw(exc) 295s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 295s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 295s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 295s value = future.result() 295s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 295s raise self._exception.with_traceback(self._exception_tb) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 295s result = coro.send(None) 295s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 295s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 295s raise km.ready.exception() # type: ignore[misc] 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 295s await kernel_awaitable 295s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 295s result = await obj 295s ^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 295s raise e 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 295s out = await method(self, *args, **kwargs) 295s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 295s await self._async_finish_shutdown(restart=restart) 295s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 295s await asyncio.wait_for( 295s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 295s ) 295s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 295s async with timeouts.timeout(timeout): 295s ~~~~~~~~~~~~~~~~^^^^^^^^^ 295s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 295s raise RuntimeError("Timeout should be used inside a task") 295s RuntimeError: Timeout should be used inside a task 295s WARNING NotebookApp:handlers.py:612 Unhandled error 295s ERROR NotebookApp:log.py:55 { 295s "Host": "localhost:12341", 295s "Accept": "*/*", 295s "User-Agent": "python-requests/2.32.5" 295s } 295s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/97d3a984-9dfd-4ab0-ab73-2c723146486e (::1) 11.320000ms referer=None 295s --------------------------- Captured stderr teardown --------------------------- 295s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 295s return _run_code(code, main_globals, None, 295s "__main__", mod_spec) 295s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 295s exec(code, run_globals) 295s ~~~~^^^^^^^^^^^^^^^^^^^ 295s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 295s from pathlib import Path 295s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 295s from ._local import * 295s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 295s class PureWindowsPath(PurePath): 295s ...<7 lines>... 295s __slots__ = () 295s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 295s import ntpath 295s File "", line 1360, in _find_and_load 295s File "", line 1331, in _find_and_load_unlocked 295s File "", line 935, in _load_unlocked 295s File "", line 1019, in exec_module 295s File "", line 1109, in get_code 295s File "", line 1232, in path_stats 295s File "", line 152, in _path_stat 295s KeyboardInterrupt 295s ---------------------------- Captured log teardown ----------------------------- 295s INFO NotebookApp:notebookapp.py:2164 Shutting down 2 kernels 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fec4046e-c8f4-4019-aa00-283ce4940a48 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ba2303cd-b257-43d8-8b84-b9b60cbcb3a7 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 98bb45f2-6fdd-453d-b4b9-27340a4e2ea5 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f8d9d0bd-8a02-4bdf-a7b2-eeff51559c78 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7709e600-5a0b-48c1-aae1-f8715ed853bf 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a1dbba1c-2f18-4fe4-8f13-4f90357584bc 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fd847240-b433-4562-b566-dbca87cc1b64 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9c86aaaa-d914-4b2f-bad0-4e080a723987 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5156565e-04dc-4ef5-bfbe-7d9b7cbda467 295s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6d07fad4-b602-47bc-87f6-872d61513761 295s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 295s =============================== warnings summary =============================== 295s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 295s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 295s /usr/lib/python3/dist-packages/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. 295s return LooseVersion(v) >= LooseVersion(check) 295s 295s ../../../usr/lib/python3/dist-packages/notebook/_tz.py:29: 1 warning 295s auth/tests/test_login.py: 2 warnings 295s bundler/tests/test_bundler_api.py: 2 warnings 295s services/api/tests/test_api.py: 4 warnings 295s services/config/tests/test_config_api.py: 7 warnings 295s services/contents/tests/test_contents_api.py: 318 warnings 295s services/kernels/tests/test_kernels_api.py: 114 warnings 295s services/kernelspecs/tests/test_kernelspecs_api.py: 7 warnings 295s services/nbconvert/tests/test_nbconvert_api.py: 3 warnings 295s services/sessions/tests/test_sessionmanager.py: 9 warnings 295s services/sessions/tests/test_sessions_api.py: 128 warnings 295s terminal/tests/test_terminals_api.py: 50 warnings 295s tests/test_files.py: 2 warnings 295s tests/test_gateway.py: 21 warnings 295s tests/test_notebookapp.py: 8 warnings 295s tests/test_paths.py: 2 warnings 295s tree/tests/test_tree_handler.py: 2 warnings 295s /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). 295s dt = unaware(*args, **kwargs) 295s 295s ../../../usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14 295s /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 295s pytestmark = pytest.mark.integration_tests 295s 295s auth/tests/test_login.py: 3 warnings 295s bundler/tests/test_bundler_api.py: 3 warnings 295s services/api/tests/test_api.py: 3 warnings 295s services/config/tests/test_config_api.py: 3 warnings 295s services/contents/tests/test_contents_api.py: 6 warnings 295s services/kernels/tests/test_kernels_api.py: 12 warnings 295s services/kernelspecs/tests/test_kernelspecs_api.py: 3 warnings 295s services/nbconvert/tests/test_nbconvert_api.py: 3 warnings 295s services/sessions/tests/test_sessions_api.py: 6 warnings 295s terminal/tests/test_terminals_api.py: 6 warnings 295s tests/test_files.py: 3 warnings 295s tests/test_gateway.py: 3 warnings 295s tests/test_notebookapp.py: 11 warnings 295s tests/test_paths.py: 3 warnings 295s tree/tests/test_tree_handler.py: 3 warnings 295s /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 295s policy = events.get_event_loop_policy() 295s 295s auth/tests/test_login.py: 9 warnings 295s bundler/tests/test_bundler_api.py: 9 warnings 295s services/api/tests/test_api.py: 9 warnings 295s services/config/tests/test_config_api.py: 9 warnings 295s services/contents/tests/test_contents_api.py: 18 warnings 295s services/kernels/tests/test_kernels_api.py: 47 warnings 295s services/kernelspecs/tests/test_kernelspecs_api.py: 9 warnings 295s services/nbconvert/tests/test_nbconvert_api.py: 9 warnings 295s services/sessions/tests/test_sessionmanager.py: 18 warnings 295s services/sessions/tests/test_sessions_api.py: 19 warnings 295s terminal/tests/test_terminals_api.py: 18 warnings 295s tests/test_files.py: 9 warnings 295s tests/test_gateway.py: 9 warnings 295s tests/test_notebookapp.py: 28 warnings 295s tests/test_paths.py: 9 warnings 295s tree/tests/test_tree_handler.py: 9 warnings 295s /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 295s loop = events.get_event_loop_policy().get_event_loop() 295s 295s bundler/tests/test_bundler_api.py: 6 warnings 295s services/api/tests/test_api.py: 6 warnings 295s services/contents/tests/test_contents_api.py: 806 warnings 295s services/contents/tests/test_largefilemanager.py: 42 warnings 295s services/contents/tests/test_manager.py: 526 warnings 295s tests/test_files.py: 8 warnings 295s tree/tests/test_tree_handler.py: 6 warnings 295s /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). 295s dt = unaware(*args, **kwargs) 295s 295s services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 295s services/kernels/tests/test_kernels_api.py::KernelCullingTest::test_culling 295s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first 295s loop.make_current() 295s 295s services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs 295s services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs_bad 295s /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/tmps4xn_xwg/data/kernels/sample 2 295s d = self.find_kernel_specs() 295s 295s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal 295s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal_via_get 295s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal_via_get 295s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal_with_name 295s terminal/tests/test_terminals_api.py::TerminalAPITest::test_terminal_handler 295s terminal/tests/test_terminals_api.py::TerminalAPITest::test_terminal_root_handler 295s terminal/tests/test_terminals_api.py::TerminalAPITest::test_terminal_root_handler 295s terminal/tests/test_terminals_api.py::TerminalCullingTest::test_culling 295s /usr/lib/python3.14/pty.py:66: DeprecationWarning: This process (pid=3158) is multi-threaded, use of forkpty() may lead to deadlocks in the child. 295s pid, fd = os.forkpty() 295s 295s terminal/tests/test_terminals_api.py::TerminalAPITest::test_create_terminal_via_get 295s /usr/lib/python3/dist-packages/jinja2/nodes.py:143: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 295s for name, arg in zip(self.fields, fields): 295s Enable tracemalloc to get traceback where the object was allocated. 295s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 295s 295s tests/test_gateway.py::TestGateway::test_gateway_kernel_lifecycle 295s tests/test_gateway.py::TestGateway::test_gateway_session_lifecycle 295s /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). 295s dt = datetime.utcnow().isoformat() + 'Z' 295s 295s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 295s =========================== short test summary info ============================ 295s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:86: Pandoc wasn't found. Skipping this test. 295s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:101: Pandoc wasn't found. Skipping this test. 295s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:109: Pandoc wasn't found. Skipping this test. 295s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:119: Pandoc wasn't found. Skipping this test. 295s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:128: Pandoc wasn't found. Skipping this test. 295s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/nbconvert/tests/test_nbconvert_handlers.py:145: Pandoc wasn't found. Skipping this test. 295s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_contents_api.py:682: skip send2trash tests 295s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_contents_api.py:592: skip send2trash tests 295s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_contents_api.py:606: skip send2trash tests 295s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_contents_api.py:616: skip send2trash tests 295s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_manager.py:332: skip send2trash tests 295s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_manager.py:658: skip send2trash tests 295s SKIPPED [2] ../../../usr/lib/python3/dist-packages/notebook/services/contents/tests/test_manager.py:727: skip send2trash tests 295s SKIPPED [1] ../../../usr/lib/python3/dist-packages/notebook/tests/test_utils.py:83: run on windows only 295s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_default_kernel 295s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_kernel_handler 295s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 295s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_no_kernels 295s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 295s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_default_kernel 295s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_kernel_handler 295s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 295s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_no_kernels 295s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 295s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_console_session 295s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_deprecated 295s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_file_session 295s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 295s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 295s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 295s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_path_deprecated 295s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_type 295s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create 295s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_console_session 295s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_deprecated 295s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_file_session 295s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 295s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 295s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 295s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_path_deprecated 295s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_type 295s ERROR services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 295s ERROR services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 295s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 295s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 295s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 295s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 295s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 295s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 295s = 27 failed, 277 passed, 20 skipped, 6 deselected, 2407 warnings, 8 errors in 34.43s = 296s *** END OF RUN 1: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 296s *** 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 300s ============================= test session starts ============================== 300s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 300s rootdir: /tmp/autopkgtest.tpx4mW/autopkgtest_tmp 300s plugins: typeguard-4.4.4 300s collected 330 items / 303 deselected / 27 selected 300s run-last-failure: rerun previous 27 failures 300s 302s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF [ 33%] 303s services/sessions/tests/test_sessions_api.py FFFFFEFF.FFFFFFEFF.F [100%] 303s 303s ==================================== ERRORS ==================================== 303s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 303s 303s self = 303s 303s def tearDown(self): 303s for k in self.kern_api.list().json(): 303s > self.kern_api.shutdown(k['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/4962e17f-850e-49be-ab1f-f497d90b4e60 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 303s import functools 303s File "/usr/lib/python3.13/functools.py", line 18, in 303s from collections import namedtuple 303s File "/usr/lib/python3.13/collections/__init__.py", line 989, in 303s class ChainMap(_collections_abc.MutableMapping): 303s File "/usr/lib/python3.13/abc.py", line 106, in __new__ 303s cls = super().__new__(mcls, name, bases, namespace, **kwargs) 303s KeyboardInterrupt 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpja3f6h3s/runtime/kernel-4962e17f-850e-49be-ab1f-f497d90b4e60.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54331 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51487 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4962e17f-850e-49be-ab1f-f497d90b4e60, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.790000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.550000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpja3f6h3s/runtime/kernel-c668b7e0-4d1c-4697-9dd9-127b6e1edd57.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59089 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45843 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: c668b7e0-4d1c-4697-9dd9-127b6e1edd57, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.170000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 2.290000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: c668b7e0-4d1c-4697-9dd9-127b6e1edd57 303s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/c668b7e0-4d1c-4697-9dd9-127b6e1edd57/interrupt (::1) 0.780000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 303s yield maybe_future(km.restart_kernel(kernel_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 303s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 303s await ensure_async(kernel.restart_kernel(now=now)) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 303s await self._async_shutdown_kernel(now=now, restart=True) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/c668b7e0-4d1c-4697-9dd9-127b6e1edd57/restart (::1) 4.580000ms referer=None 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.620000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4962e17f-850e-49be-ab1f-f497d90b4e60 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4962e17f-850e-49be-ab1f-f497d90b4e60 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/4962e17f-850e-49be-ab1f-f497d90b4e60 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/4962e17f-850e-49be-ab1f-f497d90b4e60', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 303s yielded = ctx_run(next, result) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 303s yield maybe_future(km.shutdown_kernel(kernel_id)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/4962e17f-850e-49be-ab1f-f497d90b4e60 (::1) 7.350000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 303s from ipykernel import kernelapp as app 303s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 303s from .connect import * # noqa: F403 303s ^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 303s import jupyter_client 303s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 303s from .asynchronous import AsyncKernelClient 303s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 303s from .client import AsyncKernelClient # noqa 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 303s import zmq.asyncio 303s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 303s import asyncio 303s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 303s from .base_events import * 303s File "/usr/lib/python3.13/asyncio/base_events.py", line 34, in 303s import ssl 303s File "/usr/lib/python3.13/ssl.py", line 128, in 303s _IntFlag._convert_( 303s ~~~~~~~~~~~~~~~~~~^ 303s 'Options', __name__, 303s ^^^^^^^^^^^^^^^^^^^^ 303s lambda name: name.startswith('OP_'), 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s source=_ssl) 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.13/enum.py", line 917, in _convert_ 303s for name, value in source.items() 303s ~~~~~~~~~~~~^^ 303s KeyboardInterrupt 303s _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 303s 303s self = 303s 303s def tearDown(self): 303s for k in self.kern_api.list().json(): 303s > self.kern_api.shutdown(k['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/70abf046-5c0b-4b19-b0dd-81fef0dd1457 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 303s import functools 303s File "/usr/lib/python3.13/functools.py", line 18, in 303s from collections import namedtuple 303s File "/usr/lib/python3.13/collections/__init__.py", line 39, in 303s from operator import eq as _eq 303s File "/usr/lib/python3.13/operator.py", line 232, in 303s class attrgetter: 303s KeyboardInterrupt 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpwjbdq_nx/runtime/kernel-70abf046-5c0b-4b19-b0dd-81fef0dd1457.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51303 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51635 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 70abf046-5c0b-4b19-b0dd-81fef0dd1457, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.180000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.640000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpwjbdq_nx/runtime/kernel-b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46475 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35303 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.010000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.900000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051 303s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051/interrupt (::1) 3.770000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 303s yield maybe_future(km.restart_kernel(kernel_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 303s result = coro.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 303s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 303s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 303s yield self # This tells Task to wait for completion. 303s ^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 303s await ensure_async(kernel.restart_kernel(now=now)) 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 303s await self._async_shutdown_kernel(now=now, restart=True) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051/restart (::1) 8.040000ms referer=None 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.880000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 70abf046-5c0b-4b19-b0dd-81fef0dd1457 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 70abf046-5c0b-4b19-b0dd-81fef0dd1457 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/70abf046-5c0b-4b19-b0dd-81fef0dd1457 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/70abf046-5c0b-4b19-b0dd-81fef0dd1457', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 303s yield maybe_future(km.shutdown_kernel(kernel_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ________ ERROR at teardown of SessionAPITest.test_create_with_kernel_id ________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 303s from ipykernel import kernelapp as app 303s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 303s from .connect import * # noqa: F403 303s ^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 303s from typing import TYPE_CHECKING, Any 303s File "", line 1360, in _find_and_load 303s File "", line 1331, in _find_and_load_unlocked 303s File "", line 935, in _load_unlocked 303s File "", line 1019, in exec_module 303s File "", line 1152, in get_code 303s File "", line 781, in _compile_bytecode 303s KeyboardInterrupt 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp4jnb4nv0/runtime/kernel-475b8744-7e3d-4b10-9c0f-11741064649a.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:32927 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49959 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 475b8744-7e3d-4b10-9c0f-11741064649a, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.460000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.770000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.680000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.700000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 744ad4fa-3f09-433a-9a5f-a865fb3947cc 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 744ad4fa-3f09-433a-9a5f-a865fb3947cc 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/0411d7f7-2203-4b5b-bd6d-7a7c44f65ee3 (::1) 0.830000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 475b8744-7e3d-4b10-9c0f-11741064649a 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 475b8744-7e3d-4b10-9c0f-11741064649a 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 303s yielded = self.gen.send(value) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 (::1) 7.900000ms referer=None 303s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_kernel_id ______ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpsrdvjk6m/runtime/kernel-9150de3b-e1ee-467a-a4db-71ebadea335b.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54821 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40805 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9150de3b-e1ee-467a-a4db-71ebadea335b, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.030000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 1.970000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.600000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.620000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 1acca1ea-e0b8-4511-a0f1-db6494b5ca3a 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1acca1ea-e0b8-4511-a0f1-db6494b5ca3a 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/bea0f756-81e8-4738-8b28-0407687b103f (::1) 2.140000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9150de3b-e1ee-467a-a4db-71ebadea335b 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9150de3b-e1ee-467a-a4db-71ebadea335b 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 (::1) 7.510000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 303s from ipykernel import kernelapp as app 303s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 303s from .connect import * # noqa: F403 303s ^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 303s import json 303s File "/usr/lib/python3.13/json/__init__.py", line 106, in 303s from .decoder import JSONDecoder, JSONDecodeError 303s File "", line 1360, in _find_and_load 303s File "", line 1331, in _find_and_load_unlocked 303s File "", line 935, in _load_unlocked 303s File "", line 1019, in exec_module 303s File "", line 1152, in get_code 303s File "", line 781, in _compile_bytecode 303s KeyboardInterrupt 303s =================================== FAILURES =================================== 303s ______________________ KernelAPITest.test_default_kernel _______________________ 303s 303s self = 303s 303s def tearDown(self): 303s for k in self.kern_api.list().json(): 303s > self.kern_api.shutdown(k['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/d37cea4d-d432-4835-8c6f-b50c59154ddb 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ------------------------------ Captured log setup ------------------------------ 303s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpja3f6h3s/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpja3f6h3s/etc/jupyter'] for config files 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpja3f6h3s/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpja3f6h3s/config 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpja3f6h3s/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpja3f6h3s/config 303s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpja3f6h3s/notebooks 303s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 303s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 303s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 303s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 303s WARNING NotebookApp:handlers.py:612 Forbidden 303s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.710000ms referer=None 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpja3f6h3s/runtime/kernel-d37cea4d-d432-4835-8c6f-b50c59154ddb.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54809 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41599 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: d37cea4d-d432-4835-8c6f-b50c59154ddb, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 57.430000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.750000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d37cea4d-d432-4835-8c6f-b50c59154ddb 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d37cea4d-d432-4835-8c6f-b50c59154ddb 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/d37cea4d-d432-4835-8c6f-b50c59154ddb (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/d37cea4d-d432-4835-8c6f-b50c59154ddb', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 303s yielded = ctx_run(next, result) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 303s yield maybe_future(km.shutdown_kernel(kernel_id)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/d37cea4d-d432-4835-8c6f-b50c59154ddb (::1) 8.890000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 5, in 303s import re 303s File "/usr/lib/python3.13/re/__init__.py", line 126, in 303s from . import _compiler, _parser 303s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 303s from . import _parser 303s File "/usr/lib/python3.13/re/_parser.py", line 15, in 303s from ._constants import * 303s File "/usr/lib/python3.13/re/_constants.py", line 130, in 303s ATCODES = _makecodes( 303s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 303s ...<5 lines>... 303s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 303s ) 303s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 303s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 303s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 303s KeyboardInterrupt 303s ______________________ KernelAPITest.test_kernel_handler _______________________ 303s 303s self = 303s 303s def test_kernel_handler(self): 303s # GET kernel with given id 303s kid = self.kern_api.start().json()['id'] 303s r = self.kern_api.get(kid) 303s kern1 = r.json() 303s self.assertEqual(r.status_code, 200) 303s assert isinstance(kern1, dict) 303s self.assertIn('id', kern1) 303s self.assertEqual(kern1['id'], kid) 303s 303s # Request a bad kernel id and check that a JSON 303s # message is returned! 303s bad_id = '111-111-111-111-111' 303s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 303s self.kern_api.get(bad_id) 303s 303s # DELETE kernel with id 303s > r = self.kern_api.shutdown(kid) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/69d216ce-508b-41df-bf5b-1971d18b7098 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 5, in 303s import re 303s File "/usr/lib/python3.13/re/__init__.py", line 126, in 303s from . import _compiler, _parser 303s File "", line 1360, in _find_and_load 303s File "", line 1331, in _find_and_load_unlocked 303s File "", line 935, in _load_unlocked 303s File "", line 1019, in exec_module 303s File "", line 1115, in get_code 303s File "", line 1214, in get_data 303s KeyboardInterrupt 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpja3f6h3s/runtime/kernel-69d216ce-508b-41df-bf5b-1971d18b7098.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35727 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52993 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 69d216ce-508b-41df-bf5b-1971d18b7098, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.120000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/69d216ce-508b-41df-bf5b-1971d18b7098 (::1) 0.540000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1): Kernel does not exist: 111-111-111-111-111 303s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 303s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1) 0.590000ms referer=None 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 69d216ce-508b-41df-bf5b-1971d18b7098 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 69d216ce-508b-41df-bf5b-1971d18b7098 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/69d216ce-508b-41df-bf5b-1971d18b7098 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/69d216ce-508b-41df-bf5b-1971d18b7098', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 303s yielded = ctx_run(next, result) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 303s yield maybe_future(km.shutdown_kernel(kernel_id)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/69d216ce-508b-41df-bf5b-1971d18b7098 (::1) 11.100000ms referer=None 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.550000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d37cea4d-d432-4835-8c6f-b50c59154ddb 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d37cea4d-d432-4835-8c6f-b50c59154ddb 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/d37cea4d-d432-4835-8c6f-b50c59154ddb (::1) 2.060000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 69d216ce-508b-41df-bf5b-1971d18b7098 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 69d216ce-508b-41df-bf5b-1971d18b7098 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/69d216ce-508b-41df-bf5b-1971d18b7098 (::1) 0.710000ms 303s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 303s 303s self = 303s 303s def test_main_kernel_handler(self): 303s # POST request 303s r = self.kern_api.start() 303s kern1 = r.json() 303s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 303s self.assertEqual(r.status_code, 201) 303s self.assertIsInstance(kern1, dict) 303s 303s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 303s expected_csp = '; '.join([ 303s "frame-ancestors 'self'", 303s 'report-uri ' + report_uri, 303s "default-src 'none'" 303s ]) 303s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 303s 303s # GET request 303s r = self.kern_api.list() 303s self.assertEqual(r.status_code, 200) 303s assert isinstance(r.json(), list) 303s self.assertEqual(r.json()[0]['id'], kern1['id']) 303s self.assertEqual(r.json()[0]['name'], kern1['name']) 303s 303s # create another kernel and check that they both are added to the 303s # list of kernels from a GET request 303s kern2 = self.kern_api.start().json() 303s assert isinstance(kern2, dict) 303s r = self.kern_api.list() 303s kernels = r.json() 303s self.assertEqual(r.status_code, 200) 303s assert isinstance(kernels, list) 303s self.assertEqual(len(kernels), 2) 303s 303s # Interrupt a kernel 303s r = self.kern_api.interrupt(kern2['id']) 303s self.assertEqual(r.status_code, 204) 303s 303s # Restart a kernel 303s > r = self.kern_api.restart(kern2['id']) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 303s return self._req('POST', url_path_join(id, 'restart')) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/c668b7e0-4d1c-4697-9dd9-127b6e1edd57/restart 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 303s import functools 303s File "/usr/lib/python3.13/functools.py", line 18, in 303s from collections import namedtuple 303s File "/usr/lib/python3.13/collections/__init__.py", line 989, in 303s class ChainMap(_collections_abc.MutableMapping): 303s File "/usr/lib/python3.13/abc.py", line 106, in __new__ 303s cls = super().__new__(mcls, name, bases, namespace, **kwargs) 303s KeyboardInterrupt 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpja3f6h3s/runtime/kernel-4962e17f-850e-49be-ab1f-f497d90b4e60.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54331 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51487 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4962e17f-850e-49be-ab1f-f497d90b4e60, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.790000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.550000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpja3f6h3s/runtime/kernel-c668b7e0-4d1c-4697-9dd9-127b6e1edd57.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59089 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45843 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: c668b7e0-4d1c-4697-9dd9-127b6e1edd57, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.170000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 2.290000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: c668b7e0-4d1c-4697-9dd9-127b6e1edd57 303s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/c668b7e0-4d1c-4697-9dd9-127b6e1edd57/interrupt (::1) 0.780000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 303s yield maybe_future(km.restart_kernel(kernel_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 303s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 303s await ensure_async(kernel.restart_kernel(now=now)) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 303s await self._async_shutdown_kernel(now=now, restart=True) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/c668b7e0-4d1c-4697-9dd9-127b6e1edd57/restart (::1) 4.580000ms referer=None 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.620000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4962e17f-850e-49be-ab1f-f497d90b4e60 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4962e17f-850e-49be-ab1f-f497d90b4e60 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/4962e17f-850e-49be-ab1f-f497d90b4e60 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/4962e17f-850e-49be-ab1f-f497d90b4e60', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 303s yielded = ctx_run(next, result) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 303s yield maybe_future(km.shutdown_kernel(kernel_id)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/4962e17f-850e-49be-ab1f-f497d90b4e60 (::1) 7.350000ms referer=None 303s ________________________ KernelAPITest.test_no_kernels _________________________ 303s 303s self = 303s 303s def test_no_kernels(self): 303s """Make sure there are no kernels running at the start""" 303s kernels = self.kern_api.list().json() 303s > self.assertEqual(kernels, []) 303s E AssertionError: Lists differ: [{'id': '4962e17f-850e-49be-ab1f-f497d90b4[281 chars]: 0}] != [] 303s E 303s E First list contains 2 additional elements. 303s E First extra element 0: 303s E {'id': '4962e17f-850e-49be-ab1f-f497d90b4e60', 'name': 'python3', 'last_activity': '2026-02-06T02:22:00.655992Z', 'execution_state': 'starting', 'connections': 0} 303s E 303s E + [] 303s E - [{'connections': 0, 303s E - 'execution_state': 'starting', 303s E - 'id': '4962e17f-850e-49be-ab1f-f497d90b4e60', 303s E - 'last_activity': '2026-02-06T02:22:00.655992Z', 303s E - 'name': 'python3'}, 303s E - {'connections': 0, 303s E - 'execution_state': 'starting', 303s E - 'id': 'c668b7e0-4d1c-4697-9dd9-127b6e1edd57', 303s E - 'last_activity': '2026-02-06T02:22:00.676406Z', 303s E - 'name': 'python3'}] 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 2.190000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.510000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4962e17f-850e-49be-ab1f-f497d90b4e60 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4962e17f-850e-49be-ab1f-f497d90b4e60 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/4962e17f-850e-49be-ab1f-f497d90b4e60 (::1) 1.890000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c668b7e0-4d1c-4697-9dd9-127b6e1edd57 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c668b7e0-4d1c-4697-9dd9-127b6e1edd57 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/c668b7e0-4d1c-4697-9dd9-127b6e1edd57 (::1) 0.690000ms 303s ---------------------------- Captured log teardown ----------------------------- 303s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 303s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 303s _____________________ AsyncKernelAPITest.test_connections ______________________ 303s 303s self = 303s 303s def tearDown(self): 303s for k in self.kern_api.list().json(): 303s > self.kern_api.shutdown(k['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ------------------------------ Captured log setup ------------------------------ 303s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpwjbdq_nx/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpwjbdq_nx/etc/jupyter'] for config files 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpwjbdq_nx/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpwjbdq_nx/config 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpwjbdq_nx/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpwjbdq_nx/config 303s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpwjbdq_nx/notebooks 303s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 303s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 303s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 303s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 303s WARNING NotebookApp:handlers.py:612 Forbidden 303s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.940000ms referer=None 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpwjbdq_nx/runtime/kernel-bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39319 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38465 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.660000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd (::1) 0.640000ms 303s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd/channels 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 303s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56553 303s DEBUG NotebookApp:kernelmanager.py:423 activity on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd: status (starting) 303s DEBUG NotebookApp:kernelmanager.py:423 activity on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd: status (busy) 303s DEBUG NotebookApp:kernelmanager.py:423 activity on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd: status (idle) 303s 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/'}]} 303s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd) to 5.4 (client). 303s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd/channels (::1) 545.660000ms 303s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd/channels 303s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38465 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56553 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39319 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48457 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56553 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39319 303s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 303s Setting websocket_ping_timeout=30000 303s DEBUG NotebookApp:handlers.py:255 Nudge: attempt 1 on kernel bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd (::1) 3.810000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd (::1) 1.620000ms 303s DEBUG NotebookApp:handlers.py:207 Nudge: IOPub received: bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:handlers.py:210 Nudge: resolving iopub future: bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:kernelmanager.py:423 activity on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd: status (busy) 303s DEBUG NotebookApp:handlers.py:201 Nudge: control info reply received: bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:handlers.py:203 Nudge: resolving control future: bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:kernelmanager.py:423 activity on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd: status (busy) 303s DEBUG NotebookApp:handlers.py:195 Nudge: shell info reply received: bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:kernelmanager.py:423 activity on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd: status (idle) 303s DEBUG NotebookApp:kernelmanager.py:423 activity on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd: status (idle) 303s DEBUG NotebookApp:handlers.py:579 Websocket closed bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd:5e6fa4a4-cff8527336951fdf31a7398a 303s INFO NotebookApp:kernelmanager.py:222 Starting buffering for bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd:5e6fa4a4-cff8527336951fdf31a7398a 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd:iopub 303s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd:iopub 303s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd:iopub 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd (::1) 0.710000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd (::1) 0.570000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.560000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s INFO NotebookApp:kernelmanager.py:286 Discarding 3 buffered messages for bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd:5e6fa4a4-cff8527336951fdf31a7398a 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 303s yield maybe_future(km.shutdown_kernel(kernel_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd (::1) 13.230000ms referer=None 303s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 303s 303s self = 303s 303s def tearDown(self): 303s for k in self.kern_api.list().json(): 303s > self.kern_api.shutdown(k['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/71e24d1e-d7de-441a-b484-e755558911a1 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpwjbdq_nx/runtime/kernel-71e24d1e-d7de-441a-b484-e755558911a1.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42831 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38015 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 71e24d1e-d7de-441a-b484-e755558911a1, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 18.580000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.820000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd (::1) 5.210000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 71e24d1e-d7de-441a-b484-e755558911a1 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 71e24d1e-d7de-441a-b484-e755558911a1 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/71e24d1e-d7de-441a-b484-e755558911a1 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/71e24d1e-d7de-441a-b484-e755558911a1', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 303s yield maybe_future(km.shutdown_kernel(kernel_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/71e24d1e-d7de-441a-b484-e755558911a1 (::1) 14.820000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 3, in 303s import contextlib 303s File "/usr/lib/python3.13/contextlib.py", line 202, in 303s class _AsyncGeneratorContextManager( 303s ...<70 lines>... 303s await self.gen.aclose() 303s File "/usr/lib/python3.13/abc.py", line 105, in __new__ 303s def __new__(mcls, name, bases, namespace, /, **kwargs): 303s 303s KeyboardInterrupt 303s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 303s 303s self = 303s 303s def test_kernel_handler(self): 303s # GET kernel with given id 303s kid = self.kern_api.start().json()['id'] 303s r = self.kern_api.get(kid) 303s kern1 = r.json() 303s self.assertEqual(r.status_code, 200) 303s assert isinstance(kern1, dict) 303s self.assertIn('id', kern1) 303s self.assertEqual(kern1['id'], kid) 303s 303s # Request a bad kernel id and check that a JSON 303s # message is returned! 303s bad_id = '111-111-111-111-111' 303s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 303s self.kern_api.get(bad_id) 303s 303s # DELETE kernel with id 303s > r = self.kern_api.shutdown(kid) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/2003f440-939f-4065-bf16-610f95e6ecde 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s File "", line 1360, in _find_and_load 303s File "", line 1324, in _find_and_load_unlocked 303s ModuleNotFoundError: No module named 'nt' 303s 303s During handling of the above exception, another exception occurred: 303s 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 303s from ._local import * 303s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 303s class PureWindowsPath(PurePath): 303s ...<7 lines>... 303s __slots__ = () 303s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 303s import ntpath 303s File "/usr/lib/python3.13/ntpath.py", line 849, in 303s from nt import _path_isdir as isdir 303s File "", line 1357, in _find_and_load 303s File "", line 421, in __exit__ 303s File "", line 374, in release 303s KeyboardInterrupt 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpwjbdq_nx/runtime/kernel-2003f440-939f-4065-bf16-610f95e6ecde.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37391 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38903 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2003f440-939f-4065-bf16-610f95e6ecde, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 19.130000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/2003f440-939f-4065-bf16-610f95e6ecde (::1) 0.580000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1): Kernel does not exist: 111-111-111-111-111 303s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 303s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1) 0.600000ms referer=None 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2003f440-939f-4065-bf16-610f95e6ecde 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2003f440-939f-4065-bf16-610f95e6ecde 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/2003f440-939f-4065-bf16-610f95e6ecde (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/2003f440-939f-4065-bf16-610f95e6ecde', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 303s yield maybe_future(km.shutdown_kernel(kernel_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/2003f440-939f-4065-bf16-610f95e6ecde (::1) 6.460000ms referer=None 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.550000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 71e24d1e-d7de-441a-b484-e755558911a1 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 71e24d1e-d7de-441a-b484-e755558911a1 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/71e24d1e-d7de-441a-b484-e755558911a1 (::1) 0.670000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2003f440-939f-4065-bf16-610f95e6ecde 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2003f440-939f-4065-bf16-610f95e6ecde 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/2003f440-939f-4065-bf16-610f95e6ecde (::1) 1.200000ms 303s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 303s 303s self = 303s 303s def test_main_kernel_handler(self): 303s # POST request 303s r = self.kern_api.start() 303s kern1 = r.json() 303s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 303s self.assertEqual(r.status_code, 201) 303s self.assertIsInstance(kern1, dict) 303s 303s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 303s expected_csp = '; '.join([ 303s "frame-ancestors 'self'", 303s 'report-uri ' + report_uri, 303s "default-src 'none'" 303s ]) 303s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 303s 303s # GET request 303s r = self.kern_api.list() 303s self.assertEqual(r.status_code, 200) 303s assert isinstance(r.json(), list) 303s self.assertEqual(r.json()[0]['id'], kern1['id']) 303s self.assertEqual(r.json()[0]['name'], kern1['name']) 303s 303s # create another kernel and check that they both are added to the 303s # list of kernels from a GET request 303s kern2 = self.kern_api.start().json() 303s assert isinstance(kern2, dict) 303s r = self.kern_api.list() 303s kernels = r.json() 303s self.assertEqual(r.status_code, 200) 303s assert isinstance(kernels, list) 303s self.assertEqual(len(kernels), 2) 303s 303s # Interrupt a kernel 303s r = self.kern_api.interrupt(kern2['id']) 303s self.assertEqual(r.status_code, 204) 303s 303s # Restart a kernel 303s > r = self.kern_api.restart(kern2['id']) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 303s return self._req('POST', url_path_join(id, 'restart')) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051/restart 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 303s import functools 303s File "/usr/lib/python3.13/functools.py", line 18, in 303s from collections import namedtuple 303s File "/usr/lib/python3.13/collections/__init__.py", line 39, in 303s from operator import eq as _eq 303s File "/usr/lib/python3.13/operator.py", line 232, in 303s class attrgetter: 303s KeyboardInterrupt 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpwjbdq_nx/runtime/kernel-70abf046-5c0b-4b19-b0dd-81fef0dd1457.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51303 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51635 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 70abf046-5c0b-4b19-b0dd-81fef0dd1457, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.180000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.640000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpwjbdq_nx/runtime/kernel-b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46475 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35303 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.010000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.900000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051 303s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051/interrupt (::1) 3.770000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 303s yield maybe_future(km.restart_kernel(kernel_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 303s result = coro.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 303s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 303s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 303s yield self # This tells Task to wait for completion. 303s ^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 303s await ensure_async(kernel.restart_kernel(now=now)) 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 303s await self._async_shutdown_kernel(now=now, restart=True) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051/restart (::1) 8.040000ms referer=None 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.880000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 70abf046-5c0b-4b19-b0dd-81fef0dd1457 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 70abf046-5c0b-4b19-b0dd-81fef0dd1457 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/70abf046-5c0b-4b19-b0dd-81fef0dd1457 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/70abf046-5c0b-4b19-b0dd-81fef0dd1457', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 303s yield maybe_future(km.shutdown_kernel(kernel_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 303s 303s self = 303s 303s def test_no_kernels(self): 303s """Make sure there are no kernels running at the start""" 303s kernels = self.kern_api.list().json() 303s > self.assertEqual(kernels, []) 303s E AssertionError: Lists differ: [{'id': '70abf046-5c0b-4b19-b0dd-81fef0dd1[281 chars]: 0}] != [] 303s E 303s E First list contains 2 additional elements. 303s E First extra element 0: 303s E {'id': '70abf046-5c0b-4b19-b0dd-81fef0dd1457', 'name': 'python3', 'last_activity': '2026-02-06T02:22:01.727433Z', 'execution_state': 'starting', 'connections': 0} 303s E 303s E + [] 303s E - [{'connections': 0, 303s E - 'execution_state': 'starting', 303s E - 'id': '70abf046-5c0b-4b19-b0dd-81fef0dd1457', 303s E - 'last_activity': '2026-02-06T02:22:01.727433Z', 303s E - 'name': 'python3'}, 303s E - {'connections': 0, 303s E - 'execution_state': 'starting', 303s E - 'id': 'b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051', 303s E - 'last_activity': '2026-02-06T02:22:01.747301Z', 303s E - 'name': 'python3'}] 303s 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 303s from ipykernel import kernelapp as app 303s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 303s from .connect import * # noqa: F403 303s ^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 303s import jupyter_client 303s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 303s from .asynchronous import AsyncKernelClient 303s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 303s from .client import AsyncKernelClient # noqa 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 303s import zmq.asyncio 303s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 303s import asyncio 303s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 303s from .base_events import * 303s File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in 303s import concurrent.futures 303s File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in 303s from concurrent.futures._base import (FIRST_COMPLETED, 303s ...<9 lines>... 303s as_completed) 303s File "/usr/lib/python3.13/concurrent/futures/_base.py", line 7, in 303s import logging 303s File "/usr/lib/python3.13/logging/__init__.py", line 29, in 303s from string import Template 303s File "", line 1360, in _find_and_load 303s File "", line 1322, in _find_and_load_unlocked 303s File "", line 1256, in _find_spec 303s KeyboardInterrupt 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.570000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.520000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 70abf046-5c0b-4b19-b0dd-81fef0dd1457 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 70abf046-5c0b-4b19-b0dd-81fef0dd1457 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/70abf046-5c0b-4b19-b0dd-81fef0dd1457 (::1) 0.660000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/b56fbcb7-7cbe-44bc-ae35-62d1d3ac7051 (::1) 0.640000ms 303s ---------------------------- Captured log teardown ----------------------------- 303s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2003f440-939f-4065-bf16-610f95e6ecde 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 71e24d1e-d7de-441a-b484-e755558911a1 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: bfacf43c-5ba7-4d36-8f55-c6b7dbb434dd 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 70abf046-5c0b-4b19-b0dd-81fef0dd1457 303s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 303s __________________________ SessionAPITest.test_create __________________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/7f6eb3f8-4871-4a5f-ba09-8a7a1efd256c 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ------------------------------ Captured log setup ------------------------------ 303s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp4jnb4nv0/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp4jnb4nv0/etc/jupyter'] for config files 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp4jnb4nv0/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp4jnb4nv0/config 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp4jnb4nv0/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp4jnb4nv0/config 303s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp4jnb4nv0/notebooks 303s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 303s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 303s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 303s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 303s WARNING NotebookApp:handlers.py:612 Forbidden 303s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.460000ms referer=None 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.060000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp4jnb4nv0/runtime/kernel-8bb9b6c6-367f-4d24-93f2-62cd6dfc4a5b.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53901 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53217 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8bb9b6c6-367f-4d24-93f2-62cd6dfc4a5b, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp4jnb4nv0/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 19.130000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.690000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/7f6eb3f8-4871-4a5f-ba09-8a7a1efd256c (::1) 0.640000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.640000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8bb9b6c6-367f-4d24-93f2-62cd6dfc4a5b 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8bb9b6c6-367f-4d24-93f2-62cd6dfc4a5b 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/7f6eb3f8-4871-4a5f-ba09-8a7a1efd256c (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/7f6eb3f8-4871-4a5f-ba09-8a7a1efd256c', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 303s yielded = self.gen.send(value) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/7f6eb3f8-4871-4a5f-ba09-8a7a1efd256c (::1) 8.010000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 303s from ipykernel import kernelapp as app 303s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 303s from .connect import * # noqa: F403 303s ^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 303s from typing import TYPE_CHECKING, Any 303s File "/usr/lib/python3.13/typing.py", line 1694, in 303s class _DeprecatedGenericAlias(_SpecialGenericAlias, _root=True): 303s ...<11 lines>... 303s return super().__instancecheck__(inst) 303s File "/usr/lib/python3.13/typing.py", line 511, in __init_subclass__ 303s def __init_subclass__(cls, /, *args, **kwds): 303s 303s KeyboardInterrupt 303s __________________ SessionAPITest.test_create_console_session __________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/50045dcd-1be1-487a-b8e2-93ba345405ad 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp4jnb4nv0/runtime/kernel-d9b4c110-2761-40eb-9988-8d7cb2aab970.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56013 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38047 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: d9b4c110-2761-40eb-9988-8d7cb2aab970, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp4jnb4nv0/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.250000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.960000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8bb9b6c6-367f-4d24-93f2-62cd6dfc4a5b 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8bb9b6c6-367f-4d24-93f2-62cd6dfc4a5b 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/7f6eb3f8-4871-4a5f-ba09-8a7a1efd256c (::1) 0.900000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d9b4c110-2761-40eb-9988-8d7cb2aab970 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d9b4c110-2761-40eb-9988-8d7cb2aab970 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/50045dcd-1be1-487a-b8e2-93ba345405ad (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/50045dcd-1be1-487a-b8e2-93ba345405ad', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 303s yielded = self.gen.send(value) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 5, in 303s import re 303s File "/usr/lib/python3.13/re/__init__.py", line 381, in 303s import copyreg 303s File "", line 1360, in _find_and_load 303s File "", line 1322, in _find_and_load_unlocked 303s File "", line 1262, in _find_spec 303s File "", line 1556, in find_spec 303s File "", line 1530, in _get_spec 303s File "", line 1657, in find_spec 303s File "", line 131, in _path_join 303s KeyboardInterrupt 303s ____________________ SessionAPITest.test_create_deprecated _____________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/1fd4d6b9-9c1b-4306-9796-88785f08cc7f 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp4jnb4nv0/runtime/kernel-150499b7-92d1-46b7-87b6-fa480c90cc63.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35187 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41495 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 150499b7-92d1-46b7-87b6-fa480c90cc63, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp4jnb4nv0/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.310000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 2.080000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d9b4c110-2761-40eb-9988-8d7cb2aab970 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d9b4c110-2761-40eb-9988-8d7cb2aab970 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/50045dcd-1be1-487a-b8e2-93ba345405ad (::1) 0.810000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 150499b7-92d1-46b7-87b6-fa480c90cc63 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 150499b7-92d1-46b7-87b6-fa480c90cc63 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/1fd4d6b9-9c1b-4306-9796-88785f08cc7f (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/1fd4d6b9-9c1b-4306-9796-88785f08cc7f', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 303s yielded = self.gen.send(value) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/1fd4d6b9-9c1b-4306-9796-88785f08cc7f (::1) 7.790000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 5, in 303s import re 303s File "/usr/lib/python3.13/re/__init__.py", line 143, in 303s @enum._simple_enum(enum.IntFlag, boundary=enum.KEEP) 303s ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3.13/enum.py", line 1805, in convert_class 303s enum_class = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) 303s File "/usr/lib/python3.13/enum.py", line 505, in __new__ 303s return super().__new__(metacls, cls, bases, classdict, **kwds) 303s ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s KeyboardInterrupt 303s ___________________ SessionAPITest.test_create_file_session ____________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/0411d7f7-2203-4b5b-bd6d-7a7c44f65ee3 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp4jnb4nv0/runtime/kernel-744ad4fa-3f09-433a-9a5f-a865fb3947cc.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45223 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57089 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 744ad4fa-3f09-433a-9a5f-a865fb3947cc, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp4jnb4nv0/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.140000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.940000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 150499b7-92d1-46b7-87b6-fa480c90cc63 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 150499b7-92d1-46b7-87b6-fa480c90cc63 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/1fd4d6b9-9c1b-4306-9796-88785f08cc7f (::1) 0.830000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 744ad4fa-3f09-433a-9a5f-a865fb3947cc 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 744ad4fa-3f09-433a-9a5f-a865fb3947cc 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/0411d7f7-2203-4b5b-bd6d-7a7c44f65ee3 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/0411d7f7-2203-4b5b-bd6d-7a7c44f65ee3', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 303s yielded = self.gen.send(value) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 5, in 303s import re 303s File "/usr/lib/python3.13/re/__init__.py", line 315, in 303s Pattern = type(_compiler.compile('', 0)) 303s ~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3.13/re/_compiler.py", line 764, in compile 303s return _sre.compile( 303s ~~~~~~~~~~~~^ 303s pattern, flags | p.state.flags, code, 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s p.state.groups-1, 303s ^^^^^^^^^^^^^^^^^ 303s groupindex, tuple(indexgroup) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s ) 303s ^ 303s KeyboardInterrupt 303s __________________ SessionAPITest.test_create_with_kernel_id ___________________ 303s 303s self = 303s 303s def test_create_with_kernel_id(self): 303s # create a new kernel 303s r = self.request('POST', 'api/kernels') 303s r.raise_for_status() 303s kernel = r.json() 303s 303s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 303s self.assertEqual(resp.status_code, 201) 303s newsession = resp.json() 303s self.assertIn('id', newsession) 303s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 303s self.assertEqual(newsession['kernel']['id'], kernel['id']) 303s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 303s 303s sessions = self.sess_api.list().json() 303s > self.assertEqual(sessions, [newsession]) 303s E AssertionError: Lists differ: [{'id': '0411d7f7-2203-4b5b-bd6d-7a7c44f65ee3', 'p[553 chars]ne}}] != [{'id': 'acb59231-a687-4f08-939d-10d96558bb00', 'p[279 chars]ne}}] 303s E 303s E First differing element 0: 303s E {'id': '0411d7f7-2203-4b5b-bd6d-7a7c44f65ee3', 'p[218 chars]: 0}} 303s E {'id': 'acb59231-a687-4f08-939d-10d96558bb00', 'p[278 chars]one}} 303s E 303s E First list contains 1 additional elements. 303s E First extra element 1: 303s E {'id': 'acb59231-a687-4f08-939d-10d96558bb00', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '475b8744-7e3d-4b10-9c0f-11741064649a', 'name': 'python3', 'last_activity': '2026-02-06T02:22:02.229676Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 303s E 303s E Diff is 830 characters long. Set self.maxDiff to None to see it. 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 303s ----------------------------- Captured stderr call --------------------------/usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 303s gc.collect() 303s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 303s --- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 303s from ipykernel import kernelapp as app 303s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 303s from .connect import * # noqa: F403 303s ^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 303s from typing import TYPE_CHECKING, Any 303s File "", line 1360, in _find_and_load 303s File "", line 1331, in _find_and_load_unlocked 303s File "", line 935, in _load_unlocked 303s File "", line 1019, in exec_module 303s File "", line 1152, in get_code 303s File "", line 781, in _compile_bytecode 303s KeyboardInterrupt 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp4jnb4nv0/runtime/kernel-475b8744-7e3d-4b10-9c0f-11741064649a.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:32927 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49959 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 475b8744-7e3d-4b10-9c0f-11741064649a, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.460000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.770000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.680000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.700000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 744ad4fa-3f09-433a-9a5f-a865fb3947cc 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 744ad4fa-3f09-433a-9a5f-a865fb3947cc 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/0411d7f7-2203-4b5b-bd6d-7a7c44f65ee3 (::1) 0.830000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 475b8744-7e3d-4b10-9c0f-11741064649a 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 475b8744-7e3d-4b10-9c0f-11741064649a 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 303s yielded = self.gen.send(value) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 (::1) 7.900000ms referer=None 303s _____________________ SessionAPITest.test_modify_kernel_id _____________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 2.070000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp4jnb4nv0/runtime/kernel-0387f0e0-61e3-478a-bc36-dcef747d5f78.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46427 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47197 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 0387f0e0-61e3-478a-bc36-dcef747d5f78, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.610000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 475b8744-7e3d-4b10-9c0f-11741064649a 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 475b8744-7e3d-4b10-9c0f-11741064649a 303s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 (::1) 2.820000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.870000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0387f0e0-61e3-478a-bc36-dcef747d5f78 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0387f0e0-61e3-478a-bc36-dcef747d5f78 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 303s yielded = self.gen.send(value) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 303s from ipykernel import kernelapp as app 303s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 303s from .connect import * # noqa: F403 303s ^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 303s from typing import TYPE_CHECKING, Any 303s File "", line 1360, in _find_and_load 303s File "", line 1331, in _find_and_load_unlocked 303s File "", line 935, in _load_unlocked 303s File "", line 1019, in exec_module 303s File "", line 1152, in get_code 303s File "", line 781, in _compile_bytecode 303s KeyboardInterrupt 303s ____________________ SessionAPITest.test_modify_kernel_name ____________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.820000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp4jnb4nv0/runtime/kernel-b03537e5-0d7a-45f8-95cd-0812a10a496b.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49367 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49359 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: b03537e5-0d7a-45f8-95cd-0812a10a496b, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmp4jnb4nv0/notebooks/foo'} 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0387f0e0-61e3-478a-bc36-dcef747d5f78 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0387f0e0-61e3-478a-bc36-dcef747d5f78 303s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 (::1) 15.040000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.520000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.790000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for b03537e5-0d7a-45f8-95cd-0812a10a496b 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b03537e5-0d7a-45f8-95cd-0812a10a496b 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/acb59231-a687-4f08-939d-10d96558bb00', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 303s yielded = self.gen.send(value) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 5, in 303s import re 303s File "/usr/lib/python3.13/re/__init__.py", line 126, in 303s from . import _compiler, _parser 303s File "/usr/lib/python3.13/re/_compiler.py", line 13, in 303s import _sre 303s File "", line 1357, in _find_and_load 303s File "", line 418, in __enter__ 303s File "", line 310, in acquire 303s KeyboardInterrupt 303s _______________________ SessionAPITest.test_modify_type ________________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/2cc0e0a7-4a39-4720-a4a3-b0276d68ee31 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp4jnb4nv0/runtime/kernel-5e5dded5-2ce6-40e1-9fbb-9c88201a9e35.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58445 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50859 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 5e5dded5-2ce6-40e1-9fbb-9c88201a9e35, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp4jnb4nv0/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.560000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/2cc0e0a7-4a39-4720-a4a3-b0276d68ee31 (::1) 2.440000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.250000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 5e5dded5-2ce6-40e1-9fbb-9c88201a9e35 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5e5dded5-2ce6-40e1-9fbb-9c88201a9e35 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/2cc0e0a7-4a39-4720-a4a3-b0276d68ee31 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/2cc0e0a7-4a39-4720-a4a3-b0276d68ee31', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 303s yielded = self.gen.send(value) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 303s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 303s stopper = ensure_async(km.shutdown_kernel(now, restart)) 303s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 303s return _runner_map[name].run(inner) 303s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 303s return fut.result(None) 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 303s return self.__get_result() 303s ~~~~~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 303s raise self._exception 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s --------------------------- Captured stderr teardown --------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 303s import functools 303s File "/usr/lib/python3.13/functools.py", line 18, in 303s from collections import namedtuple 303s File "/usr/lib/python3.13/collections/__init__.py", line 1121, in 303s class UserDict(_collections_abc.MutableMapping): 303s ...<89 lines>... 303s return d 303s File "/usr/lib/python3.13/abc.py", line 106, in __new__ 303s cls = super().__new__(mcls, name, bases, namespace, **kwargs) 303s KeyboardInterrupt 303s ---------------------------- Captured log teardown ----------------------------- 303s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5e5dded5-2ce6-40e1-9fbb-9c88201a9e35 303s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 303s _______________________ AsyncSessionAPITest.test_create ________________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/84793a86-a110-4067-9333-6f97d15784ed 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ------------------------------ Captured log setup ------------------------------ 303s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpsrdvjk6m/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpsrdvjk6m/etc/jupyter'] for config files 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpsrdvjk6m/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpsrdvjk6m/config 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpsrdvjk6m/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 303s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpsrdvjk6m/config 303s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpsrdvjk6m/notebooks 303s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 303s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 303s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 303s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 303s WARNING NotebookApp:handlers.py:612 Forbidden 303s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.500000ms referer=None 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.880000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpsrdvjk6m/runtime/kernel-2db63e6d-6986-46b0-8aaa-09cdb6be8f7f.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45675 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52221 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2db63e6d-6986-46b0-8aaa-09cdb6be8f7f, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpsrdvjk6m/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.430000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.770000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/84793a86-a110-4067-9333-6f97d15784ed (::1) 0.780000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.750000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2db63e6d-6986-46b0-8aaa-09cdb6be8f7f 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2db63e6d-6986-46b0-8aaa-09cdb6be8f7f 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/84793a86-a110-4067-9333-6f97d15784ed (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/84793a86-a110-4067-9333-6f97d15784ed', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/84793a86-a110-4067-9333-6f97d15784ed (::1) 8.270000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 303s from ipykernel import kernelapp as app 303s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 303s from .connect import * # noqa: F403 303s ^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 303s import json 303s File "/usr/lib/python3.13/json/__init__.py", line 106, in 303s from .decoder import JSONDecoder, JSONDecodeError 303s File "/usr/lib/python3.13/json/decoder.py", line 5, in 303s from json import scanner 303s File "/usr/lib/python3.13/json/scanner.py", line 11, in 303s NUMBER_RE = re.compile( 303s r'(-?(?:0|[1-9][0-9]*))(\.[0-9]+)?([eE][-+]?[0-9]+)?', 303s (re.VERBOSE | re.MULTILINE | re.DOTALL)) 303s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 303s return _compile(pattern, flags) 303s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 303s p = _compiler.compile(pattern, flags) 303s File "/usr/lib/python3.13/re/_compiler.py", line 748, in compile 303s p = _parser.parse(p, flags) 303s File "/usr/lib/python3.13/re/_parser.py", line 980, in parse 303s p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) 303s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 303s itemsappend(_parse(source, state, verbose, nested + 1, 303s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s not nested and not items)) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3.13/re/_parser.py", line 863, in _parse 303s p = _parse_sub(source, state, sub_verbose, nested + 1) 303s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 303s itemsappend(_parse(source, state, verbose, nested + 1, 303s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s not nested and not items)) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3.13/re/_parser.py", line 863, in _parse 303s p = _parse_sub(source, state, sub_verbose, nested + 1) 303s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 303s itemsappend(_parse(source, state, verbose, nested + 1, 303s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s not nested and not items)) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3.13/re/_parser.py", line 636, in _parse 303s subpatternappend((IN, set)) 303s ~~~~~~~~~~~~~~~~^^^^^^^^^^^ 303s File "/usr/lib/python3.13/re/_parser.py", line 175, in append 303s def append(self, code): 303s 303s KeyboardInterrupt 303s _______________ AsyncSessionAPITest.test_create_console_session ________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/e0a7b35b-2767-4a05-9856-662b75fbb2c3 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpsrdvjk6m/runtime/kernel-991df0f9-e63f-4734-9422-fff43a5a802f.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58559 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50661 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 991df0f9-e63f-4734-9422-fff43a5a802f, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpsrdvjk6m/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 14.740000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.840000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2db63e6d-6986-46b0-8aaa-09cdb6be8f7f 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2db63e6d-6986-46b0-8aaa-09cdb6be8f7f 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/84793a86-a110-4067-9333-6f97d15784ed (::1) 0.960000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 991df0f9-e63f-4734-9422-fff43a5a802f 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 991df0f9-e63f-4734-9422-fff43a5a802f 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/e0a7b35b-2767-4a05-9856-662b75fbb2c3 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/e0a7b35b-2767-4a05-9856-662b75fbb2c3', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/e0a7b35b-2767-4a05-9856-662b75fbb2c3 (::1) 8.230000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 303s from ._local import * 303s File "", line 1360, in _find_and_load 303s File "", line 1331, in _find_and_load_unlocked 303s File "", line 935, in _load_unlocked 303s File "", line 1019, in exec_module 303s File "", line 1152, in get_code 303s File "", line 781, in _compile_bytecode 303s KeyboardInterrupt 303s __________________ AsyncSessionAPITest.test_create_deprecated __________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/daed902e-539d-4442-8121-ea3717676887 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpsrdvjk6m/runtime/kernel-899bde12-8305-463f-a705-140debb408a5.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51919 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40607 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 899bde12-8305-463f-a705-140debb408a5, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpsrdvjk6m/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.260000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.780000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 991df0f9-e63f-4734-9422-fff43a5a802f 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 991df0f9-e63f-4734-9422-fff43a5a802f 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/e0a7b35b-2767-4a05-9856-662b75fbb2c3 (::1) 0.790000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 899bde12-8305-463f-a705-140debb408a5 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 899bde12-8305-463f-a705-140debb408a5 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/daed902e-539d-4442-8121-ea3717676887 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/daed902e-539d-4442-8121-ea3717676887', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/daed902e-539d-4442-8121-ea3717676887 (::1) 7.320000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 303s from ipykernel import kernelapp as app 303s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 1, in 303s from ._version import ( 303s ...<4 lines>... 303s ) 303s File "/usr/lib/python3/dist-packages/ipykernel/_version.py", line 11, in 303s match = re.match(pattern, __version__) 303s File "/usr/lib/python3.13/re/__init__.py", line 167, in match 303s return _compile(pattern, flags).match(string) 303s ~~~~~~~~^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 303s p = _compiler.compile(pattern, flags) 303s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 303s code = _code(p, flags) 303s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 303s _compile(code, p.data, flags) 303s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3.13/re/_compiler.py", line 126, in _compile 303s _compile(code, p, _combine_flags(flags, add_flags, del_flags)) 303s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3.13/re/_compiler.py", line 56, in _compile 303s for op, av in pattern: 303s ^^^^^^^ 303s File "/usr/lib/python3.13/re/_parser.py", line 167, in __getitem__ 303s def __getitem__(self, index): 303s 303s KeyboardInterrupt 303s _________________ AsyncSessionAPITest.test_create_file_session _________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/bea0f756-81e8-4738-8b28-0407687b103f 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpsrdvjk6m/runtime/kernel-1acca1ea-e0b8-4511-a0f1-db6494b5ca3a.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49641 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60579 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 1acca1ea-e0b8-4511-a0f1-db6494b5ca3a, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpsrdvjk6m/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.110000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.740000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 899bde12-8305-463f-a705-140debb408a5 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 899bde12-8305-463f-a705-140debb408a5 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/daed902e-539d-4442-8121-ea3717676887 (::1) 0.830000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 1acca1ea-e0b8-4511-a0f1-db6494b5ca3a 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1acca1ea-e0b8-4511-a0f1-db6494b5ca3a 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/bea0f756-81e8-4738-8b28-0407687b103f (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/bea0f756-81e8-4738-8b28-0407687b103f', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 5, in 303s import re 303s File "/usr/lib/python3.13/re/__init__.py", line 381, in 303s import copyreg 303s File "", line 1360, in _find_and_load 303s File "", line 1331, in _find_and_load_unlocked 303s File "", line 935, in _load_unlocked 303s File "", line 1019, in exec_module 303s File "", line 1152, in get_code 303s File "", line 781, in _compile_bytecode 303s KeyboardInterrupt 303s ________________ AsyncSessionAPITest.test_create_with_kernel_id ________________ 303s 303s self = 303s 303s def test_create_with_kernel_id(self): 303s # create a new kernel 303s r = self.request('POST', 'api/kernels') 303s r.raise_for_status() 303s kernel = r.json() 303s 303s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 303s self.assertEqual(resp.status_code, 201) 303s newsession = resp.json() 303s self.assertIn('id', newsession) 303s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 303s self.assertEqual(newsession['kernel']['id'], kernel['id']) 303s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 303s 303s sessions = self.sess_api.list().json() 303s > self.assertEqual(sessions, [newsession]) 303s E AssertionError: Lists differ: [{'id': 'bea0f756-81e8-4738-8b28-0407687b103f', 'p[553 chars]ne}}] != [{'id': '541c6d25-b52d-4a84-8082-f6c37951dbc0', 'p[279 chars]ne}}] 303s E 303s E First differing element 0: 303s E {'id': 'bea0f756-81e8-4738-8b28-0407687b103f', 'p[218 chars]: 0}} 303s E {'id': '541c6d25-b52d-4a84-8082-f6c37951dbc0', 'p[278 chars]one}} 303s E 303s E First list contains 1 additional elements. 303s E First extra element 1: 303s E {'id': '541c6d25-b52d-4a84-8082-f6c37951dbc0', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '9150de3b-e1ee-467a-a4db-71ebadea335b', 'name': 'python3', 'last_activity': '2026-02-06T02:22:02.980635Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 303s E 303s E Diff is 830 characters long. Set self.maxDiff to None to see it. 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpsrdvjk6m/runtime/kernel-9150de3b-e1ee-467a-a4db-71ebadea335b.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54821 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40805 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 9150de3b-e1ee-467a-a4db-71ebadea335b, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.030000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 1.970000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.600000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.620000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 1acca1ea-e0b8-4511-a0f1-db6494b5ca3a 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1acca1ea-e0b8-4511-a0f1-db6494b5ca3a 303s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/bea0f756-81e8-4738-8b28-0407687b103f (::1) 2.140000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9150de3b-e1ee-467a-a4db-71ebadea335b 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9150de3b-e1ee-467a-a4db-71ebadea335b 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 (::1) 7.510000ms referer=None 303s __________________ AsyncSessionAPITest.test_modify_kernel_id ___________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 2.270000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpsrdvjk6m/runtime/kernel-8a0f32de-b708-4c65-b0cc-be50b8365cc5.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35207 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47033 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8a0f32de-b708-4c65-b0cc-be50b8365cc5, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.670000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 9150de3b-e1ee-467a-a4db-71ebadea335b 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9150de3b-e1ee-467a-a4db-71ebadea335b 303s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 (::1) 1.130000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.530000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.560000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8a0f32de-b708-4c65-b0cc-be50b8365cc5 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8a0f32de-b708-4c65-b0cc-be50b8365cc5 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 303s from ._local import * 303s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 303s class PureWindowsPath(PurePath): 303s ...<7 lines>... 303s __slots__ = () 303s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 303s import ntpath 303s File "/usr/lib/python3.13/ntpath.py", line 45, in 303s from _winapi import ( 303s ...<2 lines>... 303s LCMAP_LOWERCASE as _LCMAP_LOWERCASE) 303s File "", line 1360, in _find_and_load 303s File "", line 1322, in _find_and_load_unlocked 303s File "", line 1262, in _find_spec 303s File "", line 1556, in find_spec 303s File "", line 1530, in _get_spec 303s File "", line 1661, in find_spec 303s KeyboardInterrupt 303s _________________ AsyncSessionAPITest.test_modify_kernel_name __________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.810000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpsrdvjk6m/runtime/kernel-e12b8a78-add2-496f-9211-04a5ec44ef33.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52317 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59819 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: e12b8a78-add2-496f-9211-04a5ec44ef33, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpsrdvjk6m/notebooks/foo'} 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8a0f32de-b708-4c65-b0cc-be50b8365cc5 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8a0f32de-b708-4c65-b0cc-be50b8365cc5 303s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 (::1) 16.500000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.580000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.840000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e12b8a78-add2-496f-9211-04a5ec44ef33 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e12b8a78-add2-496f-9211-04a5ec44ef33 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/541c6d25-b52d-4a84-8082-f6c37951dbc0', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s --------------------------- Captured stderr teardown --------------------------- 303s Traceback (most recent call last): 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 5, in 303s import re 303s File "/usr/lib/python3.13/re/__init__.py", line 125, in 303s import enum 303s File "/usr/lib/python3.13/enum.py", line 1932, in 303s @_simple_enum(StrEnum) 303s ~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.13/enum.py", line 1794, in convert_class 303s if _is_dunder(name) or _is_private(cls_name, name) or _is_sunder(name) or _is_descriptor(obj): 303s ~~~~~~~~~~^^^^^^ 303s File "/usr/lib/python3.13/enum.py", line 58, in _is_sunder 303s def _is_sunder(name): 303s 303s KeyboardInterrupt 303s _____________________ AsyncSessionAPITest.test_modify_type _____________________ 303s 303s @self.addCleanup 303s def cleanup_sessions(): 303s for session in self.sess_api.list().json(): 303s > self.sess_api.delete(session['id']) 303s 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 303s return self._req('DELETE', id) 303s ^^^^^^^^^^^^^^^^^^^^^^^ 303s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 303s response.raise_for_status() 303s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 303s 303s self = 303s 303s def raise_for_status(self): 303s """Raises :class:`HTTPError`, if one occurred.""" 303s 303s http_error_msg = "" 303s if isinstance(self.reason, bytes): 303s # We attempt to decode utf-8 first because some servers 303s # choose to localize their reason strings. If the string 303s # isn't utf-8, we fall back to iso-8859-1 for all other 303s # encodings. (See PR #3538) 303s try: 303s reason = self.reason.decode("utf-8") 303s except UnicodeDecodeError: 303s reason = self.reason.decode("iso-8859-1") 303s else: 303s reason = self.reason 303s 303s if 400 <= self.status_code < 500: 303s http_error_msg = ( 303s f"{self.status_code} Client Error: {reason} for url: {self.url}" 303s ) 303s 303s elif 500 <= self.status_code < 600: 303s http_error_msg = ( 303s f"{self.status_code} Server Error: {reason} for url: {self.url}" 303s ) 303s 303s if http_error_msg: 303s > raise HTTPError(http_error_msg, response=self) 303s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/61cc2cad-ba74-4c0d-b414-62ec869216d7 303s 303s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 303s ----------------------------- Captured stderr call ----------------------------- 303s Traceback (most recent call last): 303s ------------------------------ Captured log call ------------------------------- 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 303s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpsrdvjk6m/runtime/kernel-8ea9f4af-acf8-4dc3-bbc0-99451cea8f4c.json'] 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41325 303s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58161 303s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8ea9f4af-acf8-4dc3-bbc0-99451cea8f4c, name: python3 303s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpsrdvjk6m/notebooks/foo'} 303s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 14.750000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/61cc2cad-ba74-4c0d-b414-62ec869216d7 (::1) 0.900000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.650000ms 303s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 303s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8ea9f4af-acf8-4dc3-bbc0-99451cea8f4c 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8ea9f4af-acf8-4dc3-bbc0-99451cea8f4c 303s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/61cc2cad-ba74-4c0d-b414-62ec869216d7 (::1) 303s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/61cc2cad-ba74-4c0d-b414-62ec869216d7', version='HTTP/1.1', remote_ip='::1') 303s Traceback (most recent call last): 303s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 303s result = await result 303s ^^^^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 303s future.result() 303s ~~~~~~~~~~~~~^^ 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 303s yield maybe_future(sm.delete_session(session_id)) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 303s yielded = self.gen.throw(exc) 303s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 303s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 303s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 303s value = future.result() 303s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 303s raise self._exception.with_traceback(self._exception_tb) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 303s result = coro.send(None) 303s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 303s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 303s raise km.ready.exception() # type: ignore[misc] 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 303s await kernel_awaitable 303s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 303s result = await obj 303s ^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 303s raise e 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 303s out = await method(self, *args, **kwargs) 303s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 303s await self._async_finish_shutdown(restart=restart) 303s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 303s await asyncio.wait_for( 303s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 303s ) 303s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 303s async with timeouts.timeout(timeout): 303s ~~~~~~~~~~~~~~~~^^^^^^^^^ 303s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 303s raise RuntimeError("Timeout should be used inside a task") 303s RuntimeError: Timeout should be used inside a task 303s WARNING NotebookApp:handlers.py:612 Unhandled error 303s ERROR NotebookApp:log.py:55 { 303s "Host": "localhost:12341", 303s "Accept": "*/*", 303s "User-Agent": "python-requests/2.32.5" 303s } 303s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/61cc2cad-ba74-4c0d-b414-62ec869216d7 (::1) 8.290000ms referer=None 303s --------------------------- Captured stderr teardown --------------------------- 303s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 303s return _run_code(code, main_globals, None, 303s "__main__", mod_spec) 303s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 303s exec(code, run_globals) 303s ~~~~^^^^^^^^^^^^^^^^^^^ 303s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 303s from pathlib import Path 303s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 303s from ._abc import * 303s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 303s from glob import _Globber, _no_recurse_symlinks 303s File "/usr/lib/python3.13/glob.py", line 5, in 303s import re 303s File "/usr/lib/python3.13/re/__init__.py", line 126, in 303s from . import _compiler, _parser 303s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 303s from . import _parser 303s File "/usr/lib/python3.13/re/_parser.py", line 20, in 303s DIGITS = frozenset("0123456789") 303s KeyboardInterrupt 303s ---------------------------- Captured log teardown ----------------------------- 303s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e12b8a78-add2-496f-9211-04a5ec44ef33 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 899bde12-8305-463f-a705-140debb408a5 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 9150de3b-e1ee-467a-a4db-71ebadea335b 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1acca1ea-e0b8-4511-a0f1-db6494b5ca3a 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8a0f32de-b708-4c65-b0cc-be50b8365cc5 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8ea9f4af-acf8-4dc3-bbc0-99451cea8f4c 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 991df0f9-e63f-4734-9422-fff43a5a802f 303s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2db63e6d-6986-46b0-8aaa-09cdb6be8f7f 303s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 303s =============================== warnings summary =============================== 303s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 303s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 303s /usr/lib/python3/dist-packages/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. 303s return LooseVersion(v) >= LooseVersion(check) 303s 303s ../../../usr/lib/python3/dist-packages/notebook/_tz.py:29: 1 warning 303s services/kernels/tests/test_kernels_api.py: 73 warnings 303s services/sessions/tests/test_sessions_api.py: 106 warnings 303s /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). 303s dt = unaware(*args, **kwargs) 303s 303s ../../../usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14 303s /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 303s pytestmark = pytest.mark.integration_tests 303s 303s services/kernels/tests/test_kernels_api.py: 6 warnings 303s services/sessions/tests/test_sessions_api.py: 6 warnings 303s /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 303s policy = events.get_event_loop_policy() 303s 303s services/kernels/tests/test_kernels_api.py: 24 warnings 303s services/sessions/tests/test_sessions_api.py: 19 warnings 303s /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 303s loop = events.get_event_loop_policy().get_event_loop() 303s 303s services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 303s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first 303s loop.make_current() 303s 303s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 303s =========================== short test summary info ============================ 303s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_default_kernel 303s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_kernel_handler 303s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 303s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_no_kernels 303s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 303s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_default_kernel 303s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_kernel_handler 303s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 303s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_no_kernels 303s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 303s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_console_session 303s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_deprecated 303s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_file_session 303s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 303s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 303s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 303s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_type 303s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create 303s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_console_session 303s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_deprecated 303s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_file_session 303s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 303s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 303s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 303s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_type 303s ERROR services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 303s ERROR services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 303s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 303s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 303s ===== 25 failed, 2 passed, 303 deselected, 239 warnings, 4 errors in 7.22s ===== 304s *** END OF RUN 2: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 304s *** 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 308s ============================= test session starts ============================== 308s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 308s rootdir: /tmp/autopkgtest.tpx4mW/autopkgtest_tmp 308s plugins: typeguard-4.4.4 308s collected 330 items / 305 deselected / 25 selected 308s run-last-failure: rerun previous 25 failures 308s 309s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF [ 36%] 311s services/sessions/tests/test_sessions_api.py FFFFFEFF.FFFFFEFF. [100%] 311s 311s ==================================== ERRORS ==================================== 311s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 311s 311s self = 311s 311s def tearDown(self): 311s for k in self.kern_api.list().json(): 311s > self.kern_api.shutdown(k['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/c44b7dce-8823-4d6a-a8d9-a48765c236f1 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 311s from ._abc import * 311s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 311s from glob import _Globber, _no_recurse_symlinks 311s File "/usr/lib/python3.13/glob.py", line 5, in 311s import re 311s File "/usr/lib/python3.13/re/__init__.py", line 126, in 311s from . import _compiler, _parser 311s File "", line 1360, in _find_and_load 311s File "", line 1331, in _find_and_load_unlocked 311s File "", line 935, in _load_unlocked 311s File "", line 1019, in exec_module 311s File "", line 1152, in get_code 311s File "", line 781, in _compile_bytecode 311s KeyboardInterrupt 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp235_s1nx/runtime/kernel-c44b7dce-8823-4d6a-a8d9-a48765c236f1.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33539 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35463 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: c44b7dce-8823-4d6a-a8d9-a48765c236f1, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 19.130000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.500000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp235_s1nx/runtime/kernel-d02d8b49-2a1f-4cd7-a164-61e2ebd2448e.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37141 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33351 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: d02d8b49-2a1f-4cd7-a164-61e2ebd2448e, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.510000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.590000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: d02d8b49-2a1f-4cd7-a164-61e2ebd2448e 311s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/d02d8b49-2a1f-4cd7-a164-61e2ebd2448e/interrupt (::1) 2.070000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 311s yield maybe_future(km.restart_kernel(kernel_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 311s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 311s await ensure_async(kernel.restart_kernel(now=now)) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 311s await self._async_shutdown_kernel(now=now, restart=True) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/d02d8b49-2a1f-4cd7-a164-61e2ebd2448e/restart (::1) 8.260000ms referer=None 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.920000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c44b7dce-8823-4d6a-a8d9-a48765c236f1 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c44b7dce-8823-4d6a-a8d9-a48765c236f1 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/c44b7dce-8823-4d6a-a8d9-a48765c236f1 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/c44b7dce-8823-4d6a-a8d9-a48765c236f1', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 311s yielded = ctx_run(next, result) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 311s yield maybe_future(km.shutdown_kernel(kernel_id)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 311s import jupyter_client 311s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 311s from .asynchronous import AsyncKernelClient 311s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 311s from .client import AsyncKernelClient # noqa 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 311s import zmq.asyncio 311s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 311s import asyncio 311s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 311s from .base_events import * 311s File "/usr/lib/python3.13/asyncio/base_events.py", line 34, in 311s import ssl 311s File "/usr/lib/python3.13/ssl.py", line 100, in 311s import _ssl # if we can't import it, let the error propagate 311s ^^^^^^^^^^^ 311s KeyboardInterrupt 311s _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 311s 311s self = 311s 311s def tearDown(self): 311s for k in self.kern_api.list().json(): 311s > self.kern_api.shutdown(k['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/632bc134-b922-43d5-a645-ef34e7d820cf 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 311s from ._abc import * 311s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 311s from glob import _Globber, _no_recurse_symlinks 311s File "", line 1360, in _find_and_load 311s File "", line 1322, in _find_and_load_unlocked 311s File "", line 1262, in _find_spec 311s File "", line 1556, in find_spec 311s File "", line 1530, in _get_spec 311s File "", line 1629, in find_spec 311s File "", line 152, in _path_stat 311s KeyboardInterrupt 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkyuzp_7c/runtime/kernel-632bc134-b922-43d5-a645-ef34e7d820cf.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59401 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39257 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 632bc134-b922-43d5-a645-ef34e7d820cf, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.200000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.500000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkyuzp_7c/runtime/kernel-67169fc7-90c3-4764-a5e1-94b378e2c99a.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40817 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48171 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 67169fc7-90c3-4764-a5e1-94b378e2c99a, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 17.670000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 67169fc7-90c3-4764-a5e1-94b378e2c99a 311s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/67169fc7-90c3-4764-a5e1-94b378e2c99a/interrupt (::1) 0.630000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 311s yield maybe_future(km.restart_kernel(kernel_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 311s result = coro.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 311s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 311s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 311s yield self # This tells Task to wait for completion. 311s ^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 311s await ensure_async(kernel.restart_kernel(now=now)) 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 311s await self._async_shutdown_kernel(now=now, restart=True) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/67169fc7-90c3-4764-a5e1-94b378e2c99a/restart (::1) 7.790000ms referer=None 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.850000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 632bc134-b922-43d5-a645-ef34e7d820cf 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 632bc134-b922-43d5-a645-ef34e7d820cf 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/632bc134-b922-43d5-a645-ef34e7d820cf (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/632bc134-b922-43d5-a645-ef34e7d820cf', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 311s yield maybe_future(km.shutdown_kernel(kernel_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/632bc134-b922-43d5-a645-ef34e7d820cf (::1) 6.440000ms referer=None 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 311s import jupyter_client 311s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 311s from .asynchronous import AsyncKernelClient 311s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 311s from .client import AsyncKernelClient # noqa 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 311s import zmq.asyncio 311s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 311s import asyncio 311s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 311s from .base_events import * 311s File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in 311s import concurrent.futures 311s File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in 311s from concurrent.futures._base import (FIRST_COMPLETED, 311s ...<9 lines>... 311s as_completed) 311s File "/usr/lib/python3.13/concurrent/futures/_base.py", line 7, in 311s import logging 311s File "/usr/lib/python3.13/logging/__init__.py", line 477, in 311s class StrFormatStyle(PercentStyle): 311s ...<30 lines>... 311s raise ValueError('invalid format: no fields') 311s File "/usr/lib/python3.13/logging/__init__.py", line 482, in StrFormatStyle 311s fmt_spec = re.compile(r'^(.?[<>=^])?[+ -]?#?0?(\d+|{\w+})?[,_]?(\.(\d+|{\w+}))?[bcdefgnosx%]?$', re.I) 311s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 311s return _compile(pattern, flags) 311s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 311s p = _compiler.compile(pattern, flags) 311s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 311s code = _code(p, flags) 311s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 311s _compile(code, p.data, flags) 311s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3.13/re/_compiler.py", line 109, in _compile 311s _compile(code, av[2], flags) 311s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3.13/re/_compiler.py", line 86, in _compile 311s charset, hascased = _optimize_charset(av, iscased, tolower, fixes) 311s ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3.13/re/_compiler.py", line 379, in _optimize_charset 311s data += chunk 311s ^^^^ 311s KeyboardInterrupt 311s ________ ERROR at teardown of SessionAPITest.test_create_with_kernel_id ________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp17tu_osl/runtime/kernel-3fce4996-cc7c-4705-9cbe-8a157da5e2b7.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54001 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36679 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3fce4996-cc7c-4705-9cbe-8a157da5e2b7, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.330000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.770000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.560000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.560000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dfd2a2ae-87e5-4033-8724-cccf1de43915 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dfd2a2ae-87e5-4033-8724-cccf1de43915 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/218be679-d506-4e14-b2b2-d4850ff673ec (::1) 1.880000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3fce4996-cc7c-4705-9cbe-8a157da5e2b7 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3fce4996-cc7c-4705-9cbe-8a157da5e2b7 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 311s yielded = self.gen.send(value) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 311s import json 311s File "/usr/lib/python3.13/json/__init__.py", line 107, in 311s from .encoder import JSONEncoder 311s File "/usr/lib/python3.13/json/encoder.py", line 20, in 311s HAS_UTF8 = re.compile(b'[\x80-\xff]') 311s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 311s return _compile(pattern, flags) 311s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 311s p = _compiler.compile(pattern, flags) 311s File "/usr/lib/python3.13/re/_compiler.py", line 748, in compile 311s p = _parser.parse(p, flags) 311s File "/usr/lib/python3.13/re/_parser.py", line 980, in parse 311s p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) 311s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 311s itemsappend(_parse(source, state, verbose, nested + 1, 311s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s not nested and not items)) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3.13/re/_parser.py", line 608, in _parse 311s code2 = LITERAL, _ord(that) 311s ~~~~^^^^^^ 311s KeyboardInterrupt 311s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_kernel_id ______ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc32sc5zw/runtime/kernel-f9b36909-4e5b-468c-a9e1-29e0f39c27c0.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41185 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53833 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: f9b36909-4e5b-468c-a9e1-29e0f39c27c0, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.450000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.720000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.560000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.800000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 264ba335-5a19-408c-b555-7035e251599e 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 264ba335-5a19-408c-b555-7035e251599e 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/a825cfcf-ce4e-4a99-876a-09e3e0175744 (::1) 1.910000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f9b36909-4e5b-468c-a9e1-29e0f39c27c0 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f9b36909-4e5b-468c-a9e1-29e0f39c27c0 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 311s import json 311s File "/usr/lib/python3.13/json/__init__.py", line 106, in 311s from .decoder import JSONDecoder, JSONDecodeError 311s File "/usr/lib/python3.13/json/decoder.py", line 5, in 311s from json import scanner 311s File "/usr/lib/python3.13/json/scanner.py", line 13, in 311s (re.VERBOSE | re.MULTILINE | re.DOTALL)) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ 311s File "/usr/lib/python3.13/enum.py", line 1605, in __or__ 311s return self.__class__(value | other_value) 311s ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3.13/enum.py", line 726, in __call__ 311s return cls.__new__(cls, value) 311s ~~~~~~~~~~~^^^^^^^^^^^^ 311s File "/usr/lib/python3.13/enum.py", line 1188, in __new__ 311s result = cls._missing_(value) 311s File "/usr/lib/python3.13/enum.py", line 1527, in _missing_ 311s combined_value |= m._value_ 311s ^^^^^^^^^^^^^^ 311s KeyboardInterrupt 311s =================================== FAILURES =================================== 311s ______________________ KernelAPITest.test_default_kernel _______________________ 311s 311s self = 311s 311s def tearDown(self): 311s for k in self.kern_api.list().json(): 311s > self.kern_api.shutdown(k['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/a08b46b1-afc6-4b43-9539-316403e51dc1 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ------------------------------ Captured log setup ------------------------------ 311s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp235_s1nx/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp235_s1nx/etc/jupyter'] for config files 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp235_s1nx/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp235_s1nx/config 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp235_s1nx/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp235_s1nx/config 311s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp235_s1nx/notebooks 311s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 311s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 311s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 311s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 311s WARNING NotebookApp:handlers.py:612 Forbidden 311s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.740000ms referer=None 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 311s from ._local import * 311s File "/usr/lib/python3.13/pathlib/_local.py", line 6, in 311s import warnings 311s KeyboardInterrupt 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp235_s1nx/runtime/kernel-a08b46b1-afc6-4b43-9539-316403e51dc1.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45427 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54763 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: a08b46b1-afc6-4b43-9539-316403e51dc1, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 62.200000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.790000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a08b46b1-afc6-4b43-9539-316403e51dc1 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a08b46b1-afc6-4b43-9539-316403e51dc1 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/a08b46b1-afc6-4b43-9539-316403e51dc1 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/a08b46b1-afc6-4b43-9539-316403e51dc1', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 311s yielded = ctx_run(next, result) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 311s yield maybe_future(km.shutdown_kernel(kernel_id)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/a08b46b1-afc6-4b43-9539-316403e51dc1 (::1) 12.980000ms referer=None 311s ______________________ KernelAPITest.test_kernel_handler _______________________ 311s 311s self = 311s 311s def test_kernel_handler(self): 311s # GET kernel with given id 311s kid = self.kern_api.start().json()['id'] 311s r = self.kern_api.get(kid) 311s kern1 = r.json() 311s self.assertEqual(r.status_code, 200) 311s assert isinstance(kern1, dict) 311s self.assertIn('id', kern1) 311s self.assertEqual(kern1['id'], kid) 311s 311s # Request a bad kernel id and check that a JSON 311s # message is returned! 311s bad_id = '111-111-111-111-111' 311s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 311s self.kern_api.get(bad_id) 311s 311s # DELETE kernel with id 311s > r = self.kern_api.shutdown(kid) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/c900e069-2077-4ee0-8d6c-9f32ea92a19e 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 311s import json 311s File "/usr/lib/python3.13/json/__init__.py", line 106, in 311s from .decoder import JSONDecoder, JSONDecodeError 311s File "/usr/lib/python3.13/json/decoder.py", line 5, in 311s from json import scanner 311s File "", line 1360, in _find_and_load 311s File "", line 1322, in _find_and_load_unlocked 311s File "", line 1262, in _find_spec 311s File "", line 1556, in find_spec 311s File "", line 1530, in _get_spec 311s File "", line 1627, in find_spec 311s KeyboardInterrupt 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp235_s1nx/runtime/kernel-c900e069-2077-4ee0-8d6c-9f32ea92a19e.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42313 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43195 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: c900e069-2077-4ee0-8d6c-9f32ea92a19e, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 17.260000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/c900e069-2077-4ee0-8d6c-9f32ea92a19e (::1) 0.550000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1): Kernel does not exist: 111-111-111-111-111 311s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 311s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1) 1.790000ms referer=None 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c900e069-2077-4ee0-8d6c-9f32ea92a19e 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c900e069-2077-4ee0-8d6c-9f32ea92a19e 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/c900e069-2077-4ee0-8d6c-9f32ea92a19e (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/c900e069-2077-4ee0-8d6c-9f32ea92a19e', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 311s yielded = ctx_run(next, result) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 311s yield maybe_future(km.shutdown_kernel(kernel_id)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/c900e069-2077-4ee0-8d6c-9f32ea92a19e (::1) 12.250000ms referer=None 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.520000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a08b46b1-afc6-4b43-9539-316403e51dc1 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a08b46b1-afc6-4b43-9539-316403e51dc1 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/a08b46b1-afc6-4b43-9539-316403e51dc1 (::1) 1.960000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c900e069-2077-4ee0-8d6c-9f32ea92a19e 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c900e069-2077-4ee0-8d6c-9f32ea92a19e 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/c900e069-2077-4ee0-8d6c-9f32ea92a19e (::1) 0.740000ms 311s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 311s 311s self = 311s 311s def test_main_kernel_handler(self): 311s # POST request 311s r = self.kern_api.start() 311s kern1 = r.json() 311s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 311s self.assertEqual(r.status_code, 201) 311s self.assertIsInstance(kern1, dict) 311s 311s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 311s expected_csp = '; '.join([ 311s "frame-ancestors 'self'", 311s 'report-uri ' + report_uri, 311s "default-src 'none'" 311s ]) 311s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 311s 311s # GET request 311s r = self.kern_api.list() 311s self.assertEqual(r.status_code, 200) 311s assert isinstance(r.json(), list) 311s self.assertEqual(r.json()[0]['id'], kern1['id']) 311s self.assertEqual(r.json()[0]['name'], kern1['name']) 311s 311s # create another kernel and check that they both are added to the 311s # list of kernels from a GET request 311s kern2 = self.kern_api.start().json() 311s assert isinstance(kern2, dict) 311s r = self.kern_api.list() 311s kernels = r.json() 311s self.assertEqual(r.status_code, 200) 311s assert isinstance(kernels, list) 311s self.assertEqual(len(kernels), 2) 311s 311s # Interrupt a kernel 311s r = self.kern_api.interrupt(kern2['id']) 311s self.assertEqual(r.status_code, 204) 311s 311s # Restart a kernel 311s > r = self.kern_api.restart(kern2['id']) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 311s return self._req('POST', url_path_join(id, 'restart')) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/d02d8b49-2a1f-4cd7-a164-61e2ebd2448e/restart 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 311s from ._abc import * 311s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 311s from glob import _Globber, _no_recurse_symlinks 311s File "/usr/lib/python3.13/glob.py", line 5, in 311s import re 311s File "/usr/lib/python3.13/re/__init__.py", line 126, in 311s from . import _compiler, _parser 311s File "", line 1360, in _find_and_load 311s File "", line 1331, in _find_and_load_unlocked 311s File "", line 935, in _load_unlocked 311s File "", line 1019, in exec_module 311s File "", line 1152, in get_code 311s File "", line 781, in _compile_bytecode 311s KeyboardInterrupt 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp235_s1nx/runtime/kernel-c44b7dce-8823-4d6a-a8d9-a48765c236f1.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33539 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35463 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: c44b7dce-8823-4d6a-a8d9-a48765c236f1, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 19.130000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.500000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp235_s1nx/runtime/kernel-d02d8b49-2a1f-4cd7-a164-61e2ebd2448e.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37141 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33351 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: d02d8b49-2a1f-4cd7-a164-61e2ebd2448e, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.510000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.590000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: d02d8b49-2a1f-4cd7-a164-61e2ebd2448e 311s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/d02d8b49-2a1f-4cd7-a164-61e2ebd2448e/interrupt (::1) 2.070000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 311s yield maybe_future(km.restart_kernel(kernel_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 311s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 311s await ensure_async(kernel.restart_kernel(now=now)) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 311s await self._async_shutdown_kernel(now=now, restart=True) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/d02d8b49-2a1f-4cd7-a164-61e2ebd2448e/restart (::1) 8.260000ms referer=None 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.920000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c44b7dce-8823-4d6a-a8d9-a48765c236f1 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c44b7dce-8823-4d6a-a8d9-a48765c236f1 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/c44b7dce-8823-4d6a-a8d9-a48765c236f1 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/c44b7dce-8823-4d6a-a8d9-a48765c236f1', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 311s yielded = ctx_run(next, result) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 311s yield maybe_future(km.shutdown_kernel(kernel_id)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ________________________ KernelAPITest.test_no_kernels _________________________ 311s 311s self = 311s 311s def test_no_kernels(self): 311s """Make sure there are no kernels running at the start""" 311s kernels = self.kern_api.list().json() 311s > self.assertEqual(kernels, []) 311s E AssertionError: Lists differ: [{'id': 'c44b7dce-8823-4d6a-a8d9-a48765c23[281 chars]: 0}] != [] 311s E 311s E First list contains 2 additional elements. 311s E First extra element 0: 311s E {'id': 'c44b7dce-8823-4d6a-a8d9-a48765c236f1', 'name': 'python3', 'last_activity': '2026-02-06T02:22:08.621592Z', 'execution_state': 'starting', 'connections': 0} 311s E 311s E + [] 311s E - [{'connections': 0, 311s E - 'execution_state': 'starting', 311s E - 'id': 'c44b7dce-8823-4d6a-a8d9-a48765c236f1', 311s E - 'last_activity': '2026-02-06T02:22:08.621592Z', 311s E - 'name': 'python3'}, 311s E - {'connections': 0, 311s E - 'execution_state': 'starting', 311s E - 'id': 'd02d8b49-2a1f-4cd7-a164-61e2ebd2448e', 311s E - 'last_activity': '2026-02-06T02:22:08.640341Z', 311s E - 'name': 'python3'}] 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.570000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.480000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c44b7dce-8823-4d6a-a8d9-a48765c236f1 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c44b7dce-8823-4d6a-a8d9-a48765c236f1 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/c44b7dce-8823-4d6a-a8d9-a48765c236f1 (::1) 0.660000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for d02d8b49-2a1f-4cd7-a164-61e2ebd2448e 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: d02d8b49-2a1f-4cd7-a164-61e2ebd2448e 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/d02d8b49-2a1f-4cd7-a164-61e2ebd2448e (::1) 0.750000ms 311s ---------------------------- Captured log teardown ----------------------------- 311s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 311s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 311s _____________________ AsyncKernelAPITest.test_connections ______________________ 311s 311s self = 311s 311s def tearDown(self): 311s for k in self.kern_api.list().json(): 311s > self.kern_api.shutdown(k['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ------------------------------ Captured log setup ------------------------------ 311s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpkyuzp_7c/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpkyuzp_7c/etc/jupyter'] for config files 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpkyuzp_7c/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpkyuzp_7c/config 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpkyuzp_7c/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpkyuzp_7c/config 311s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpkyuzp_7c/notebooks 311s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 311s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 311s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 311s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 311s WARNING NotebookApp:handlers.py:612 Forbidden 311s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.460000ms referer=None 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkyuzp_7c/runtime/kernel-da9e839b-f066-437e-a53a-ce1309aa0510.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38377 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49941 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: da9e839b-f066-437e-a53a-ce1309aa0510, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.490000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510 (::1) 0.580000ms 311s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510/channels 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 311s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from da9e839b-f066-437e-a53a-ce1309aa0510 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43881 311s DEBUG NotebookApp:kernelmanager.py:423 activity on da9e839b-f066-437e-a53a-ce1309aa0510: status (starting) 311s DEBUG NotebookApp:kernelmanager.py:423 activity on da9e839b-f066-437e-a53a-ce1309aa0510: status (busy) 311s 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/'}]} 311s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel da9e839b-f066-437e-a53a-ce1309aa0510) to 5.4 (client). 311s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510/channels (::1) 500.240000ms 311s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510/channels 311s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for da9e839b-f066-437e-a53a-ce1309aa0510 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49941 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43881 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38377 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48207 311s DEBUG NotebookApp:handlers.py:156 Nudge: not nudging busy kernel da9e839b-f066-437e-a53a-ce1309aa0510 311s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 311s Setting websocket_ping_timeout=30000 311s DEBUG NotebookApp:kernelmanager.py:423 activity on da9e839b-f066-437e-a53a-ce1309aa0510: status (idle) 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510 (::1) 0.590000ms 311s DEBUG NotebookApp:handlers.py:579 Websocket closed da9e839b-f066-437e-a53a-ce1309aa0510:5993af28-e22cca7be3e7742b9299f599 311s INFO NotebookApp:kernelmanager.py:222 Starting buffering for da9e839b-f066-437e-a53a-ce1309aa0510:5993af28-e22cca7be3e7742b9299f599 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for da9e839b-f066-437e-a53a-ce1309aa0510 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510 (::1) 0.480000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510 (::1) 1.670000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.480000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for da9e839b-f066-437e-a53a-ce1309aa0510 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: da9e839b-f066-437e-a53a-ce1309aa0510 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 311s yield maybe_future(km.shutdown_kernel(kernel_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 311s 311s self = 311s 311s def tearDown(self): 311s for k in self.kern_api.list().json(): 311s > self.kern_api.shutdown(k['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/3db21718-9cd3-4041-b483-9caca3a11190 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkyuzp_7c/runtime/kernel-3db21718-9cd3-4041-b483-9caca3a11190.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57893 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37377 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3db21718-9cd3-4041-b483-9caca3a11190, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 19.430000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.930000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for da9e839b-f066-437e-a53a-ce1309aa0510 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: da9e839b-f066-437e-a53a-ce1309aa0510 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/da9e839b-f066-437e-a53a-ce1309aa0510 (::1) 0.640000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3db21718-9cd3-4041-b483-9caca3a11190 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3db21718-9cd3-4041-b483-9caca3a11190 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/3db21718-9cd3-4041-b483-9caca3a11190 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/3db21718-9cd3-4041-b483-9caca3a11190', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 311s yield maybe_future(km.shutdown_kernel(kernel_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/3db21718-9cd3-4041-b483-9caca3a11190 (::1) 14.950000ms referer=None 311s --------------------------- Captured stderr teardown --------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 311s from ._abc import * 311s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 311s from glob import _Globber, _no_recurse_symlinks 311s File "/usr/lib/python3.13/glob.py", line 5, in 311s import re 311s File "/usr/lib/python3.13/re/__init__.py", line 125, in 311s import enum 311s File "", line 1360, in _find_and_load 311s File "", line 1331, in _find_and_load_unlocked 311s File "", line 935, in _load_unlocked 311s File "", line 1019, in exec_module 311s File "", line 1152, in get_code 311s File "", line 781, in _compile_bytecode 311s KeyboardInterrupt 311s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 311s 311s self = 311s 311s def test_kernel_handler(self): 311s # GET kernel with given id 311s kid = self.kern_api.start().json()['id'] 311s r = self.kern_api.get(kid) 311s kern1 = r.json() 311s self.assertEqual(r.status_code, 200) 311s assert isinstance(kern1, dict) 311s self.assertIn('id', kern1) 311s self.assertEqual(kern1['id'], kid) 311s 311s # Request a bad kernel id and check that a JSON 311s # message is returned! 311s bad_id = '111-111-111-111-111' 311s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 311s self.kern_api.get(bad_id) 311s 311s # DELETE kernel with id 311s > r = self.kern_api.shutdown(kid) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/b6121baa-fa46-4cbb-b214-d62577a178c2 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 311s from ._local import * 311s File "/usr/lib/python3.13/pathlib/_local.py", line 6, in 311s import warnings 311s File "", line 1357, in _find_and_load 311s File "", line 421, in __exit__ 311s File "", line 378, in release 311s KeyboardInterrupt 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkyuzp_7c/runtime/kernel-b6121baa-fa46-4cbb-b214-d62577a178c2.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59689 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35531 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: b6121baa-fa46-4cbb-b214-d62577a178c2, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 17.790000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/b6121baa-fa46-4cbb-b214-d62577a178c2 (::1) 1.800000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1): Kernel does not exist: 111-111-111-111-111 311s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 311s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1) 0.610000ms referer=None 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for b6121baa-fa46-4cbb-b214-d62577a178c2 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b6121baa-fa46-4cbb-b214-d62577a178c2 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/b6121baa-fa46-4cbb-b214-d62577a178c2 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/b6121baa-fa46-4cbb-b214-d62577a178c2', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 311s yield maybe_future(km.shutdown_kernel(kernel_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/b6121baa-fa46-4cbb-b214-d62577a178c2 (::1) 7.640000ms referer=None 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.530000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3db21718-9cd3-4041-b483-9caca3a11190 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3db21718-9cd3-4041-b483-9caca3a11190 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/3db21718-9cd3-4041-b483-9caca3a11190 (::1) 0.600000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for b6121baa-fa46-4cbb-b214-d62577a178c2 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b6121baa-fa46-4cbb-b214-d62577a178c2 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/b6121baa-fa46-4cbb-b214-d62577a178c2 (::1) 0.590000ms 311s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 311s 311s self = 311s 311s def test_main_kernel_handler(self): 311s # POST request 311s r = self.kern_api.start() 311s kern1 = r.json() 311s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 311s self.assertEqual(r.status_code, 201) 311s self.assertIsInstance(kern1, dict) 311s 311s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 311s expected_csp = '; '.join([ 311s "frame-ancestors 'self'", 311s 'report-uri ' + report_uri, 311s "default-src 'none'" 311s ]) 311s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 311s 311s # GET request 311s r = self.kern_api.list() 311s self.assertEqual(r.status_code, 200) 311s assert isinstance(r.json(), list) 311s self.assertEqual(r.json()[0]['id'], kern1['id']) 311s self.assertEqual(r.json()[0]['name'], kern1['name']) 311s 311s # create another kernel and check that they both are added to the 311s # list of kernels from a GET request 311s kern2 = self.kern_api.start().json() 311s assert isinstance(kern2, dict) 311s r = self.kern_api.list() 311s kernels = r.json() 311s self.assertEqual(r.status_code, 200) 311s assert isinstance(kernels, list) 311s self.assertEqual(len(kernels), 2) 311s 311s # Interrupt a kernel 311s r = self.kern_api.interrupt(kern2['id']) 311s self.assertEqual(r.status_code, 204) 311s 311s # Restart a kernel 311s > r = self.kern_api.restart(kern2['id']) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 311s return self._req('POST', url_path_join(id, 'restart')) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/67169fc7-90c3-4764-a5e1-94b378e2c99a/restart 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 311s from ._abc import * 311s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 311s from glob import _Globber, _no_recurse_symlinks 311s File "", line 1360, in _find_and_load 311s File "", line 1322, in _find_and_load_unlocked 311s File "", line 1262, in _find_spec 311s File "", line 1556, in find_spec 311s File "", line 1530, in _get_spec 311s File "", line 1629, in find_spec 311s File "", line 152, in _path_stat 311s KeyboardInterrupt 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkyuzp_7c/runtime/kernel-632bc134-b922-43d5-a645-ef34e7d820cf.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59401 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39257 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 632bc134-b922-43d5-a645-ef34e7d820cf, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.200000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.500000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpkyuzp_7c/runtime/kernel-67169fc7-90c3-4764-a5e1-94b378e2c99a.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40817 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48171 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 67169fc7-90c3-4764-a5e1-94b378e2c99a, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 17.670000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 67169fc7-90c3-4764-a5e1-94b378e2c99a 311s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/67169fc7-90c3-4764-a5e1-94b378e2c99a/interrupt (::1) 0.630000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 311s yield maybe_future(km.restart_kernel(kernel_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 311s result = coro.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 311s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 311s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 311s yield self # This tells Task to wait for completion. 311s ^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 311s await ensure_async(kernel.restart_kernel(now=now)) 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 311s await self._async_shutdown_kernel(now=now, restart=True) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/67169fc7-90c3-4764-a5e1-94b378e2c99a/restart (::1) 7.790000ms referer=None 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.850000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 632bc134-b922-43d5-a645-ef34e7d820cf 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 632bc134-b922-43d5-a645-ef34e7d820cf 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/632bc134-b922-43d5-a645-ef34e7d820cf (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/632bc134-b922-43d5-a645-ef34e7d820cf', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 311s yield maybe_future(km.shutdown_kernel(kernel_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/632bc134-b922-43d5-a645-ef34e7d820cf (::1) 6.440000ms referer=None 311s ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 311s 311s self = 311s 311s def test_no_kernels(self): 311s """Make sure there are no kernels running at the start""" 311s kernels = self.kern_api.list().json() 311s > self.assertEqual(kernels, []) 311s E AssertionError: Lists differ: [{'id': '632bc134-b922-43d5-a645-ef34e7d82[281 chars]: 0}] != [] 311s E 311s E First list contains 2 additional elements. 311s E First extra element 0: 311s E {'id': '632bc134-b922-43d5-a645-ef34e7d820cf', 'name': 'python3', 'last_activity': '2026-02-06T02:22:09.519982Z', 'execution_state': 'starting', 'connections': 0} 311s E 311s E + [] 311s E - [{'connections': 0, 311s E - 'execution_state': 'starting', 311s E - 'id': '632bc134-b922-43d5-a645-ef34e7d820cf', 311s E - 'last_activity': '2026-02-06T02:22:09.519982Z', 311s E - 'name': 'python3'}, 311s E - {'connections': 0, 311s E - 'execution_state': 'starting', 311s E - 'id': '67169fc7-90c3-4764-a5e1-94b378e2c99a', 311s E - 'last_activity': '2026-02-06T02:22:09.541645Z', 311s E - 'name': 'python3'}] 311s 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.590000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.770000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 632bc134-b922-43d5-a645-ef34e7d820cf 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 632bc134-b922-43d5-a645-ef34e7d820cf 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/632bc134-b922-43d5-a645-ef34e7d820cf (::1) 0.640000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 67169fc7-90c3-4764-a5e1-94b378e2c99a 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 67169fc7-90c3-4764-a5e1-94b378e2c99a 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/67169fc7-90c3-4764-a5e1-94b378e2c99a (::1) 0.650000ms 311s ---------------------------- Captured log teardown ----------------------------- 311s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: da9e839b-f066-437e-a53a-ce1309aa0510 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 632bc134-b922-43d5-a645-ef34e7d820cf 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: b6121baa-fa46-4cbb-b214-d62577a178c2 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3db21718-9cd3-4041-b483-9caca3a11190 311s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 311s __________________________ SessionAPITest.test_create __________________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/b1ca381a-3f74-4b82-b789-5a90b4a73ec2 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ------------------------------ Captured log setup ------------------------------ 311s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp17tu_osl/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp17tu_osl/etc/jupyter'] for config files 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp17tu_osl/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp17tu_osl/config 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp17tu_osl/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp17tu_osl/config 311s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp17tu_osl/notebooks 311s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 311s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 311s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 311s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 311s WARNING NotebookApp:handlers.py:612 Forbidden 311s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.510000ms referer=None 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 311s from subprocess import PIPE, Popen 311s File "/usr/lib/python3.13/subprocess.py", line 46, in 311s import locale 311s File "", line 1360, in _find_and_load 311s File "", line 1331, in _find_and_load_unlocked 311s File "", line 935, in _load_unlocked 311s File "", line 1019, in exec_module 311s File "", line 1115, in get_code 311s File "", line 1215, in get_data 311s KeyboardInterrupt 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.940000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp17tu_osl/runtime/kernel-04a51296-ab23-4f01-9c1a-111b03f5da0b.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58777 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49515 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 04a51296-ab23-4f01-9c1a-111b03f5da0b, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp17tu_osl/notebooks/foo'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 16.800000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.630000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/b1ca381a-3f74-4b82-b789-5a90b4a73ec2 (::1) 0.640000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 5.040000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 04a51296-ab23-4f01-9c1a-111b03f5da0b 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 04a51296-ab23-4f01-9c1a-111b03f5da0b 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/b1ca381a-3f74-4b82-b789-5a90b4a73ec2 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b1ca381a-3f74-4b82-b789-5a90b4a73ec2', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 311s yielded = self.gen.send(value) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/b1ca381a-3f74-4b82-b789-5a90b4a73ec2 (::1) 8.550000ms referer=None 311s __________________ SessionAPITest.test_create_console_session __________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/6686785a-fd5e-4ea3-8eeb-b787db1b8876 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp17tu_osl/runtime/kernel-88d3e7d4-8c77-438f-a1b6-4560a6a79e7d.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51055 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46999 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 88d3e7d4-8c77-438f-a1b6-4560a6a79e7d, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp17tu_osl/notebooks/foo'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 14.880000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 2.000000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 04a51296-ab23-4f01-9c1a-111b03f5da0b 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 04a51296-ab23-4f01-9c1a-111b03f5da0b 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b1ca381a-3f74-4b82-b789-5a90b4a73ec2 (::1) 0.950000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 88d3e7d4-8c77-438f-a1b6-4560a6a79e7d 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 88d3e7d4-8c77-438f-a1b6-4560a6a79e7d 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/6686785a-fd5e-4ea3-8eeb-b787db1b8876 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/6686785a-fd5e-4ea3-8eeb-b787db1b8876', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 311s yielded = self.gen.send(value) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 311s from ._abc import * 311s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 311s from glob import _Globber, _no_recurse_symlinks 311s File "/usr/lib/python3.13/glob.py", line 5, in 311s import re 311s File "/usr/lib/python3.13/re/__init__.py", line 381, in 311s import copyreg 311s File "", line 1357, in _find_and_load 311s File "", line 418, in __enter__ 311s File "", line 311, in acquire 311s File "", line 170, in __enter__ 311s File "", line 132, in setdefault 311s File "", line 74, in __new__ 311s KeyboardInterrupt 311s ____________________ SessionAPITest.test_create_deprecated _____________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/1dee7346-5f87-4b94-b349-bbf1e5d9891b 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp17tu_osl/runtime/kernel-2ad6d912-1bf0-4bed-9b2e-844f28fcbb29.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41883 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60513 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2ad6d912-1bf0-4bed-9b2e-844f28fcbb29, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp17tu_osl/notebooks/foo'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.710000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.680000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 88d3e7d4-8c77-438f-a1b6-4560a6a79e7d 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 88d3e7d4-8c77-438f-a1b6-4560a6a79e7d 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/6686785a-fd5e-4ea3-8eeb-b787db1b8876 (::1) 0.930000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2ad6d912-1bf0-4bed-9b2e-844f28fcbb29 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2ad6d912-1bf0-4bed-9b2e-844f28fcbb29 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/1dee7346-5f87-4b94-b349-bbf1e5d9891b (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/1dee7346-5f87-4b94-b349-bbf1e5d9891b', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 311s yielded = self.gen.send(value) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/1dee7346-5f87-4b94-b349-bbf1e5d9891b (::1) 7.960000ms referer=None 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 311s from ._abc import * 311s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 311s from glob import _Globber, _no_recurse_symlinks 311s File "/usr/lib/python3.13/glob.py", line 5, in 311s import re 311s File "/usr/lib/python3.13/re/__init__.py", line 315, in 311s Pattern = type(_compiler.compile('', 0)) 311s ~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3.13/re/_compiler.py", line 748, in compile 311s p = _parser.parse(p, flags) 311s File "/usr/lib/python3.13/re/_parser.py", line 980, in parse 311s p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) 311s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 311s itemsappend(_parse(source, state, verbose, nested + 1, 311s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s not nested and not items)) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3.13/re/_parser.py", line 885, in _parse 311s for i in range(len(subpattern))[::-1]: 311s ~~~^^^^^^^^^^^^ 311s File "/usr/lib/python3.13/re/_parser.py", line 164, in __len__ 311s return len(self.data) 311s KeyboardInterrupt 311s ___________________ SessionAPITest.test_create_file_session ____________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/218be679-d506-4e14-b2b2-d4850ff673ec 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 311s import json 311s File "/usr/lib/python3.13/json/__init__.py", line 107, in 311s from .encoder import JSONEncoder 311s File "", line 1360, in _find_and_load 311s File "", line 1331, in _find_and_load_unlocked 311s File "", line 935, in _load_unlocked 311s File "", line 1019, in exec_module 311s File "", line 1104, in get_code 311s File "", line 535, in cache_from_source 311s File "", line 139, in _path_split 311s File "", line 139, in 311s KeyboardInterrupt 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp17tu_osl/runtime/kernel-dfd2a2ae-87e5-4033-8724-cccf1de43915.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52965 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36211 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: dfd2a2ae-87e5-4033-8724-cccf1de43915, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp17tu_osl/notebooks/foo'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 19.130000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.700000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2ad6d912-1bf0-4bed-9b2e-844f28fcbb29 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2ad6d912-1bf0-4bed-9b2e-844f28fcbb29 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/1dee7346-5f87-4b94-b349-bbf1e5d9891b (::1) 0.900000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dfd2a2ae-87e5-4033-8724-cccf1de43915 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dfd2a2ae-87e5-4033-8724-cccf1de43915 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/218be679-d506-4e14-b2b2-d4850ff673ec (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/218be679-d506-4e14-b2b2-d4850ff673ec', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 311s yielded = self.gen.send(value) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/218be679-d506-4e14-b2b2-d4850ff673ec (::1) 7.500000ms referer=None 311s __________________ SessionAPITest.test_create_with_kernel_id ___________________ 311s 311s self = 311s 311s def test_create_with_kernel_id(self): 311s # create a new kernel 311s r = self.request('POST', 'api/kernels') 311s r.raise_for_status() 311s kernel = r.json() 311s 311s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 311s self.assertEqual(resp.status_code, 201) 311s newsession = resp.json() 311s self.assertIn('id', newsession) 311s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 311s self.assertEqual(newsession['kernel']['id'], kernel['id']) 311s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 311s 311s sessions = self.sess_api.list().json() 311s > self.assertEqual(sessions, [newsession]) 311s E AssertionError: Lists differ: [{'id': '218be679-d506-4e14-b2b2-d4850ff673ec', 'p[553 chars]ne}}] != [{'id': 'fc114610-a7b1-4211-9980-e6a975fd9242', 'p[279 chars]ne}}] 311s E 311s E First differing element 0: 311s E {'id': '218be679-d506-4e14-b2b2-d4850ff673ec', 'p[218 chars]: 0}} 311s E {'id': 'fc114610-a7b1-4211-9980-e6a975fd9242', 'p[278 chars]one}} 311s E 311s E First list contains 1 additional elements. 311s E First extra element 1: 311s E {'id': 'fc114610-a7b1-4211-9980-e6a975fd9242', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '3fce4996-cc7c-4705-9cbe-8a157da5e2b7', 'name': 'python3', 'last_activity': '2026-02-06T02:22:10.022328Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 311s E 311s E Diff is 830 characters long. Set self.maxDiff to None to see it. 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp17tu_osl/runtime/kernel-3fce4996-cc7c-4705-9cbe-8a157da5e2b7.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54001 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36679 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3fce4996-cc7c-4705-9cbe-8a157da5e2b7, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.330000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.770000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.560000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.560000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dfd2a2ae-87e5-4033-8724-cccf1de43915 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dfd2a2ae-87e5-4033-8724-cccf1de43915 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/218be679-d506-4e14-b2b2-d4850ff673ec (::1) 1.880000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3fce4996-cc7c-4705-9cbe-8a157da5e2b7 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3fce4996-cc7c-4705-9cbe-8a157da5e2b7 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 311s yielded = self.gen.send(value) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s _____________________ SessionAPITest.test_modify_kernel_id _____________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.820000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp17tu_osl/runtime/kernel-238ee65a-77aa-4ae1-80f7-6ff3a582ef5d.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52961 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36597 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 238ee65a-77aa-4ae1-80f7-6ff3a582ef5d, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 17.830000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3fce4996-cc7c-4705-9cbe-8a157da5e2b7 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3fce4996-cc7c-4705-9cbe-8a157da5e2b7 311s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 (::1) 2.320000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.480000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.510000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 238ee65a-77aa-4ae1-80f7-6ff3a582ef5d 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 238ee65a-77aa-4ae1-80f7-6ff3a582ef5d 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 311s yielded = self.gen.send(value) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 (::1) 7.230000ms referer=None 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 311s from ._local import * 311s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 311s class PureWindowsPath(PurePath): 311s ...<7 lines>... 311s __slots__ = () 311s File /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 311s gc.collect() 311s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 311s "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 311s import ntpath 311s File "/usr/lib/python3.13/ntpath.py", line 45, in 311s from _winapi import ( 311s ...<2 lines>... 311s LCMAP_LOWERCASE as _LCMAP_LOWERCASE) 311s File "", line 1360, in _find_and_load 311s File "", line 1322, in _find_and_load_unlocked 311s File "", line 1262, in _find_spec 311s File "", line 1556, in find_spec 311s File "", line 1530, in _get_spec 311s File "", line 1629, in find_spec 311s File "", line 152, in _path_stat 311s KeyboardInterrupt 311s ____________________ SessionAPITest.test_modify_kernel_name ____________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 2.040000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp17tu_osl/runtime/kernel-aa980131-8e9d-42b4-8419-ce7d6916b5e9.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35637 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53645 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: aa980131-8e9d-42b4-8419-ce7d6916b5e9, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmp17tu_osl/notebooks/foo'} 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 238ee65a-77aa-4ae1-80f7-6ff3a582ef5d 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 238ee65a-77aa-4ae1-80f7-6ff3a582ef5d 311s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 (::1) 16.140000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.490000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.720000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for aa980131-8e9d-42b4-8419-ce7d6916b5e9 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: aa980131-8e9d-42b4-8419-ce7d6916b5e9 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/fc114610-a7b1-4211-9980-e6a975fd9242', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 311s yielded = self.gen.send(value) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 311s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 311s stopper = ensure_async(km.shutdown_kernel(now, restart)) 311s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 311s return _runner_map[name].run(inner) 311s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 311s return fut.result(None) 311s ~~~~~~~~~~^^^^^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 311s return self.__get_result() 311s ~~~~~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 311s raise self._exception 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 311s from ._abc import * 311s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 311s from glob import _Globber, _no_recurse_symlinks 311s File "/usr/lib/python3.13/glob.py", line 5, in 311s import re 311s File "/usr/lib/python3.13/re/__init__.py", line 381, in 311s import copyreg 311s File "", line 1360, in _find_and_load 311s File "", line 1322, in _find_and_load_unlocked 311s File "", line 1262, in _find_spec 311s File "", line 1556, in find_spec 311s File "", line 1530, in _get_spec 311s File "", line 1636, in find_spec 311s File "", line 71, in _relax_case 311s KeyboardInterrupt 311s _______________________ AsyncSessionAPITest.test_create ________________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/8d28e64a-8629-4177-a3d8-3e72a117ccc9 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ------------------------------ Captured log setup ------------------------------ 311s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpc32sc5zw/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpc32sc5zw/etc/jupyter'] for config files 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpc32sc5zw/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpc32sc5zw/config 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpc32sc5zw/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 311s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpc32sc5zw/config 311s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpc32sc5zw/notebooks 311s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 311s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 311s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 311s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 311s WARNING NotebookApp:handlers.py:612 Forbidden 311s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.490000ms referer=None 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.820000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc32sc5zw/runtime/kernel-1773c5ac-62a5-4027-ba1b-ad6d0444dbea.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35231 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33219 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 1773c5ac-62a5-4027-ba1b-ad6d0444dbea, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpc32sc5zw/notebooks/foo'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 18.860000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.610000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/8d28e64a-8629-4177-a3d8-3e72a117ccc9 (::1) 0.600000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.580000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 1773c5ac-62a5-4027-ba1b-ad6d0444dbea 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1773c5ac-62a5-4027-ba1b-ad6d0444dbea 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/8d28e64a-8629-4177-a3d8-3e72a117ccc9 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/8d28e64a-8629-4177-a3d8-3e72a117ccc9', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/8d28e64a-8629-4177-a3d8-3e72a117ccc9 (::1) 7.340000ms referer=None 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 311s from subprocess import PIPE, Popen 311s File "/usr/lib/python3.13/subprocess.py", line 46, in 311s import locale 311s File "/usr/lib/python3.13/locale.py", line 1769, in 311s __all__.append("LC_MESSAGES") 311s ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ 311s KeyboardInterrupt 311s _______________ AsyncSessionAPITest.test_create_console_session ________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/58dcfa13-95c8-4a24-92b9-f5a7416e7c3e 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc32sc5zw/runtime/kernel-6d65361a-e589-4d75-9149-4a9e2ce06e02.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48235 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33023 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 6d65361a-e589-4d75-9149-4a9e2ce06e02, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpc32sc5zw/notebooks/foo'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 16.860000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.870000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 1773c5ac-62a5-4027-ba1b-ad6d0444dbea 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1773c5ac-62a5-4027-ba1b-ad6d0444dbea 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/8d28e64a-8629-4177-a3d8-3e72a117ccc9 (::1) 0.800000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 6d65361a-e589-4d75-9149-4a9e2ce06e02 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6d65361a-e589-4d75-9149-4a9e2ce06e02 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/58dcfa13-95c8-4a24-92b9-f5a7416e7c3e (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/58dcfa13-95c8-4a24-92b9-f5a7416e7c3e', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/58dcfa13-95c8-4a24-92b9-f5a7416e7c3e (::1) 7.450000ms referer=None 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 311s from subprocess import PIPE, Popen 311s File "/usr/lib/python3.13/subprocess.py", line 46, in 311s import locale 311s File "", line 1360, in _find_and_load 311s File "", line 1331, in _find_and_load_unlocked 311s File "", line 935, in _load_unlocked 311s File "", line 1019, in exec_module 311s File "", line 1152, in get_code 311s File "", line 781, in _compile_bytecode 311s KeyboardInterrupt 311s __________________ AsyncSessionAPITest.test_create_deprecated __________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/b126f261-e4f1-41c7-ab12-b80bce183c10 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc32sc5zw/runtime/kernel-0e20b1a2-a88c-4f51-b1b9-dd53e1ecf926.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54179 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52981 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 0e20b1a2-a88c-4f51-b1b9-dd53e1ecf926, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpc32sc5zw/notebooks/foo'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 14.960000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.670000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 6d65361a-e589-4d75-9149-4a9e2ce06e02 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6d65361a-e589-4d75-9149-4a9e2ce06e02 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/58dcfa13-95c8-4a24-92b9-f5a7416e7c3e (::1) 5.200000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0e20b1a2-a88c-4f51-b1b9-dd53e1ecf926 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0e20b1a2-a88c-4f51-b1b9-dd53e1ecf926 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/b126f261-e4f1-41c7-ab12-b80bce183c10 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b126f261-e4f1-41c7-ab12-b80bce183c10', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/b126f261-e4f1-41c7-ab12-b80bce183c10 (::1) 7.320000ms referer=None 311s --------------------------- Captured stderr teardown --------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 5, in 311s from __future__ import annotations 311s File "", line 1360, in _find_and_load 311s File "", line 1331, in _find_and_load_unlocked 311s File "", line 935, in _load_unlocked 311s File "", line 1019, in exec_module 311s File "", line 1115, in get_code 311s File "", line 1214, in get_data 311s KeyboardInterrupt 311s _________________ AsyncSessionAPITest.test_create_file_session _________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/a825cfcf-ce4e-4a99-876a-09e3e0175744 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc32sc5zw/runtime/kernel-264ba335-5a19-408c-b555-7035e251599e.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43869 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39095 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 264ba335-5a19-408c-b555-7035e251599e, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpc32sc5zw/notebooks/foo'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 18.680000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.630000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0e20b1a2-a88c-4f51-b1b9-dd53e1ecf926 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0e20b1a2-a88c-4f51-b1b9-dd53e1ecf926 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b126f261-e4f1-41c7-ab12-b80bce183c10 (::1) 1.970000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 264ba335-5a19-408c-b555-7035e251599e 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 264ba335-5a19-408c-b555-7035e251599e 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/a825cfcf-ce4e-4a99-876a-09e3e0175744 (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/a825cfcf-ce4e-4a99-876a-09e3e0175744', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "", line 1360, in _find_and_load 311s File "", line 1331, in _find_and_load_unlocked 311s File "", line 948, in _load_unlocked 311s File "", line 491, in _verbose_message 311s KeyboardInterrupt 311s ________________ AsyncSessionAPITest.test_create_with_kernel_id ________________ 311s 311s self = 311s 311s def test_create_with_kernel_id(self): 311s # create a new kernel 311s r = self.request('POST', 'api/kernels') 311s r.raise_for_status() 311s kernel = r.json() 311s 311s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 311s self.assertEqual(resp.status_code, 201) 311s newsession = resp.json() 311s self.assertIn('id', newsession) 311s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 311s self.assertEqual(newsession['kernel']['id'], kernel['id']) 311s self.assertEqual(resp.headers['Location'], f'{self.url_prefix}api/sessions/{newsession["id"]}') 311s 311s sessions = self.sess_api.list().json() 311s > self.assertEqual(sessions, [newsession]) 311s E AssertionError: Lists differ: [{'id': 'a825cfcf-ce4e-4a99-876a-09e3e0175744', 'p[553 chars]ne}}] != [{'id': '0630abdb-1c76-469a-87d6-f215032c893f', 'p[279 chars]ne}}] 311s E 311s E First differing element 0: 311s E {'id': 'a825cfcf-ce4e-4a99-876a-09e3e0175744', 'p[218 chars]: 0}} 311s E {'id': '0630abdb-1c76-469a-87d6-f215032c893f', 'p[278 chars]one}} 311s E 311s E First list contains 1 additional elements. 311s E First extra element 1: 311s E {'id': '0630abdb-1c76-469a-87d6-f215032c893f', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': 'f9b36909-4e5b-468c-a9e1-29e0f39c27c0', 'name': 'python3', 'last_activity': '2026-02-06T02:22:10.655508Z', 'execution_state': 'starting', 'connections': 0}, 'notebook': {'path': 'foo/nb1.ipynb', 'name': None}} 311s E 311s E Diff is 830 characters long. Set self.maxDiff to None to see it. 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:178: AssertionError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc32sc5zw/runtime/kernel-f9b36909-4e5b-468c-a9e1-29e0f39c27c0.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41185 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53833 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: f9b36909-4e5b-468c-a9e1-29e0f39c27c0, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.450000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.720000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.560000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.800000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 264ba335-5a19-408c-b555-7035e251599e 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 264ba335-5a19-408c-b555-7035e251599e 311s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/a825cfcf-ce4e-4a99-876a-09e3e0175744 (::1) 1.910000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f9b36909-4e5b-468c-a9e1-29e0f39c27c0 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f9b36909-4e5b-468c-a9e1-29e0f39c27c0 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s __________________ AsyncSessionAPITest.test_modify_kernel_id ___________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.830000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc32sc5zw/runtime/kernel-19160218-48c8-4f74-bdd4-259dafcdb5f0.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60505 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54397 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: 19160218-48c8-4f74-bdd4-259dafcdb5f0, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 17.560000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f9b36909-4e5b-468c-a9e1-29e0f39c27c0 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f9b36909-4e5b-468c-a9e1-29e0f39c27c0 311s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f (::1) 1.090000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.840000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.640000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 19160218-48c8-4f74-bdd4-259dafcdb5f0 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 19160218-48c8-4f74-bdd4-259dafcdb5f0 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s --------------------------- Captured stderr teardown --------------------------- 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 311s from ipykernel import kernelapp as app 311s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 311s from .connect import * # noqa: F403 311s ^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 311s from subprocess import PIPE, Popen 311s File "/usr/lib/python3.13/subprocess.py", line 46, in 311s import locale 311s File "/usr/lib/python3.13/locale.py", line 1769, in 311s __all__.append("LC_MESSAGES") 311s ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ 311s KeyboardInterrupt 311s _________________ AsyncSessionAPITest.test_modify_kernel_name __________________ 311s 311s @self.addCleanup 311s def cleanup_sessions(): 311s for session in self.sess_api.list().json(): 311s > self.sess_api.delete(session['id']) 311s 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 311s return self._req('DELETE', id) 311s ^^^^^^^^^^^^^^^^^^^^^^^ 311s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 311s response.raise_for_status() 311s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 311s 311s self = 311s 311s def raise_for_status(self): 311s """Raises :class:`HTTPError`, if one occurred.""" 311s 311s http_error_msg = "" 311s if isinstance(self.reason, bytes): 311s # We attempt to decode utf-8 first because some servers 311s # choose to localize their reason strings. If the string 311s # isn't utf-8, we fall back to iso-8859-1 for all other 311s # encodings. (See PR #3538) 311s try: 311s reason = self.reason.decode("utf-8") 311s except UnicodeDecodeError: 311s reason = self.reason.decode("iso-8859-1") 311s else: 311s reason = self.reason 311s 311s if 400 <= self.status_code < 500: 311s http_error_msg = ( 311s f"{self.status_code} Client Error: {reason} for url: {self.url}" 311s ) 311s 311s elif 500 <= self.status_code < 600: 311s http_error_msg = ( 311s f"{self.status_code} Server Error: {reason} for url: {self.url}" 311s ) 311s 311s if http_error_msg: 311s > raise HTTPError(http_error_msg, response=self) 311s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f 311s 311s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 311s ----------------------------- Captured stderr call ----------------------------- 311s Traceback (most recent call last): 311s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 311s return _run_code(code, main_globals, None, 311s "__main__", mod_spec) 311s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 311s exec(code, run_globals) 311s ~~~~^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 311s from pathlib import Path 311s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 311s from ._local import * 311s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 311s class PureWindowsPath(PurePath): 311s ...<7 lines>... 311s __slots__ = () 311s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 311s import ntpath 311s File "", line 1360, in _find_and_load 311s File "", line 1331, in _find_and_load_unlocked 311s File "", line 935, in _load_unlocked 311s File "", line 1019, in exec_module 311s File "", line 1152, in get_code 311s File "", line 781, in _compile_bytecode 311s KeyboardInterrupt 311s ------------------------------ Captured log call ------------------------------- 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.810000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 311s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc32sc5zw/runtime/kernel-a3a2cc67-e6af-4a61-8627-65dc7f0dc40a.json'] 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34303 311s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55521 311s INFO NotebookApp:kernelmanager.py:179 Kernel started: a3a2cc67-e6af-4a61-8627-65dc7f0dc40a, name: python3 311s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpc32sc5zw/notebooks/foo'} 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 19160218-48c8-4f74-bdd4-259dafcdb5f0 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 19160218-48c8-4f74-bdd4-259dafcdb5f0 311s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f (::1) 14.780000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.550000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.560000ms 311s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 311s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for a3a2cc67-e6af-4a61-8627-65dc7f0dc40a 311s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: a3a2cc67-e6af-4a61-8627-65dc7f0dc40a 311s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f (::1) 311s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f', version='HTTP/1.1', remote_ip='::1') 311s Traceback (most recent call last): 311s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 311s result = await result 311s ^^^^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 311s future.result() 311s ~~~~~~~~~~~~~^^ 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 311s yield maybe_future(sm.delete_session(session_id)) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 311s yielded = self.gen.throw(exc) 311s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 311s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 311s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 311s value = future.result() 311s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 311s raise self._exception.with_traceback(self._exception_tb) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 311s result = coro.send(None) 311s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 311s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 311s raise km.ready.exception() # type: ignore[misc] 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 311s await kernel_awaitable 311s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 311s result = await obj 311s ^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 311s raise e 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 311s out = await method(self, *args, **kwargs) 311s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 311s await self._async_finish_shutdown(restart=restart) 311s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 311s await asyncio.wait_for( 311s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 311s ) 311s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 311s async with timeouts.timeout(timeout): 311s ~~~~~~~~~~~~~~~~^^^^^^^^^ 311s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 311s raise RuntimeError("Timeout should be used inside a task") 311s RuntimeError: Timeout should be used inside a task 311s WARNING NotebookApp:handlers.py:612 Unhandled error 311s ERROR NotebookApp:log.py:55 { 311s "Host": "localhost:12341", 311s "Accept": "*/*", 311s "User-Agent": "python-requests/2.32.5" 311s } 311s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/0630abdb-1c76-469a-87d6-f215032c893f (::1) 7.100000ms referer=None 311s =============================== warnings summary =============================== 311s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 311s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 311s /usr/lib/python3/dist-packages/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. 311s return LooseVersion(v) >= LooseVersion(check) 311s 311s ../../../usr/lib/python3/dist-packages/notebook/_tz.py:29: 1 warning 311s services/kernels/tests/test_kernels_api.py: 68 warnings 311s services/sessions/tests/test_sessions_api.py: 96 warnings 311s /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). 311s dt = unaware(*args, **kwargs) 311s 311s ../../../usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14 311s /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 311s pytestmark = pytest.mark.integration_tests 311s 311s services/kernels/tests/test_kernels_api.py: 6 warnings 311s services/sessions/tests/test_sessions_api.py: 6 warnings 311s /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 311s policy = events.get_event_loop_policy() 311s 311s services/kernels/tests/test_kernels_api.py: 24 warnings 311s services/sessions/tests/test_sessions_api.py: 19 warnings 311s /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 311s loop = events.get_event_loop_policy().get_event_loop() 311s 311s services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 311s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first 311s loop.make_current() 311s 311s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 311s =========================== short test summary info ============================ 311s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_default_kernel 311s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_kernel_handler 311s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 311s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_no_kernels 311s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 311s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_default_kernel 311s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_kernel_handler 311s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 311s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_no_kernels 311s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 311s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_console_session 311s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_deprecated 311s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_file_session 311s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 311s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 311s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 311s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create 311s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_console_session 311s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_deprecated 311s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_file_session 311s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 311s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 311s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 311s ERROR services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 311s ERROR services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 311s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 311s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 311s ===== 23 failed, 2 passed, 305 deselected, 224 warnings, 4 errors in 6.78s ===== 311s *** END OF RUN 3: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 311s *** 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 315s ============================= test session starts ============================== 315s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 315s rootdir: /tmp/autopkgtest.tpx4mW/autopkgtest_tmp 315s plugins: typeguard-4.4.4 315s collected 330 items / 307 deselected / 23 selected 315s run-last-failure: rerun previous 23 failures 315s 317s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF [ 39%] 318s services/sessions/tests/test_sessions_api.py FFFFFEFFFFFFFEFF [100%] 318s 318s ==================================== ERRORS ==================================== 318s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 318s 318s self = 318s 318s def tearDown(self): 318s for k in self.kern_api.list().json(): 318s > self.kern_api.shutdown(k['id']) 318s 318s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 318s return self._req('DELETE', id) 318s ^^^^^^^^^^^^^^^^^^^^^^^ 318s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 318s response.raise_for_status() 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s 318s self = 318s 318s def raise_for_status(self): 318s """Raises :class:`HTTPError`, if one occurred.""" 318s 318s http_error_msg = "" 318s if isinstance(self.reason, bytes): 318s # We attempt to decode utf-8 first because some servers 318s # choose to localize their reason strings. If the string 318s # isn't utf-8, we fall back to iso-8859-1 for all other 318s # encodings. (See PR #3538) 318s try: 318s reason = self.reason.decode("utf-8") 318s except UnicodeDecodeError: 318s reason = self.reason.decode("iso-8859-1") 318s else: 318s reason = self.reason 318s 318s if 400 <= self.status_code < 500: 318s http_error_msg = ( 318s f"{self.status_code} Client Error: {reason} for url: {self.url}" 318s ) 318s 318s elif 500 <= self.status_code < 600: 318s http_error_msg = ( 318s f"{self.status_code} Server Error: {reason} for url: {self.url}" 318s ) 318s 318s if http_error_msg: 318s > raise HTTPError(http_error_msg, response=self) 318s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/65e0eb6e-268b-41fb-9f78-94a7e922c0fe 318s 318s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 318s ----------------------------- Captured stderr call ----------------------------- 318s Traceback (most recent call last): 318s File "", line 1360, in _find_and_load 318s File "", line 1331, in _find_and_load_unlocked 318s File "", line 935, in _load_unlocked 318s File "", line 1023, in exec_module 318s File "", line 488, in _call_with_frames_removed 318s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 318s from ._local import * 318s File "", line 1360, in _find_and_load 318s File "", line 1331, in _find_and_load_unlocked 318s File "", line 935, in _load_unlocked 318s File "", line 1019, in exec_module 318s File "", line 1152, in get_code 318s File "", line 781, in _compile_bytecode 318s KeyboardInterrupt 318s 318s During handling of the above exception, another exception occurred: 318s 318s Traceback (most recent call last): 318s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 318s return _run_code(code, main_globals, None, 318s "__main__", mod_spec) 318s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 318s exec(code, run_globals) 318s ~~~~^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 318s from pathlib import Path 318s File "", line 1357, in _find_and_load 318s File "", line 420, in __exit__ 318s KeyboardInterrupt 318s Traceback (most recent call last): 318s ------------------------------ Captured log call ------------------------------- 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 318s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp8z7y_fd5/runtime/kernel-65e0eb6e-268b-41fb-9f78-94a7e922c0fe.json'] 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49819 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60643 318s INFO NotebookApp:kernelmanager.py:179 Kernel started: 65e0eb6e-268b-41fb-9f78-94a7e922c0fe, name: python3 318s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 318s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.770000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.570000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 318s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp8z7y_fd5/runtime/kernel-eb91eed8-f207-43ef-b09b-e71cbf180be6.json'] 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40181 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47343 318s INFO NotebookApp:kernelmanager.py:179 Kernel started: eb91eed8-f207-43ef-b09b-e71cbf180be6, name: python3 318s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 318s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 24.630000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.590000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: eb91eed8-f207-43ef-b09b-e71cbf180be6 318s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/eb91eed8-f207-43ef-b09b-e71cbf180be6/interrupt (::1) 0.820000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 318s yield maybe_future(km.restart_kernel(kernel_id)) 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 318s value = future.result() 318s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 318s raise self._exception.with_traceback(self._exception_tb) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 318s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 318s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 318s return _runner_map[name].run(inner) 318s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 318s return fut.result(None) 318s ~~~~~~~~~~^^^^^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 318s return self.__get_result() 318s ~~~~~~~~~~~~~~~~~^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 318s raise self._exception 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 318s await ensure_async(kernel.restart_kernel(now=now)) 318s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 318s return _runner_map[name].run(inner) 318s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 318s return fut.result(None) 318s ~~~~~~~~~~^^^^^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 318s return self.__get_result() 318s ~~~~~~~~~~~~~~~~~^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 318s raise self._exception 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 318s await self._async_shutdown_kernel(now=now, restart=True) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 318s raise e 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:log.py:55 { 318s "Host": "localhost:12341", 318s "Accept": "*/*", 318s "User-Agent": "python-requests/2.32.5" 318s } 318s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/eb91eed8-f207-43ef-b09b-e71cbf180be6/restart (::1) 8.690000ms referer=None 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 65e0eb6e-268b-41fb-9f78-94a7e922c0fe 318s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 65e0eb6e-268b-41fb-9f78-94a7e922c0fe 318s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/65e0eb6e-268b-41fb-9f78-94a7e922c0fe (::1) 318s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/65e0eb6e-268b-41fb-9f78-94a7e922c0fe', version='HTTP/1.1', remote_ip='::1') 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 318s result = await result 318s ^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 239, in wrapper 318s yielded = ctx_run(next, result) 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 318s yield maybe_future(km.shutdown_kernel(kernel_id)) 318s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 318s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 318s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 318s return _runner_map[name].run(inner) 318s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 318s return fut.result(None) 318s ~~~~~~~~~~^^^^^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 318s return self.__get_result() 318s ~~~~~~~~~~~~~~~~~^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 318s raise self._exception 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 318s stopper = ensure_async(km.shutdown_kernel(now, restart)) 318s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 318s return _runner_map[name].run(inner) 318s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 318s return fut.result(None) 318s ~~~~~~~~~~^^^^^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 318s return self.__get_result() 318s ~~~~~~~~~~~~~~~~~^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 318s raise self._exception 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 318s raise e 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s WARNING NotebookApp:handlers.py:612 Unhandled error 318s --------------------------- Captured stderr teardown --------------------------- 318s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 318s return _run_code(code, main_globals, None, 318s "__main__", mod_spec) 318s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 318s exec(code, run_globals) 318s ~~~~^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 318s from ipykernel import kernelapp as app 318s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 318s from .connect import * # noqa: F403 318s ^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 318s import jupyter_client 318s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 318s from .asynchronous import AsyncKernelClient 318s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 318s from .client import AsyncKernelClient # noqa 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 318s import zmq.asyncio 318s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 318s import asyncio 318s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 318s from .base_events import * 318s File "/usr/lib/python3.13/asyncio/base_events.py", line 39, in 318s from . import coroutines 318s File "/usr/lib/python3.13/asyncio/coroutines.py", line 4, in 318s import inspect 318s File "/usr/lib/python3.13/inspect.py", line 145, in 318s import ast 318s File "/usr/lib/python3.13/ast.py", line 739, in 318s class _Unparser(NodeVisitor): 318s ...<1073 lines>... 318s self.interleave(lambda: self.write(" | "), self.traverse, node.patterns) 318s File "/usr/lib/python3.13/ast.py", line 788, in _Unparser 318s @contextmanager 318s ^^^^^^^^^^^^^^ 318s File "/usr/lib/python3.13/contextlib.py", line 303, in contextmanager 318s @wraps(func) 318s ~~~~~^^^^^^ 318s File "/usr/lib/python3.13/functools.py", line 36, in update_wrapper 318s def update_wrapper(wrapper, 318s 318s KeyboardInterrupt 318s _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 318s 318s self = 318s 318s def tearDown(self): 318s for k in self.kern_api.list().json(): 318s > self.kern_api.shutdown(k['id']) 318s 318s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 318s return self._req('DELETE', id) 318s ^^^^^^^^^^^^^^^^^^^^^^^ 318s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 318s response.raise_for_status() 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s 318s self = 318s 318s def raise_for_status(self): 318s """Raises :class:`HTTPError`, if one occurred.""" 318s 318s http_error_msg = "" 318s if isinstance(self.reason, bytes): 318s # We attempt to decode utf-8 first because some servers 318s # choose to localize their reason strings. If the string 318s # isn't utf-8, we fall back to iso-8859-1 for all other 318s # encodings. (See PR #3538) 318s try: 318s reason = self.reason.decode("utf-8") 318s except UnicodeDecodeError: 318s reason = self.reason.decode("iso-8859-1") 318s else: 318s reason = self.reason 318s 318s if 400 <= self.status_code < 500: 318s http_error_msg = ( 318s f"{self.status_code} Client Error: {reason} for url: {self.url}" 318s ) 318s 318s elif 500 <= self.status_code < 600: 318s http_error_msg = ( 318s f"{self.status_code} Server Error: {reason} for url: {self.url}" 318s ) 318s 318s if http_error_msg: 318s > raise HTTPError(http_error_msg, response=self) 318s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/8d34030f-0536-4c42-89f8-216031f3837a 318s 318s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 318s ----------------------------- Captured stderr call ----------------------------- 318s Traceback (most recent call last): 318s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 318s return _run_code(code, main_globals, None, 318s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 318s exec(code, run_globals) 318s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 318s from pathlib import Path 318s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 318s from ._abc import * 318s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 318s import functools 318s File "/usr/lib/python3.13/functools.py", line 18, in 318s from collections import namedtuple 318s File "/usr/lib/python3.13/collections/__init__.py", line 39, in 318s from operator import eq as _eq 318s File "", line 1360, in _find_and_load 318s File "", line 1331, in _find_and_load_unlocked 318s File "", line 935, in _load_unlocked 318s File "", line 1019, in exec_module 318s File "", line 1152, in get_code 318s File "", line 781, in _compile_bytecode 318s KeyboardInterrupt 318s Traceback (most recent call last): 318s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 318s return _run_code(code, main_globals, None, 318s "__main__", mod_spec) 318s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 318s exec(code, run_globals) 318s ~~~~^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 318s from ipykernel import kernelapp as app 318s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 318s from .connect import * # noqa: F403 318s ^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 318s import jupyter_client 318s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 318s from .asynchronous import AsyncKernelClient 318s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 318s from .client import AsyncKernelClient # noqa 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 318s import zmq.asyncio 318s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 318s import asyncio 318s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 318s from .base_events import * 318s File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in 318s import concurrent.futures 318s File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in 318s from concurrent.futures._base import (FIRST_COMPLETED, 318s ...<9 lines>... 318s as_completed) 318s File "/usr/lib/python3.13/concurrent/futures/_base.py", line 7, in 318s import logging 318s File "/usr/lib/python3.13/logging/__init__.py", line 1296, in 318s class PlaceHolder(object): 318s ...<16 lines>... 318s self.loggerMap[alogger] = None 318s KeyboardInterrupt 318s ------------------------------ Captured log call ------------------------------- 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 318s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc2tqpcfb/runtime/kernel-8d34030f-0536-4c42-89f8-216031f3837a.json'] 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52295 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56733 318s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8d34030f-0536-4c42-89f8-216031f3837a, name: python3 318s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 318s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.460000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.900000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 318s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc2tqpcfb/runtime/kernel-1f13dd5f-01d8-491b-9c41-478e5b5246c5.json'] 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60553 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58397 318s INFO NotebookApp:kernelmanager.py:179 Kernel started: 1f13dd5f-01d8-491b-9c41-478e5b5246c5, name: python3 318s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 318s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.740000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.870000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 1f13dd5f-01d8-491b-9c41-478e5b5246c5 318s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/1f13dd5f-01d8-491b-9c41-478e5b5246c5/interrupt (::1) 3.860000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 318s yield maybe_future(km.restart_kernel(kernel_id)) 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 318s value = future.result() 318s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 318s raise self._exception.with_traceback(self._exception_tb) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 318s result = coro.throw(exc) 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 318s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 318s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 318s yield self # This tells Task to wait for completion. 318s ^^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 318s future.result() 318s ~~~~~~~~~~~~~^^ 318s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 318s raise self._exception.with_traceback(self._exception_tb) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 318s await ensure_async(kernel.restart_kernel(now=now)) 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 318s result = await obj 318s ^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 318s await self._async_shutdown_kernel(now=now, restart=True) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 318s raise e 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:log.py:55 { 318s "Host": "localhost:12341", 318s "Accept": "*/*", 318s "User-Agent": "python-requests/2.32.5" 318s } 318s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/1f13dd5f-01d8-491b-9c41-478e5b5246c5/restart (::1) 6.610000ms referer=None 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.530000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8d34030f-0536-4c42-89f8-216031f3837a 318s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8d34030f-0536-4c42-89f8-216031f3837a 318s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 318s await kernel_awaitable 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 318s result = await obj 318s ^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 318s raise e 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/8d34030f-0536-4c42-89f8-216031f3837a (::1) 318s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/8d34030f-0536-4c42-89f8-216031f3837a', version='HTTP/1.1', remote_ip='::1') 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 318s result = await result 318s ^^^^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 318s future.result() 318s ~~~~~~~~~~~~~^^ 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 318s yielded = self.gen.throw(exc) 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 318s yield maybe_future(km.shutdown_kernel(kernel_id)) 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 318s value = future.result() 318s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 318s raise self._exception.with_traceback(self._exception_tb) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 318s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 318s raise km.ready.exception() # type: ignore[misc] 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 318s await kernel_awaitable 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 318s result = await obj 318s ^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 318s raise e 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s WARNING NotebookApp:handlers.py:612 Unhandled error 318s ________ ERROR at teardown of SessionAPITest.test_create_with_kernel_id ________ 318s 318s @self.addCleanup 318s def cleanup_sessions(): 318s for session in self.sess_api.list().json(): 318s > self.sess_api.delete(session['id']) 318s 318s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 318s return self._req('DELETE', id) 318s ^^^^^^^^^^^^^^^^^^^^^^^ 318s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 318s response.raise_for_status() 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s 318s self = 318s 318s def raise_for_status(self): 318s """Raises :class:`HTTPError`, if one occurred.""" 318s 318s http_error_msg = "" 318s if isinstance(self.reason, bytes): 318s # We attempt to decode utf-8 first because some servers 318s # choose to localize their reason strings. If the string 318s # isn't utf-8, we fall back to iso-8859-1 for all other 318s # encodings. (See PR #3538) 318s try: 318s reason = self.reason.decode("utf-8") 318s except UnicodeDecodeError: 318s reason = self.reason.decode("iso-8859-1") 318s else: 318s reason = self.reason 318s 318s if 400 <= self.status_code < 500: 318s http_error_msg = ( 318s f"{self.status_code} Client Error: {reason} for url: {self.url}" 318s ) 318s 318s elif 500 <= self.status_code < 600: 318s http_error_msg = ( 318s f"{self.status_code} Server Error: {reason} for url: {self.url}" 318s ) 318s 318s if http_error_msg: 318s > raise HTTPError(http_error_msg, response=self) 318s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847 318s 318s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 318s ----------------------------- Captured stderr call ----------------------------- 318s Traceback (most recent call last): 318s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 318s return _run_code(code, main_globals, None, 318s "__main__", mod_spec) 318s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 318s exec(code, run_globals) 318s ~~~~^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 318s from ipykernel import kernelapp as app 318s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 318s from .connect import * # noqa: F403 318s ^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 318s from subprocess import PIPE, Popen 318s File "/usr/lib/python3.13/subprocess.py", line 125, in 318s import selectors 318s File "", line 1360, in _find_and_load 318s File "", line 1331, in _find_and_load_unlocked 318s File "", line 935, in _load_unlocked 318s File "", line 1019, in exec_module 318s File "", line 1140, in get_code 318s File "", line 751, in _validate_timestamp_pyc 318s File "", line 89, in _unpack_uint32 318s KeyboardInterrupt 318s ------------------------------ Captured log call ------------------------------- 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 318s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcw2q_12b/runtime/kernel-ee4364c1-051c-4d15-ab8d-e48005aa7262.json'] 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38033 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59197 318s INFO NotebookApp:kernelmanager.py:179 Kernel started: ee4364c1-051c-4d15-ab8d-e48005aa7262, name: python3 318s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 318s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 17.910000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.780000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.590000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.600000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 85144d9f-262c-4d77-9c7c-a37796624220 318s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 85144d9f-262c-4d77-9c7c-a37796624220 318s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b6520f13-e798-42c3-94e4-1ae18d6b9de6 (::1) 2.040000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ee4364c1-051c-4d15-ab8d-e48005aa7262 318s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ee4364c1-051c-4d15-ab8d-e48005aa7262 318s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 318s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847', version='HTTP/1.1', remote_ip='::1') 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 318s result = await result 318s ^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 318s yielded = self.gen.throw(exc) 318s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 318s yield maybe_future(sm.delete_session(session_id)) 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 318s value = future.result() 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 318s yielded = self.gen.send(value) 318s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 318s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 318s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 318s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 318s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 318s return _runner_map[name].run(inner) 318s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 318s return fut.result(None) 318s ~~~~~~~~~~^^^^^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 318s return self.__get_result() 318s ~~~~~~~~~~~~~~~~~^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 318s raise self._exception 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 318s stopper = ensure_async(km.shutdown_kernel(now, restart)) 318s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 318s return _runner_map[name].run(inner) 318s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 318s return fut.result(None) 318s ~~~~~~~~~~^^^^^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 318s return self.__get_result() 318s ~~~~~~~~~~~~~~~~~^^ 318s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 318s raise self._exception 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 318s raise e 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s WARNING NotebookApp:handlers.py:612 Unhandled error 318s ERROR NotebookApp:log.py:55 { 318s "Host": "localhost:12341", 318s "Accept": "*/*", 318s "User-Agent": "python-requests/2.32.5" 318s } 318s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 7.480000ms referer=None 318s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_kernel_id ______ 318s 318s @self.addCleanup 318s def cleanup_sessions(): 318s for session in self.sess_api.list().json(): 318s > self.sess_api.delete(session['id']) 318s 318s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 318s return self._req('DELETE', id) 318s ^^^^^^^^^^^^^^^^^^^^^^^ 318s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 318s response.raise_for_status() 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s 318s self = 318s 318s def raise_for_status(self): 318s """Raises :class:`HTTPError`, if one occurred.""" 318s 318s http_error_msg = "" 318s if isinstance(self.reason, bytes): 318s # We attempt to decode utf-8 first because some servers 318s # choose to localize their reason strings. If the string 318s # isn't utf-8, we fall back to iso-8859-1 for all other 318s # encodings. (See PR #3538) 318s try: 318s reason = self.reason.decode("utf-8") 318s except UnicodeDecodeError: 318s reason = self.reason.decode("iso-8859-1") 318s else: 318s reason = self.reason 318s 318s if 400 <= self.status_code < 500: 318s http_error_msg = ( 318s f"{self.status_code} Client Error: {reason} for url: {self.url}" 318s ) 318s 318s elif 500 <= self.status_code < 600: 318s http_error_msg = ( 318s f"{self.status_code} Server Error: {reason} for url: {self.url}" 318s ) 318s 318s if http_error_msg: 318s > raise HTTPError(http_error_msg, response=self) 318s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/660c5586-7955-43b3-a322-7bfab069ed29 318s 318s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 318s ----------------------------- Captured stderr call ----------------------------- 318s Traceback (most recent call last): 318s ------------------------------ Captured log call ------------------------------- 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 318s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp_fwce4n8/runtime/kernel-dc7a66e3-27e5-48ff-9b16-7447e9daafcb.json'] 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53119 318s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50353 318s INFO NotebookApp:kernelmanager.py:179 Kernel started: dc7a66e3-27e5-48ff-9b16-7447e9daafcb, name: python3 318s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 318s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.610000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 1.890000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.590000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.580000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f98dfcec-1111-4414-988d-0d107644f58a 318s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f98dfcec-1111-4414-988d-0d107644f58a 318s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b05313fa-02fc-41d3-882e-36c88ab60d5d (::1) 0.720000ms 318s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 318s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dc7a66e3-27e5-48ff-9b16-7447e9daafcb 318s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dc7a66e3-27e5-48ff-9b16-7447e9daafcb 318s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 318s await kernel_awaitable 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 318s result = await obj 318s ^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 318s raise e 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/660c5586-7955-43b3-a322-7bfab069ed29 (::1) 318s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/660c5586-7955-43b3-a322-7bfab069ed29', version='HTTP/1.1', remote_ip='::1') 318s Traceback (most recent call last): 318s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 318s result = await result 318s ^^^^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 318s future.result() 318s ~~~~~~~~~~~~~^^ 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 318s yielded = self.gen.throw(exc) 318s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 318s yield maybe_future(sm.delete_session(session_id)) 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 318s value = future.result() 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 318s yielded = self.gen.throw(exc) 318s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 318s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 318s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 318s value = future.result() 318s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 318s raise self._exception.with_traceback(self._exception_tb) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 318s result = coro.send(None) 318s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 318s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 318s raise km.ready.exception() # type: ignore[misc] 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 318s await kernel_awaitable 318s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 318s result = await obj 318s ^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 318s raise e 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 318s out = await method(self, *args, **kwargs) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 318s await self._async_finish_shutdown(restart=restart) 318s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 318s await asyncio.wait_for( 318s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 318s ) 318s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 318s async with timeouts.timeout(timeout): 318s ~~~~~~~~~~~~~~~~^^^^^^^^^ 318s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 318s raise RuntimeError("Timeout should be used inside a task") 318s RuntimeError: Timeout should be used inside a task 318s WARNING NotebookApp:handlers.py:612 Unhandled error 318s --------------------------- Captured stderr teardown --------------------------- 318s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 318s return _run_code(code, main_globals, None, 318s "__main__", mod_spec) 318s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 318s exec(code, run_globals) 318s ~~~~^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 318s from ipykernel import kernelapp as app 318s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 318s from .connect import * # noqa: F403 318s ^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 7, in 318s import json 318s File "/usr/lib/python3.13/json/__init__.py", line 106, in 318s from .decoder import JSONDecoder, JSONDecodeError 318s File "/usr/lib/python3.13/json/decoder.py", line 54, in 318s STRINGCHUNK = re.compile(r'(.*?)(["\\\x00-\x1f])', FLAGS) 318s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 318s return _compile(pattern, flags) 318s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 318s p = _compiler.compile(pattern, flags) 318s File "/usr/lib/python3.13/re/_compiler.py", line 748, in compile 318s p = _parser.parse(p, flags) 318s File "/usr/lib/python3.13/re/_parser.py", line 980, in parse 318s p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) 318s File "/usr/lib/python3.13/re/_parser.py", line 459, in _parse_sub 318s itemsappend(_parse(source, state, verbose, nested + 1, 318s ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s not nested and not items)) 318s ^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3.13/re/_parser.py", line 873, in _parse 318s subpatternappend((SUBPATTERN, (group, add_flags, del_flags, p))) 318s ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 318s File "/usr/lib/python3.13/re/_parser.py", line 175, in append 318s def append(self, code): 318s 318s KeyboardInterrupt 318s =================================== FAILURES =================================== 318s ______________________ KernelAPITest.test_default_kernel _______________________ 318s 318s self = 318s 318s def tearDown(self): 318s for k in self.kern_api.list().json(): 318s > self.kern_api.shutdown(k['id']) 318s 318s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 318s return self._req('DELETE', id) 318s ^^^^^^^^^^^^^^^^^^^^^^^ 318s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 318s response.raise_for_status() 318s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 318s 318s self = 318s 318s def raise_for_status(self): 318s """Raises :class:`HTTPError`, if one occurred.""" 318s 318s http_error_msg = "" 318s if isinstance(self.reason, bytes): 318s # We attempt to decode utf-8 first because some servers 318s # choose to localize their reason strings. If the string 318s # 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/6cbda0c8-5b8c-419b-88af-d61825f155f5 319s 319s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 319s ------------------------------ Captured log setup ------------------------------ 319s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp8z7y_fd5/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp8z7y_fd5/etc/jupyter'] for config files 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp8z7y_fd5/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.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp8z7y_fd5/config 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp8z7y_fd5/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.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 319s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp8z7y_fd5/config 319s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp8z7y_fd5/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 (::1) 0.690000ms referer=None 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 "", 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 1648, in find_spec 319s KeyboardInterrupt 319s ------------------------------ Captured log call ------------------------------- 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8z7y_fd5/runtime/kernel-6cbda0c8-5b8c-419b-88af-d61825f155f5.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51599 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36079 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 6cbda0c8-5b8c-419b-88af-d61825f155f5, 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 (::1) 60.400000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.720000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 6cbda0c8-5b8c-419b-88af-d61825f155f5 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6cbda0c8-5b8c-419b-88af-d61825f155f5 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/6cbda0c8-5b8c-419b-88af-d61825f155f5 (::1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/6cbda0c8-5b8c-419b-88af-d61825f155f5', version='HTTP/1.1', remote_ip='::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/6cbda0c8-5b8c-419b-88af-d61825f155f5 (::1) 8.720000ms referer=None 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/08a79de9-b5c9-4bfc-b0de-a8829077520c 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 "", 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 ::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/tmp8z7y_fd5/runtime/kernel-08a79de9-b5c9-4bfc-b0de-a8829077520c.json'] 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39521 319s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:42627 319s INFO NotebookApp:kernelmanager.py:179 Kernel started: 08a79de9-b5c9-4bfc-b0de-a8829077520c, 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 (::1) 18.170000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 319s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/08a79de9-b5c9-4bfc-b0de-a8829077520c (::1) 0.630000ms 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 319s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::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 (::1) 0.740000ms referer=None 319s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 319s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 08a79de9-b5c9-4bfc-b0de-a8829077520c 319s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 08a79de9-b5c9-4bfc-b0de-a8829077520c 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/08a79de9-b5c9-4bfc-b0de-a8829077520c (::1) 319s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/08a79de9-b5c9-4bfc-b0de-a8829077520c', version='HTTP/1.1', remote_ip='::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) 320s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 320s return fut.result(None) 320s ~~~~~~~~~~^^^^^^ 320s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 320s return self.__get_result() 320s ~~~~~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 320s raise self._exception 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/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/kernels/08a79de9-b5c9-4bfc-b0de-a8829077520c (::1) 6.970000ms referer=None 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.560000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 6cbda0c8-5b8c-419b-88af-d61825f155f5 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 6cbda0c8-5b8c-419b-88af-d61825f155f5 320s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/6cbda0c8-5b8c-419b-88af-d61825f155f5 (::1) 0.850000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 08a79de9-b5c9-4bfc-b0de-a8829077520c 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 08a79de9-b5c9-4bfc-b0de-a8829077520c 320s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/08a79de9-b5c9-4bfc-b0de-a8829077520c (::1) 0.820000ms 320s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 320s 320s self = 320s 320s def test_main_kernel_handler(self): 320s # POST request 320s r = self.kern_api.start() 320s kern1 = r.json() 320s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 320s self.assertEqual(r.status_code, 201) 320s self.assertIsInstance(kern1, dict) 320s 320s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 320s expected_csp = '; '.join([ 320s "frame-ancestors 'self'", 320s 'report-uri ' + report_uri, 320s "default-src 'none'" 320s ]) 320s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 320s 320s # GET request 320s r = self.kern_api.list() 320s self.assertEqual(r.status_code, 200) 320s assert isinstance(r.json(), list) 320s self.assertEqual(r.json()[0]['id'], kern1['id']) 320s self.assertEqual(r.json()[0]['name'], kern1['name']) 320s 320s # create another kernel and check that they both are added to the 320s # list of kernels from a GET request 320s kern2 = self.kern_api.start().json() 320s assert isinstance(kern2, dict) 320s r = self.kern_api.list() 320s kernels = r.json() 320s self.assertEqual(r.status_code, 200) 320s assert isinstance(kernels, list) 320s self.assertEqual(len(kernels), 2) 320s 320s # Interrupt a kernel 320s r = self.kern_api.interrupt(kern2['id']) 320s self.assertEqual(r.status_code, 204) 320s 320s # Restart a kernel 320s > r = self.kern_api.restart(kern2['id']) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s 320s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 320s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 320s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 320s return self._req('POST', url_path_join(id, 'restart')) 320s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/eb91eed8-f207-43ef-b09b-e71cbf180be6/restart 320s 320s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 320s ----------------------------- Captured stderr call ----------------------------- 320s Traceback (most recent call last): 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 1023, in exec_module 320s File "", line 488, in _call_with_frames_removed 320s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 320s from ._local 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 320s During handling of the above exception, another exception occurred: 320s 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 "", line 1357, in _find_and_load 320s File "", line 420, in __exit__ 320s KeyboardInterrupt 320s Traceback (most recent call last): 320s ------------------------------ Captured log call ------------------------------- 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8z7y_fd5/runtime/kernel-65e0eb6e-268b-41fb-9f78-94a7e922c0fe.json'] 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:49819 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60643 320s INFO NotebookApp:kernelmanager.py:179 Kernel started: 65e0eb6e-268b-41fb-9f78-94a7e922c0fe, 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 (::1) 14.770000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.570000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8z7y_fd5/runtime/kernel-eb91eed8-f207-43ef-b09b-e71cbf180be6.json'] 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40181 320s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47343 320s INFO NotebookApp:kernelmanager.py:179 Kernel started: eb91eed8-f207-43ef-b09b-e71cbf180be6, 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 (::1) 24.630000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.590000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 320s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: eb91eed8-f207-43ef-b09b-e71cbf180be6 320s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/eb91eed8-f207-43ef-b09b-e71cbf180be6/interrupt (::1) 0.820000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 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:handlers.py:91 Exception restarting kernel 320s Traceback (most recent call last): 320s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 320s yield maybe_future(km.restart_kernel(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 314, in restart_kernel 320s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 320s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 320s return _runner_map[name].run(inner) 320s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 320s return fut.result(None) 320s ~~~~~~~~~~^^^^^^ 320s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 320s return self.__get_result() 320s ~~~~~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 320s raise self._exception 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/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 320s await ensure_async(kernel.restart_kernel(now=now)) 320s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 320s return _runner_map[name].run(inner) 320s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 320s return fut.result(None) 320s ~~~~~~~~~~^^^^^^ 320s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 320s return self.__get_result() 320s ~~~~~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 320s raise self._exception 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/jupyter_client/manager.py", line 590, in _async_restart_kernel 320s await self._async_shutdown_kernel(now=now, restart=True) 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: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 POST /a%40b/api/kernels/eb91eed8-f207-43ef-b09b-e71cbf180be6/restart (::1) 8.690000ms referer=None 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 320s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 320s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 320s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 65e0eb6e-268b-41fb-9f78-94a7e922c0fe 320s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 65e0eb6e-268b-41fb-9f78-94a7e922c0fe 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:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/65e0eb6e-268b-41fb-9f78-94a7e922c0fe (::1) 320s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/65e0eb6e-268b-41fb-9f78-94a7e922c0fe', version='HTTP/1.1', remote_ip='::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/dist-packages/tornado/gen.py", line 239, in wrapper 320s yielded = ctx_run(next, result) 320s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 320s yield maybe_future(km.shutdown_kernel(kernel_id)) 320s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 320s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 320s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 320s return _runner_map[name].run(inner) 320s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 320s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 320s return fut.result(None) 320s ~~~~~~~~~~^^^^^^ 320s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 320s return self.__get_result() 320s ~~~~~~~~~~~~~~~~~^^ 320s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 320s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 320s stopper = ensure_async(km.shutdown_kernel(now, restart)) 321s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 321s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 321s return _runner_map[name].run(inner) 321s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 321s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 321s return fut.result(None) 321s ~~~~~~~~~~^^^^^^ 321s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 321s return self.__get_result() 321s ~~~~~~~~~~~~~~~~~^^ 321s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 321s raise self._exception 321s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 321s result = coro.send(None) 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 321s raise e 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 321s out = await method(self, *args, **kwargs) 321s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 321s await self._async_finish_shutdown(restart=restart) 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 321s await asyncio.wait_for( 321s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 321s ) 321s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 321s async with timeouts.timeout(timeout): 321s ~~~~~~~~~~~~~~~~^^^^^^^^^ 321s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 321s raise RuntimeError("Timeout should be used inside a task") 321s RuntimeError: Timeout should be used inside a task 321s WARNING NotebookApp:handlers.py:612 Unhandled error 321s ________________________ KernelAPITest.test_no_kernels _________________________ 321s 321s self = 321s 321s def test_no_kernels(self): 321s """Make sure there are no kernels running at the start""" 321s kernels = self.kern_api.list().json() 321s > self.assertEqual(kernels, []) 321s E AssertionError: Lists differ: [{'id': '65e0eb6e-268b-41fb-9f78-94a7e922c[281 chars]: 0}] != [] 321s E 321s E First list contains 2 additional elements. 321s E First extra element 0: 321s E {'id': '65e0eb6e-268b-41fb-9f78-94a7e922c0fe', 'name': 'python3', 'last_activity': '2026-02-06T02:22:16.163868Z', 'execution_state': 'starting', 'connections': 0} 321s E 321s E + [] 321s E - [{'connections': 0, 321s E - 'execution_state': 'starting', 321s E - 'id': '65e0eb6e-268b-41fb-9f78-94a7e922c0fe', 321s E - 'last_activity': '2026-02-06T02:22:16.163868Z', 321s E - 'name': 'python3'}, 321s E - {'connections': 0, 321s E - 'execution_state': 'starting', 321s E - 'id': 'eb91eed8-f207-43ef-b09b-e71cbf180be6', 321s E - 'last_activity': '2026-02-06T02:22:16.197592Z', 321s E - 'name': 'python3'}] 321s 321s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 321s ------------------------------ Captured log call ------------------------------- 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.580000ms 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.500000ms 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 65e0eb6e-268b-41fb-9f78-94a7e922c0fe 321s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 65e0eb6e-268b-41fb-9f78-94a7e922c0fe 321s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/65e0eb6e-268b-41fb-9f78-94a7e922c0fe (::1) 0.730000ms 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for eb91eed8-f207-43ef-b09b-e71cbf180be6 321s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: eb91eed8-f207-43ef-b09b-e71cbf180be6 321s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/eb91eed8-f207-43ef-b09b-e71cbf180be6 (::1) 0.750000ms 321s ---------------------------- Captured log teardown ----------------------------- 321s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 321s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 321s _____________________ AsyncKernelAPITest.test_connections ______________________ 321s 321s self = 321s 321s def tearDown(self): 321s for k in self.kern_api.list().json(): 321s > self.kern_api.shutdown(k['id']) 321s 321s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 321s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 321s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 321s return self._req('DELETE', id) 321s ^^^^^^^^^^^^^^^^^^^^^^^ 321s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 321s response.raise_for_status() 321s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 321s 321s self = 321s 321s def raise_for_status(self): 321s """Raises :class:`HTTPError`, if one occurred.""" 321s 321s http_error_msg = "" 321s if isinstance(self.reason, bytes): 321s # We attempt to decode utf-8 first because some servers 321s # choose to localize their reason strings. If the string 321s # isn't utf-8, we fall back to iso-8859-1 for all other 321s # encodings. (See PR #3538) 321s try: 321s reason = self.reason.decode("utf-8") 321s except UnicodeDecodeError: 321s reason = self.reason.decode("iso-8859-1") 321s else: 321s reason = self.reason 321s 321s if 400 <= self.status_code < 500: 321s http_error_msg = ( 321s f"{self.status_code} Client Error: {reason} for url: {self.url}" 321s ) 321s 321s elif 500 <= self.status_code < 600: 321s http_error_msg = ( 321s f"{self.status_code} Server Error: {reason} for url: {self.url}" 321s ) 321s 321s if http_error_msg: 321s > raise HTTPError(http_error_msg, response=self) 321s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s 321s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 321s ------------------------------ Captured log setup ------------------------------ 321s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpc2tqpcfb/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpc2tqpcfb/etc/jupyter'] for config files 321s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpc2tqpcfb/etc/jupyter 321s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 321s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 321s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpc2tqpcfb/config 321s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpc2tqpcfb/etc/jupyter 321s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 321s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 321s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpc2tqpcfb/config 321s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpc2tqpcfb/notebooks 321s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 321s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 321s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 321s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 321s WARNING NotebookApp:handlers.py:612 Forbidden 321s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.440000ms referer=None 321s ------------------------------ Captured log call ------------------------------- 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 321s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc2tqpcfb/runtime/kernel-2c51c3b8-d608-4af8-ae43-863318e7fbc9.json'] 321s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45009 321s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57181 321s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2c51c3b8-d608-4af8-ae43-863318e7fbc9, name: python3 321s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 321s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 14.840000ms 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9 (::1) 0.550000ms 321s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9/channels 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 321s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45739 321s 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/'}]} 321s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel 2c51c3b8-d608-4af8-ae43-863318e7fbc9) to 5.4 (client). 321s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9/channels (::1) 491.220000ms 321s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9/channels 321s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57181 321s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45739 321s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45009 321s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46843 321s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45739 321s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45009 321s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 321s Setting websocket_ping_timeout=30000 321s DEBUG NotebookApp:handlers.py:255 Nudge: attempt 1 on kernel 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9 (::1) 0.590000ms 321s DEBUG NotebookApp:handlers.py:207 Nudge: IOPub received: 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s DEBUG NotebookApp:handlers.py:210 Nudge: resolving iopub future: 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s DEBUG NotebookApp:handlers.py:195 Nudge: shell info reply received: 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s DEBUG NotebookApp:handlers.py:197 Nudge: resolving shell future: 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s DEBUG NotebookApp:handlers.py:579 Websocket closed 2c51c3b8-d608-4af8-ae43-863318e7fbc9:44a137a5-9c9f22518b44fe6ccd22598f 321s INFO NotebookApp:kernelmanager.py:222 Starting buffering for 2c51c3b8-d608-4af8-ae43-863318e7fbc9:44a137a5-9c9f22518b44fe6ccd22598f 321s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 2c51c3b8-d608-4af8-ae43-863318e7fbc9:iopub 321s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9 (::1) 0.710000ms 321s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 2c51c3b8-d608-4af8-ae43-863318e7fbc9:iopub 321s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 2c51c3b8-d608-4af8-ae43-863318e7fbc9:iopub 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9 (::1) 0.640000ms 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.490000ms 321s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 321s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s INFO NotebookApp:kernelmanager.py:286 Discarding 3 buffered messages for 2c51c3b8-d608-4af8-ae43-863318e7fbc9:44a137a5-9c9f22518b44fe6ccd22598f 321s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2c51c3b8-d608-4af8-ae43-863318e7fbc9 321s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 321s Traceback (most recent call last): 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 321s out = await method(self, *args, **kwargs) 321s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 321s await self._async_finish_shutdown(restart=restart) 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 321s await asyncio.wait_for( 321s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 321s ) 321s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 321s async with timeouts.timeout(timeout): 321s ~~~~~~~~~~~~~~~~^^^^^^^^^ 321s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 321s raise RuntimeError("Timeout should be used inside a task") 321s RuntimeError: Timeout should be used inside a task 321s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 321s Traceback (most recent call last): 321s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 321s await kernel_awaitable 321s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 321s result = await obj 321s ^^^^^^^^^ 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 321s raise e 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 321s out = await method(self, *args, **kwargs) 321s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 321s await self._async_finish_shutdown(restart=restart) 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 321s await asyncio.wait_for( 321s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 321s ) 321s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 321s async with timeouts.timeout(timeout): 321s ~~~~~~~~~~~~~~~~^^^^^^^^^ 321s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 321s raise RuntimeError("Timeout should be used inside a task") 321s RuntimeError: Timeout should be used inside a task 321s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9 (::1) 321s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9', version='HTTP/1.1', remote_ip='::1') 321s Traceback (most recent call last): 321s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 321s result = await result 321s ^^^^^^^^^^^^ 321s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 321s future.result() 321s ~~~~~~~~~~~~~^^ 321s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 321s yielded = self.gen.throw(exc) 321s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 321s yield maybe_future(km.shutdown_kernel(kernel_id)) 321s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 321s value = future.result() 321s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 321s raise self._exception.with_traceback(self._exception_tb) 321s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 321s result = coro.send(None) 321s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 321s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 321s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 321s raise km.ready.exception() # type: ignore[misc] 321s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 321s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 321s await kernel_awaitable 321s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 321s result = await obj 321s ^^^^^^^^^ 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 321s raise e 321s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 321s out = await method(self, *args, **kwargs) 322s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 322s await self._async_finish_shutdown(restart=restart) 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 322s await asyncio.wait_for( 322s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 322s ) 322s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 322s async with timeouts.timeout(timeout): 322s ~~~~~~~~~~~~~~~~^^^^^^^^^ 322s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 322s raise RuntimeError("Timeout should be used inside a task") 322s RuntimeError: Timeout should be used inside a task 322s WARNING NotebookApp:handlers.py:612 Unhandled error 322s ERROR NotebookApp:log.py:55 { 322s "Host": "localhost:12341", 322s "Accept": "*/*", 322s "User-Agent": "python-requests/2.32.5" 322s } 322s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9 (::1) 7.010000ms referer=None 322s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 322s 322s self = 322s 322s def tearDown(self): 322s for k in self.kern_api.list().json(): 322s > self.kern_api.shutdown(k['id']) 322s 322s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 322s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 322s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 322s return self._req('DELETE', id) 322s ^^^^^^^^^^^^^^^^^^^^^^^ 322s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 322s response.raise_for_status() 322s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 322s 322s self = 322s 322s def raise_for_status(self): 322s """Raises :class:`HTTPError`, if one occurred.""" 322s 322s http_error_msg = "" 322s if isinstance(self.reason, bytes): 322s # We attempt to decode utf-8 first because some servers 322s # choose to localize their reason strings. If the string 322s # isn't utf-8, we fall back to iso-8859-1 for all other 322s # encodings. (See PR #3538) 322s try: 322s reason = self.reason.decode("utf-8") 322s except UnicodeDecodeError: 322s reason = self.reason.decode("iso-8859-1") 322s else: 322s reason = self.reason 322s 322s if 400 <= self.status_code < 500: 322s http_error_msg = ( 322s f"{self.status_code} Client Error: {reason} for url: {self.url}" 322s ) 322s 322s elif 500 <= self.status_code < 600: 322s http_error_msg = ( 322s f"{self.status_code} Server Error: {reason} for url: {self.url}" 322s ) 322s 322s if http_error_msg: 322s > raise HTTPError(http_error_msg, response=self) 322s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/391b3971-6a86-4c52-913a-cadf9f1afa28 322s 322s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 322s ----------------------------- Captured stderr call ----------------------------- 322s Traceback (most recent call last): 322s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 322s return _run_code(code, main_globals, None, 322s "__main__", mod_spec) 322s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 322s exec(code, run_globals) 322s ~~~~^^^^^^^^^^^^^^^^^^^ 322s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 322s from ipykernel import kernelapp as app 322s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 322s from .connect import * # noqa: F403 322s ^^^^^^^^^^^^^^^^^^^^^^ 322s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 322s from typing import TYPE_CHECKING, Any 322s File "/usr/lib/python3.13/typing.py", line 1726, in 322s class _CallableType(_SpecialGenericAlias, _root=True): 322s ...<29 lines>... 322s return self.copy_with(params) 322s File "/usr/lib/python3.13/typing.py", line 1745, in _CallableType 322s @_tp_cache 322s ^^^^^^^^^ 322s File "/usr/lib/python3.13/typing.py", line 436, in _tp_cache 322s return decorator(func) 322s File "/usr/lib/python3.13/typing.py", line 415, in decorator 322s def decorator(func): 322s 322s KeyboardInterrupt 322s ------------------------------ Captured log call ------------------------------- 322s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 322s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 322s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc2tqpcfb/runtime/kernel-391b3971-6a86-4c52-913a-cadf9f1afa28.json'] 322s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:51027 322s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55499 322s INFO NotebookApp:kernelmanager.py:179 Kernel started: 391b3971-6a86-4c52-913a-cadf9f1afa28, name: python3 322s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 322s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 26.590000ms 322s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 322s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.740000ms 322s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 322s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2c51c3b8-d608-4af8-ae43-863318e7fbc9 322s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2c51c3b8-d608-4af8-ae43-863318e7fbc9 322s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/2c51c3b8-d608-4af8-ae43-863318e7fbc9 (::1) 0.850000ms 322s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 322s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 391b3971-6a86-4c52-913a-cadf9f1afa28 322s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 391b3971-6a86-4c52-913a-cadf9f1afa28 322s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 322s Traceback (most recent call last): 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 322s out = await method(self, *args, **kwargs) 322s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 322s await self._async_finish_shutdown(restart=restart) 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 322s await asyncio.wait_for( 322s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 322s ) 322s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 322s async with timeouts.timeout(timeout): 322s ~~~~~~~~~~~~~~~~^^^^^^^^^ 322s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 322s raise RuntimeError("Timeout should be used inside a task") 322s RuntimeError: Timeout should be used inside a task 322s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 322s Traceback (most recent call last): 322s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 322s await kernel_awaitable 322s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 322s result = await obj 322s ^^^^^^^^^ 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 322s raise e 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 322s out = await method(self, *args, **kwargs) 322s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 322s await self._async_finish_shutdown(restart=restart) 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 322s await asyncio.wait_for( 322s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 322s ) 322s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 322s async with timeouts.timeout(timeout): 322s ~~~~~~~~~~~~~~~~^^^^^^^^^ 322s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 322s raise RuntimeError("Timeout should be used inside a task") 322s RuntimeError: Timeout should be used inside a task 322s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/391b3971-6a86-4c52-913a-cadf9f1afa28 (::1) 322s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/391b3971-6a86-4c52-913a-cadf9f1afa28', version='HTTP/1.1', remote_ip='::1') 322s Traceback (most recent call last): 322s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 322s result = await result 322s ^^^^^^^^^^^^ 322s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 322s future.result() 322s ~~~~~~~~~~~~~^^ 322s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 322s yielded = self.gen.throw(exc) 322s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 322s yield maybe_future(km.shutdown_kernel(kernel_id)) 322s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 322s value = future.result() 322s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 322s raise self._exception.with_traceback(self._exception_tb) 322s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 322s result = coro.send(None) 322s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 322s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 322s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 322s raise km.ready.exception() # type: ignore[misc] 322s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 322s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 322s await kernel_awaitable 322s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 322s result = await obj 322s ^^^^^^^^^ 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 322s raise e 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 322s out = await method(self, *args, **kwargs) 322s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 322s await self._async_finish_shutdown(restart=restart) 322s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 322s await asyncio.wait_for( 322s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 322s ) 322s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 322s async with timeouts.timeout(timeout): 322s ~~~~~~~~~~~~~~~~^^^^^^^^^ 322s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 322s raise RuntimeError("Timeout should be used inside a task") 322s RuntimeError: Timeout should be used inside a task 322s WARNING NotebookApp:handlers.py:612 Unhandled error 322s ERROR NotebookApp:log.py:55 { 322s "Host": "localhost:12341", 322s "Accept": "*/*", 322s "User-Agent": "python-requests/2.32.5" 322s } 322s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/391b3971-6a86-4c52-913a-cadf9f1afa28 (::1) 11.220000ms referer=None 322s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 322s 322s self = 322s 322s def test_kernel_handler(self): 322s # GET kernel with given id 322s kid = self.kern_api.start().json()['id'] 322s r = self.kern_api.get(kid) 322s kern1 = r.json() 322s self.assertEqual(r.status_code, 200) 322s assert isinstance(kern1, dict) 322s self.assertIn('id', kern1) 322s self.assertEqual(kern1['id'], kid) 322s 322s # Request a bad kernel id and check that a JSON 322s # message is returned! 322s bad_id = '111-111-111-111-111' 322s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 322s self.kern_api.get(bad_id) 322s 322s # DELETE kernel with id 322s > r = self.kern_api.shutdown(kid) 322s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 322s 322s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 322s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 322s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 322s return self._req('DELETE', id) 322s ^^^^^^^^^^^^^^^^^^^^^^^ 322s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 322s response.raise_for_status() 322s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 322s 322s self = 322s 322s def raise_for_status(self): 322s """Raises :class:`HTTPError`, if one occurred.""" 322s 322s http_error_msg = "" 322s if isinstance(self.reason, bytes): 322s # We attempt to decode utf-8 first because some servers 322s # choose to localize their reason strings. If the string 322s # isn't utf-8, we fall back to iso-8859-1 for all other 322s # encodings. (See PR #3538) 322s try: 322s reason = self.reason.decode("utf-8") 322s except UnicodeDecodeError: 322s reason = self.reason.decode("iso-8859-1") 322s else: 322s reason = self.reason 322s 322s if 400 <= self.status_code < 500: 322s http_error_msg = ( 322s f"{self.status_code} Client Error: {reason} for url: {self.url}" 322s ) 322s 322s elif 500 <= self.status_code < 600: 322s http_error_msg = ( 322s f"{self.status_code} Server Error: {reason} for url: {self.url}" 322s ) 322s 322s if http_error_msg: 322s > raise HTTPError(http_error_msg, response=self) 322s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/kernels/cfaeddc8-a9a0-48c8-a705-a0918396f38f 322s 322s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 322s ----------------------------- Captured stderr call ----------------------------- 322s Traceback (most recent call last): 322s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 322s return _run_code(code, main_globals, None, 322s "__main__", mod_spec) 322s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 322s exec(code, run_globals) 323s ~~~~^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 323s from ipykernel import kernelapp as app 323s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 323s from .connect import * # noqa: F403 323s ^^^^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 323s from subprocess import PIPE, Popen 323s File "/usr/lib/python3.13/subprocess.py", line 46, in 323s import locale 323s File "/usr/lib/python3.13/locale.py", line 47, in 323s from _locale import * 323s KeyboardInterrupt 323s ------------------------------ Captured log call ------------------------------- 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 323s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc2tqpcfb/runtime/kernel-cfaeddc8-a9a0-48c8-a705-a0918396f38f.json'] 323s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50497 323s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39693 323s INFO NotebookApp:kernelmanager.py:179 Kernel started: cfaeddc8-a9a0-48c8-a705-a0918396f38f, name: python3 323s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 323s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 21.040000ms 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/cfaeddc8-a9a0-48c8-a705-a0918396f38f (::1) 0.630000ms 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1): Kernel does not exist: 111-111-111-111-111 323s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 323s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1) 0.710000ms referer=None 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for cfaeddc8-a9a0-48c8-a705-a0918396f38f 323s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: cfaeddc8-a9a0-48c8-a705-a0918396f38f 323s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 323s Traceback (most recent call last): 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 323s out = await method(self, *args, **kwargs) 323s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 323s await self._async_finish_shutdown(restart=restart) 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 323s await asyncio.wait_for( 323s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 323s ) 323s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 323s async with timeouts.timeout(timeout): 323s ~~~~~~~~~~~~~~~~^^^^^^^^^ 323s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 323s raise RuntimeError("Timeout should be used inside a task") 323s RuntimeError: Timeout should be used inside a task 323s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 323s Traceback (most recent call last): 323s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 323s await kernel_awaitable 323s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 323s result = await obj 323s ^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 323s raise e 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 323s out = await method(self, *args, **kwargs) 323s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 323s await self._async_finish_shutdown(restart=restart) 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 323s await asyncio.wait_for( 323s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 323s ) 323s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 323s async with timeouts.timeout(timeout): 323s ~~~~~~~~~~~~~~~~^^^^^^^^^ 323s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 323s raise RuntimeError("Timeout should be used inside a task") 323s RuntimeError: Timeout should be used inside a task 323s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/cfaeddc8-a9a0-48c8-a705-a0918396f38f (::1) 323s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/cfaeddc8-a9a0-48c8-a705-a0918396f38f', version='HTTP/1.1', remote_ip='::1') 323s Traceback (most recent call last): 323s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 323s result = await result 323s ^^^^^^^^^^^^ 323s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 323s future.result() 323s ~~~~~~~~~~~~~^^ 323s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 323s yielded = self.gen.throw(exc) 323s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 323s yield maybe_future(km.shutdown_kernel(kernel_id)) 323s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 323s value = future.result() 323s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 323s raise self._exception.with_traceback(self._exception_tb) 323s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 323s result = coro.send(None) 323s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 323s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 323s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 323s raise km.ready.exception() # type: ignore[misc] 323s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 323s await kernel_awaitable 323s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 323s result = await obj 323s ^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 323s raise e 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 323s out = await method(self, *args, **kwargs) 323s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 323s await self._async_finish_shutdown(restart=restart) 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 323s await asyncio.wait_for( 323s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 323s ) 323s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 323s async with timeouts.timeout(timeout): 323s ~~~~~~~~~~~~~~~~^^^^^^^^^ 323s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 323s raise RuntimeError("Timeout should be used inside a task") 323s RuntimeError: Timeout should be used inside a task 323s WARNING NotebookApp:handlers.py:612 Unhandled error 323s ERROR NotebookApp:log.py:55 { 323s "Host": "localhost:12341", 323s "Accept": "*/*", 323s "User-Agent": "python-requests/2.32.5" 323s } 323s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/kernels/cfaeddc8-a9a0-48c8-a705-a0918396f38f (::1) 8.600000ms referer=None 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 2.080000ms 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 391b3971-6a86-4c52-913a-cadf9f1afa28 323s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 391b3971-6a86-4c52-913a-cadf9f1afa28 323s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/391b3971-6a86-4c52-913a-cadf9f1afa28 (::1) 2.070000ms 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for cfaeddc8-a9a0-48c8-a705-a0918396f38f 323s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: cfaeddc8-a9a0-48c8-a705-a0918396f38f 323s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/cfaeddc8-a9a0-48c8-a705-a0918396f38f (::1) 0.620000ms 323s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 323s 323s self = 323s 323s def test_main_kernel_handler(self): 323s # POST request 323s r = self.kern_api.start() 323s kern1 = r.json() 323s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 323s self.assertEqual(r.status_code, 201) 323s self.assertIsInstance(kern1, dict) 323s 323s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 323s expected_csp = '; '.join([ 323s "frame-ancestors 'self'", 323s 'report-uri ' + report_uri, 323s "default-src 'none'" 323s ]) 323s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 323s 323s # GET request 323s r = self.kern_api.list() 323s self.assertEqual(r.status_code, 200) 323s assert isinstance(r.json(), list) 323s self.assertEqual(r.json()[0]['id'], kern1['id']) 323s self.assertEqual(r.json()[0]['name'], kern1['name']) 323s 323s # create another kernel and check that they both are added to the 323s # list of kernels from a GET request 323s kern2 = self.kern_api.start().json() 323s assert isinstance(kern2, dict) 323s r = self.kern_api.list() 323s kernels = r.json() 323s self.assertEqual(r.status_code, 200) 323s assert isinstance(kernels, list) 323s self.assertEqual(len(kernels), 2) 323s 323s # Interrupt a kernel 323s r = self.kern_api.interrupt(kern2['id']) 323s self.assertEqual(r.status_code, 204) 323s 323s # Restart a kernel 323s > r = self.kern_api.restart(kern2['id']) 323s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 323s 323s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 323s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 323s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 323s return self._req('POST', url_path_join(id, 'restart')) 323s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 323s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: in _req 323s response.raise_for_status() 323s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 323s 323s self = 323s 323s def raise_for_status(self): 323s """Raises :class:`HTTPError`, if one occurred.""" 323s 323s http_error_msg = "" 323s if isinstance(self.reason, bytes): 323s # We attempt to decode utf-8 first because some servers 323s # choose to localize their reason strings. If the string 323s # isn't utf-8, we fall back to iso-8859-1 for all other 323s # encodings. (See PR #3538) 323s try: 323s reason = self.reason.decode("utf-8") 323s except UnicodeDecodeError: 323s reason = self.reason.decode("iso-8859-1") 323s else: 323s reason = self.reason 323s 323s if 400 <= self.status_code < 500: 323s http_error_msg = ( 323s f"{self.status_code} Client Error: {reason} for url: {self.url}" 323s ) 323s 323s elif 500 <= self.status_code < 600: 323s http_error_msg = ( 323s f"{self.status_code} Server Error: {reason} for url: {self.url}" 323s ) 323s 323s if http_error_msg: 323s > raise HTTPError(http_error_msg, response=self) 323s E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/1f13dd5f-01d8-491b-9c41-478e5b5246c5/restart 323s 323s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 323s ----------------------------- Captured stderr call ----------------------------- 323s Traceback (most recent call last): 323s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 323s return _run_code(code, main_globals, None, 323s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 323s exec(code, run_globals) 323s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 323s from pathlib import Path 323s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 323s from ._abc import * 323s File "/usr/lib/python3.13/pathlib/_abc.py", line 14, in 323s import functools 323s File "/usr/lib/python3.13/functools.py", line 18, in 323s from collections import namedtuple 323s File "/usr/lib/python3.13/collections/__init__.py", line 39, in 323s from operator import eq as _eq 323s File "", line 1360, in _find_and_load 323s File "", line 1331, in _find_and_load_unlocked 323s File "", line 935, in _load_unlocked 323s File "", line 1019, in exec_module 323s File "", line 1152, in get_code 323s File "", line 781, in _compile_bytecode 323s KeyboardInterrupt 323s Traceback (most recent call last): 323s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 323s return _run_code(code, main_globals, None, 323s "__main__", mod_spec) 323s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 323s exec(code, run_globals) 323s ~~~~^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 323s from ipykernel import kernelapp as app 323s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 323s from .connect import * # noqa: F403 323s ^^^^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 12, in 323s import jupyter_client 323s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 323s from .asynchronous import AsyncKernelClient 323s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 323s from .client import AsyncKernelClient # noqa 323s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 323s import zmq.asyncio 323s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 323s import asyncio 323s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 323s from .base_events import * 323s File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in 323s import concurrent.futures 323s File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in 323s from concurrent.futures._base import (FIRST_COMPLETED, 323s ...<9 lines>... 323s as_completed) 323s File "/usr/lib/python3.13/concurrent/futures/_base.py", line 7, in 323s import logging 323s File "/usr/lib/python3.13/logging/__init__.py", line 1296, in 323s class PlaceHolder(object): 323s ...<16 lines>... 323s self.loggerMap[alogger] = None 323s KeyboardInterrupt 323s ------------------------------ Captured log call ------------------------------- 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 323s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc2tqpcfb/runtime/kernel-8d34030f-0536-4c42-89f8-216031f3837a.json'] 323s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52295 323s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56733 323s INFO NotebookApp:kernelmanager.py:179 Kernel started: 8d34030f-0536-4c42-89f8-216031f3837a, name: python3 323s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 323s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 15.460000ms 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.900000ms 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 323s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpc2tqpcfb/runtime/kernel-1f13dd5f-01d8-491b-9c41-478e5b5246c5.json'] 323s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60553 323s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58397 323s INFO NotebookApp:kernelmanager.py:179 Kernel started: 1f13dd5f-01d8-491b-9c41-478e5b5246c5, name: python3 323s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'} 323s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 16.740000ms 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.870000ms 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 1f13dd5f-01d8-491b-9c41-478e5b5246c5 323s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/1f13dd5f-01d8-491b-9c41-478e5b5246c5/interrupt (::1) 3.860000ms 323s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 323s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 323s Traceback (most recent call last): 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 323s out = await method(self, *args, **kwargs) 323s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 323s await self._async_finish_shutdown(restart=restart) 323s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 323s await asyncio.wait_for( 323s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 324s ) 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 324s async with tim/usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 324s gc.collect() 324s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 324s eouts.timeout(timeout): 324s ~~~~~~~~~~~~~~~~^^^^^^^^^ 324s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 324s raise RuntimeError("Timeout should be used inside a task") 324s RuntimeError: Timeout should be used inside a task 324s ERROR NotebookApp:handlers.py:91 Exception restarting kernel 324s Traceback (most recent call last): 324s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 324s yield maybe_future(km.restart_kernel(kernel_id)) 324s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 324s value = future.result() 324s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 324s raise self._exception.with_traceback(self._exception_tb) 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 291, in __step_run_and_handle_result 324s result = coro.throw(exc) 324s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 324s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 324s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 324s yield self # This tells Task to wait for completion. 324s ^^^^^^^^^^ 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 324s future.result() 324s ~~~~~~~~~~~~~^^ 324s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 324s raise self._exception.with_traceback(self._exception_tb) 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 324s result = coro.send(None) 324s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 324s await ensure_async(kernel.restart_kernel(now=now)) 324s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 324s result = await obj 324s ^^^^^^^^^ 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 590, in _async_restart_kernel 324s await self._async_shutdown_kernel(now=now, restart=True) 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 324s raise e 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 324s out = await method(self, *args, **kwargs) 324s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 324s await self._async_finish_shutdown(restart=restart) 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 324s await asyncio.wait_for( 324s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 324s ) 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 324s async with timeouts.timeout(timeout): 324s ~~~~~~~~~~~~~~~~^^^^^^^^^ 324s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 324s raise RuntimeError("Timeout should be used inside a task") 324s RuntimeError: Timeout should be used inside a task 324s ERROR NotebookApp:log.py:55 { 324s "Host": "localhost:12341", 324s "Accept": "*/*", 324s "User-Agent": "python-requests/2.32.5" 324s } 324s ERROR NotebookApp:log.py:59 500 POST /a%40b/api/kernels/1f13dd5f-01d8-491b-9c41-478e5b5246c5/restart (::1) 6.610000ms referer=None 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.530000ms 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8d34030f-0536-4c42-89f8-216031f3837a 324s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8d34030f-0536-4c42-89f8-216031f3837a 324s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 324s Traceback (most recent call last): 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 324s out = await method(self, *args, **kwargs) 324s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 324s await self._async_finish_shutdown(restart=restart) 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 324s await asyncio.wait_for( 324s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 324s ) 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 324s async with timeouts.timeout(timeout): 324s ~~~~~~~~~~~~~~~~^^^^^^^^^ 324s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 324s raise RuntimeError("Timeout should be used inside a task") 324s RuntimeError: Timeout should be used inside a task 324s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 324s Traceback (most recent call last): 324s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 324s await kernel_awaitable 324s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 324s result = await obj 324s ^^^^^^^^^ 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 324s raise e 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 324s out = await method(self, *args, **kwargs) 324s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 324s await self._async_finish_shutdown(restart=restart) 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 324s await asyncio.wait_for( 324s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 324s ) 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 324s async with timeouts.timeout(timeout): 324s ~~~~~~~~~~~~~~~~^^^^^^^^^ 324s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 324s raise RuntimeError("Timeout should be used inside a task") 324s RuntimeError: Timeout should be used inside a task 324s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/8d34030f-0536-4c42-89f8-216031f3837a (::1) 324s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/8d34030f-0536-4c42-89f8-216031f3837a', version='HTTP/1.1', remote_ip='::1') 324s Traceback (most recent call last): 324s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 324s result = await result 324s ^^^^^^^^^^^^ 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 324s future.result() 324s ~~~~~~~~~~~~~^^ 324s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 324s yielded = self.gen.throw(exc) 324s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 324s yield maybe_future(km.shutdown_kernel(kernel_id)) 324s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 324s value = future.result() 324s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 324s raise self._exception.with_traceback(self._exception_tb) 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 324s result = coro.send(None) 324s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 324s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 324s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 324s raise km.ready.exception() # type: ignore[misc] 324s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 324s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 324s await kernel_awaitable 324s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 324s result = await obj 324s ^^^^^^^^^ 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 324s raise e 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 324s out = await method(self, *args, **kwargs) 324s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 324s await self._async_finish_shutdown(restart=restart) 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 324s await asyncio.wait_for( 324s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 324s ) 324s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 324s async with timeouts.timeout(timeout): 324s ~~~~~~~~~~~~~~~~^^^^^^^^^ 324s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 324s raise RuntimeError("Timeout should be used inside a task") 324s RuntimeError: Timeout should be used inside a task 324s WARNING NotebookApp:handlers.py:612 Unhandled error 324s ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 324s 324s self = 324s 324s def test_no_kernels(self): 324s """Make sure there are no kernels running at the start""" 324s kernels = self.kern_api.list().json() 324s > self.assertEqual(kernels, []) 324s E AssertionError: Lists differ: [{'id': '8d34030f-0536-4c42-89f8-216031f38[281 chars]: 0}] != [] 324s E 324s E First list contains 2 additional elements. 324s E First extra element 0: 324s E {'id': '8d34030f-0536-4c42-89f8-216031f3837a', 'name': 'python3', 'last_activity': '2026-02-06T02:22:17.104174Z', 'execution_state': 'starting', 'connections': 0} 324s E 324s E + [] 324s E - [{'connections': 0, 324s E - 'execution_state': 'starting', 324s E - 'id': '8d34030f-0536-4c42-89f8-216031f3837a', 324s E - 'last_activity': '2026-02-06T02:22:17.104174Z', 324s E - 'name': 'python3'}, 324s E - {'connections': 0, 324s E - 'execution_state': 'starting', 324s E - 'id': '1f13dd5f-01d8-491b-9c41-478e5b5246c5', 324s E - 'last_activity': '2026-02-06T02:22:17.124475Z', 324s E - 'name': 'python3'}] 324s 324s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 324s ------------------------------ Captured log call ------------------------------- 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.580000ms 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.730000ms 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 8d34030f-0536-4c42-89f8-216031f3837a 324s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8d34030f-0536-4c42-89f8-216031f3837a 324s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/8d34030f-0536-4c42-89f8-216031f3837a (::1) 1.840000ms 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 1f13dd5f-01d8-491b-9c41-478e5b5246c5 324s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 1f13dd5f-01d8-491b-9c41-478e5b5246c5 324s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/1f13dd5f-01d8-491b-9c41-478e5b5246c5 (::1) 1.190000ms 324s ---------------------------- Captured log teardown ----------------------------- 324s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 324s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: cfaeddc8-a9a0-48c8-a705-a0918396f38f 324s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2c51c3b8-d608-4af8-ae43-863318e7fbc9 324s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 8d34030f-0536-4c42-89f8-216031f3837a 324s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 391b3971-6a86-4c52-913a-cadf9f1afa28 324s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 324s __________________________ SessionAPITest.test_create __________________________ 324s 324s @self.addCleanup 324s def cleanup_sessions(): 324s for session in self.sess_api.list().json(): 324s > self.sess_api.delete(session['id']) 324s 324s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 324s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 324s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 324s return self._req('DELETE', id) 324s ^^^^^^^^^^^^^^^^^^^^^^^ 324s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 324s response.raise_for_status() 324s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 324s 324s self = 324s 324s def raise_for_status(self): 324s """Raises :class:`HTTPError`, if one occurred.""" 324s 324s http_error_msg = "" 324s if isinstance(self.reason, bytes): 324s # We attempt to decode utf-8 first because some servers 324s # choose to localize their reason strings. If the string 324s # isn't utf-8, we fall back to iso-8859-1 for all other 324s # encodings. (See PR #3538) 324s try: 324s reason = self.reason.decode("utf-8") 324s except UnicodeDecodeError: 324s reason = self.reason.decode("iso-8859-1") 324s else: 324s reason = self.reason 324s 324s if 400 <= self.status_code < 500: 324s http_error_msg = ( 324s f"{self.status_code} Client Error: {reason} for url: {self.url}" 324s ) 324s 324s elif 500 <= self.status_code < 600: 324s http_error_msg = ( 324s f"{self.status_code} Server Error: {reason} for url: {self.url}" 324s ) 324s 324s if http_error_msg: 324s > raise HTTPError(http_error_msg, response=self) 324s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/325234e4-9845-4227-8045-1d70d234ef97 324s 324s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 324s ------------------------------ Captured log setup ------------------------------ 324s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmpcw2q_12b/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmpcw2q_12b/etc/jupyter'] for config files 324s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpcw2q_12b/etc/jupyter 324s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 324s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 324s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmpcw2q_12b/config 324s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpcw2q_12b/etc/jupyter 324s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 324s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 324s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmpcw2q_12b/config 324s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpcw2q_12b/notebooks 324s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 324s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 324s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 324s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 324s WARNING NotebookApp:handlers.py:612 Forbidden 324s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.470000ms referer=None 324s ----------------------------- Captured stderr call ----------------------------- 324s Traceback (most recent call last): 324s ------------------------------ Captured log call ------------------------------- 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.930000ms 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 324s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcw2q_12b/runtime/kernel-3197e3cb-1d1b-44d5-8ae6-6e8ef70dd847.json'] 324s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41185 324s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50021 324s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3197e3cb-1d1b-44d5-8ae6-6e8ef70dd847, name: python3 324s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpcw2q_12b/notebooks/foo'} 324s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 21.200000ms 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.680000ms 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/325234e4-9845-4227-8045-1d70d234ef97 (::1) 0.640000ms 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.620000ms 324s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 324s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3197e3cb-1d1b-44d5-8ae6-6e8ef70dd847 324s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3197e3cb-1d1b-44d5-8ae6-6e8ef70dd847 324s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 324s Traceback (most recent call last): 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 324s out = await method(self, *args, **kwargs) 324s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 324s await self._async_finish_shutdown(restart=restart) 324s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 324s await asyncio.wait_for( 325s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 325s ) 325s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 325s async with timeouts.timeout(timeout): 325s ~~~~~~~~~~~~~~~~^^^^^^^^^ 325s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 325s raise RuntimeError("Timeout should be used inside a task") 325s RuntimeError: Timeout should be used inside a task 325s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/325234e4-9845-4227-8045-1d70d234ef97 (::1) 325s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/325234e4-9845-4227-8045-1d70d234ef97', version='HTTP/1.1', remote_ip='::1') 325s Traceback (most recent call last): 325s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 325s result = await result 325s ^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 325s yielded = self.gen.throw(exc) 325s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 325s yield maybe_future(sm.delete_session(session_id)) 325s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 325s value = future.result() 325s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 325s yielded = self.gen.send(value) 325s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 325s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 325s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 325s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 325s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 325s return _runner_map[name].run(inner) 325s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 325s return fut.result(None) 325s ~~~~~~~~~~^^^^^^ 325s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 325s return self.__get_result() 325s ~~~~~~~~~~~~~~~~~^^ 325s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 325s raise self._exception 325s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 325s result = coro.send(None) 325s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 325s stopper = ensure_async(km.shutdown_kernel(now, restart)) 325s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 325s return _runner_map[name].run(inner) 325s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 325s return fut.result(None) 325s ~~~~~~~~~~^^^^^^ 325s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 325s return self.__get_result() 325s ~~~~~~~~~~~~~~~~~^^ 325s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 325s raise self._exception 325s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 325s result = coro.send(None) 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 325s raise e 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 325s out = await method(self, *args, **kwargs) 325s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 325s await self._async_finish_shutdown(restart=restart) 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 325s await asyncio.wait_for( 325s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 325s ) 325s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 325s async with timeouts.timeout(timeout): 325s ~~~~~~~~~~~~~~~~^^^^^^^^^ 325s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 325s raise RuntimeError("Timeout should be used inside a task") 325s RuntimeError: Timeout should be used inside a task 325s WARNING NotebookApp:handlers.py:612 Unhandled error 325s --------------------------- Captured stderr teardown --------------------------- 325s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 325s return _run_code(code, main_globals, None, 325s "__main__", mod_spec) 325s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 325s exec(code, run_globals) 325s ~~~~^^^^^^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 325s from ipykernel import kernelapp as app 325s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 325s from .connect import * # noqa: F403 325s ^^^^^^^^^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 10, in 325s from typing import TYPE_CHECKING, Any 325s File "", line 1360, in _find_and_load 325s File "", line 1331, in _find_and_load_unlocked 325s File "", line 935, in _load_unlocked 325s File "", line 1019, in exec_module 325s File "", line 1152, in get_code 325s File "", line 781, in _compile_bytecode 325s KeyboardInterrupt 325s __________________ SessionAPITest.test_create_console_session __________________ 325s 325s @self.addCleanup 325s def cleanup_sessions(): 325s for session in self.sess_api.list().json(): 325s > self.sess_api.delete(session['id']) 325s 325s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 325s return self._req('DELETE', id) 325s ^^^^^^^^^^^^^^^^^^^^^^^ 325s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 325s response.raise_for_status() 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s 325s def raise_for_status(self): 325s """Raises :class:`HTTPError`, if one occurred.""" 325s 325s http_error_msg = "" 325s if isinstance(self.reason, bytes): 325s # We attempt to decode utf-8 first because some servers 325s # choose to localize their reason strings. If the string 325s # isn't utf-8, we fall back to iso-8859-1 for all other 325s # encodings. (See PR #3538) 325s try: 325s reason = self.reason.decode("utf-8") 325s except UnicodeDecodeError: 325s reason = self.reason.decode("iso-8859-1") 325s else: 325s reason = self.reason 325s 325s if 400 <= self.status_code < 500: 325s http_error_msg = ( 325s f"{self.status_code} Client Error: {reason} for url: {self.url}" 325s ) 325s 325s elif 500 <= self.status_code < 600: 325s http_error_msg = ( 325s f"{self.status_code} Server Error: {reason} for url: {self.url}" 325s ) 325s 325s if http_error_msg: 325s > raise HTTPError(http_error_msg, response=self) 325s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/d081f937-6d79-43af-844e-063f8f05ad5a 325s 325s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 325s ----------------------------- Captured stderr call ----------------------------- 325s Traceback (most recent call last): 325s ------------------------------ Captured log call ------------------------------- 325s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 325s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 325s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcw2q_12b/runtime/kernel-f2a619cc-bd13-49a4-bba1-5669426db2f7.json'] 325s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37673 325s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53567 325s INFO NotebookApp:kernelmanager.py:179 Kernel started: f2a619cc-bd13-49a4-bba1-5669426db2f7, name: python3 325s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpcw2q_12b/notebooks/foo'} 325s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 19.300000ms 325s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 325s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.640000ms 325s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 325s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3197e3cb-1d1b-44d5-8ae6-6e8ef70dd847 325s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3197e3cb-1d1b-44d5-8ae6-6e8ef70dd847 325s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/325234e4-9845-4227-8045-1d70d234ef97 (::1) 0.850000ms 325s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 325s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f2a619cc-bd13-49a4-bba1-5669426db2f7 325s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f2a619cc-bd13-49a4-bba1-5669426db2f7 325s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 325s Traceback (most recent call last): 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 325s out = await method(self, *args, **kwargs) 325s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 325s await self._async_finish_shutdown(restart=restart) 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 325s await asyncio.wait_for( 325s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 325s ) 325s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 325s async with timeouts.timeout(timeout): 325s ~~~~~~~~~~~~~~~~^^^^^^^^^ 325s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 325s raise RuntimeError("Timeout should be used inside a task") 325s RuntimeError: Timeout should be used inside a task 325s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/d081f937-6d79-43af-844e-063f8f05ad5a (::1) 325s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/d081f937-6d79-43af-844e-063f8f05ad5a', version='HTTP/1.1', remote_ip='::1') 325s Traceback (most recent call last): 325s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 325s result = await result 325s ^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 325s yielded = self.gen.throw(exc) 325s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 325s yield maybe_future(sm.delete_session(session_id)) 325s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 325s value = future.result() 325s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 325s yielded = self.gen.send(value) 325s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 325s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 325s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 325s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 325s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 325s return _runner_map[name].run(inner) 325s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 325s return fut.result(None) 325s ~~~~~~~~~~^^^^^^ 325s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 325s return self.__get_result() 325s ~~~~~~~~~~~~~~~~~^^ 325s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 325s raise self._exception 325s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 325s result = coro.send(None) 325s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 325s stopper = ensure_async(km.shutdown_kernel(now, restart)) 325s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 325s return _runner_map[name].run(inner) 325s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 325s return fut.result(None) 325s ~~~~~~~~~~^^^^^^ 325s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 325s return self.__get_result() 325s ~~~~~~~~~~~~~~~~~^^ 325s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 325s raise self._exception 325s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 325s result = coro.send(None) 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 325s raise e 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 325s out = await method(self, *args, **kwargs) 325s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 325s await self._async_finish_shutdown(restart=restart) 325s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 325s await asyncio.wait_for( 325s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 325s ) 325s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 325s async with timeouts.timeout(timeout): 325s ~~~~~~~~~~~~~~~~^^^^^^^^^ 325s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 325s raise RuntimeError("Timeout should be used inside a task") 325s RuntimeError: Timeout should be used inside a task 325s WARNING NotebookApp:handlers.py:612 Unhandled error 325s ERROR NotebookApp:log.py:55 { 325s "Host": "localhost:12341", 325s "Accept": "*/*", 325s "User-Agent": "python-requests/2.32.5" 325s } 325s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/d081f937-6d79-43af-844e-063f8f05ad5a (::1) 14.880000ms referer=None 329s --------------------------- Captured stderr teardown --------------------------- 329s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 329s return _run_code(code, main_globals, None, 329s "__main__", mod_spec) 329s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 329s exec(code, run_globals) 329s ~~~~^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, in 329s from ipykernel import kernelapp as app 329s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 7, in 329s from .connect import * # noqa: F403 329s ^^^^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 329s from subprocess import PIPE, Popen 329s File "/usr/lib/python3.13/subprocess.py", line 46, in 329s import locale 329s File "", line 1360, in _find_and_load 329s File "", line 1331, in _find_and_load_unlocked 329s File "", line 935, in _load_unlocked 329s File "", line 1019, in exec_module 329s File "", line 1152, in get_code 329s File "", line 781, in _compile_bytecode 329s KeyboardInterrupt 329s ____________________ SessionAPITest.test_create_deprecated _____________________ 329s 329s @self.addCleanup 329s def cleanup_sessions(): 329s for session in self.sess_api.list().json(): 329s > self.sess_api.delete(session['id']) 329s 329s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 329s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 329s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 329s return self._req('DELETE', id) 329s ^^^^^^^^^^^^^^^^^^^^^^^ 329s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 329s response.raise_for_status() 329s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 329s 329s self = 329s 329s def raise_for_status(self): 329s """Raises :class:`HTTPError`, if one occurred.""" 329s 329s http_error_msg = "" 329s if isinstance(self.reason, bytes): 329s # We attempt to decode utf-8 first because some servers 329s # choose to localize their reason strings. If the string 329s # isn't utf-8, we fall back to iso-8859-1 for all other 329s # encodings. (See PR #3538) 329s try: 329s reason = self.reason.decode("utf-8") 329s except UnicodeDecodeError: 329s reason = self.reason.decode("iso-8859-1") 329s else: 329s reason = self.reason 329s 329s if 400 <= self.status_code < 500: 329s http_error_msg = ( 329s f"{self.status_code} Client Error: {reason} for url: {self.url}" 329s ) 329s 329s elif 500 <= self.status_code < 600: 329s http_error_msg = ( 329s f"{self.status_code} Server Error: {reason} for url: {self.url}" 329s ) 329s 329s if http_error_msg: 329s > raise HTTPError(http_error_msg, response=self) 329s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/dad92214-c5d2-4e3f-b422-c783aeb28f79 329s 329s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 329s ----------------------------- Captured stderr call ----------------------------- 329s Traceback (most recent call last): 329s ------------------------------ Captured log call ------------------------------- 329s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 329s WARNING NotebookApp:handlers.py:46 Sessions API changed, see updated swagger docs 329s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 329s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcw2q_12b/runtime/kernel-fb40b437-c3da-4659-b106-f347cf8ed015.json'] 329s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40033 329s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39967 329s INFO NotebookApp:kernelmanager.py:179 Kernel started: fb40b437-c3da-4659-b106-f347cf8ed015, name: python3 329s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpcw2q_12b/notebooks/foo'} 329s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.520000ms 329s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 329s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.960000ms 329s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 329s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f2a619cc-bd13-49a4-bba1-5669426db2f7 329s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f2a619cc-bd13-49a4-bba1-5669426db2f7 329s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/d081f937-6d79-43af-844e-063f8f05ad5a (::1) 0.940000ms 329s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 329s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fb40b437-c3da-4659-b106-f347cf8ed015 329s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fb40b437-c3da-4659-b106-f347cf8ed015 329s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 329s Traceback (most recent call last): 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 329s out = await method(self, *args, **kwargs) 329s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 329s await self._async_finish_shutdown(restart=restart) 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 329s await asyncio.wait_for( 329s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 329s ) 329s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 329s async with timeouts.timeout(timeout): 329s ~~~~~~~~~~~~~~~~^^^^^^^^^ 329s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 329s raise RuntimeError("Timeout should be used inside a task") 329s RuntimeError: Timeout should be used inside a task 329s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/dad92214-c5d2-4e3f-b422-c783aeb28f79 (::1) 329s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/dad92214-c5d2-4e3f-b422-c783aeb28f79', version='HTTP/1.1', remote_ip='::1') 329s Traceback (most recent call last): 329s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 329s result = await result 329s ^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 329s yielded = self.gen.throw(exc) 329s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 329s yield maybe_future(sm.delete_session(session_id)) 329s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 329s value = future.result() 329s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 329s yielded = self.gen.send(value) 329s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 329s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 329s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 329s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 329s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 329s return _runner_map[name].run(inner) 329s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 329s return fut.result(None) 329s ~~~~~~~~~~^^^^^^ 329s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 329s return self.__get_result() 329s ~~~~~~~~~~~~~~~~~^^ 329s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 329s raise self._exception 329s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 329s result = coro.send(None) 329s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 329s stopper = ensure_async(km.shutdown_kernel(now, restart)) 329s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 329s return _runner_map[name].run(inner) 329s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 329s return fut.result(None) 329s ~~~~~~~~~~^^^^^^ 329s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 329s return self.__get_result() 329s ~~~~~~~~~~~~~~~~~^^ 329s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 329s raise self._exception 329s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 329s result = coro.send(None) 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 329s raise e 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 329s out = await method(self, *args, **kwargs) 329s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 329s await self._async_finish_shutdown(restart=restart) 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 329s await asyncio.wait_for( 329s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 329s ) 329s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 329s async with timeouts.timeout(timeout): 329s ~~~~~~~~~~~~~~~~^^^^^^^^^ 329s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 329s raise RuntimeError("Timeout should be used inside a task") 329s RuntimeError: Timeout should be used inside a task 329s WARNING NotebookApp:handlers.py:612 Unhandled error 329s --------------------------- Captured stderr teardown --------------------------- 329s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 329s return _run_code(code, main_globals, None, 329s "__main__", mod_spec) 329s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 329s exec(code, run_globals) 329s ~~~~^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 329s from pathlib import Path 329s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 329s from ._local import * 329s File "/usr/lib/python3.13/pathlib/_local.py", line 473, in 329s class PureWindowsPath(PurePath): 329s ...<7 lines>... 329s __slots__ = () 329s File "/usr/lib/python3.13/pathlib/_local.py", line 479, in PureWindowsPath 329s import ntpath 329s File "/usr/lib/python3.13/ntpath.py", line 300, in 329s _reserved_chars = frozenset( 329s {chr(i) for i in range(32)} | 329s {'"', '*', ':', '<', '>', '?', '|', '/', '\\'} 329s ) 329s KeyboardInterrupt 329s ___________________ SessionAPITest.test_create_file_session ____________________ 329s 329s @self.addCleanup 329s def cleanup_sessions(): 329s for session in self.sess_api.list().json(): 329s > self.sess_api.delete(session['id']) 329s 329s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 329s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 329s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 329s return self._req('DELETE', id) 329s ^^^^^^^^^^^^^^^^^^^^^^^ 329s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 329s response.raise_for_status() 329s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 329s 329s self = 329s 329s def raise_for_status(self): 329s """Raises :class:`HTTPError`, if one occurred.""" 329s 329s http_error_msg = "" 329s if isinstance(self.reason, bytes): 329s # We attempt to decode utf-8 first because some servers 329s # choose to localize their reason strings. If the string 329s # isn't utf-8, we fall back to iso-8859-1 for all other 329s # encodings. (See PR #3538) 329s try: 329s reason = self.reason.decode("utf-8") 329s except UnicodeDecodeError: 329s reason = self.reason.decode("iso-8859-1") 329s else: 329s reason = self.reason 329s 329s if 400 <= self.status_code < 500: 329s http_error_msg = ( 329s f"{self.status_code} Client Error: {reason} for url: {self.url}" 329s ) 329s 329s elif 500 <= self.status_code < 600: 329s http_error_msg = ( 329s f"{self.status_code} Server Error: {reason} for url: {self.url}" 329s ) 329s 329s if http_error_msg: 329s > raise HTTPError(http_error_msg, response=self) 329s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/b6520f13-e798-42c3-94e4-1ae18d6b9de6 329s 329s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 329s ----------------------------- Captured stderr call ----------------------------- 329s Traceback (most recent call last): 329s ------------------------------ Captured log call ------------------------------- 329s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 329s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 329s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpcw2q_12b/runtime/kernel-85144d9f-262c-4d77-9c7c-a37796624220.json'] 329s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59961 329s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43537 329s INFO NotebookApp:kernelmanager.py:179 Kernel started: 85144d9f-262c-4d77-9c7c-a37796624220, name: python3 329s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmpcw2q_12b/notebooks/foo'} 329s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 18.820000ms 329s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 329s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.970000ms 329s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 329s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for fb40b437-c3da-4659-b106-f347cf8ed015 329s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: fb40b437-c3da-4659-b106-f347cf8ed015 329s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/dad92214-c5d2-4e3f-b422-c783aeb28f79 (::1) 0.950000ms 329s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 329s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 85144d9f-262c-4d77-9c7c-a37796624220 329s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 85144d9f-262c-4d77-9c7c-a37796624220 329s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 329s Traceback (most recent call last): 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 329s out = await method(self, *args, **kwargs) 329s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 329s await self._async_finish_shutdown(restart=restart) 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 329s await asyncio.wait_for( 329s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 329s ) 329s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 329s async with timeouts.timeout(timeout): 329s ~~~~~~~~~~~~~~~~^^^^^^^^^ 329s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 329s raise RuntimeError("Timeout should be used inside a task") 329s RuntimeError: Timeout should be used inside a task 329s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/b6520f13-e798-42c3-94e4-1ae18d6b9de6 (::1) 329s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b6520f13-e798-42c3-94e4-1ae18d6b9de6', version='HTTP/1.1', remote_ip='::1') 329s Traceback (most recent call last): 329s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 329s result = await result 329s ^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 329s yielded = self.gen.throw(exc) 329s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 329s yield maybe_future(sm.delete_session(session_id)) 329s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 329s value = future.result() 329s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 802, in run 329s yielded = self.gen.send(value) 329s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 329s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 329s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 329s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 329s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 329s return _runner_map[name].run(inner) 329s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 329s return fut.result(None) 329s ~~~~~~~~~~^^^^^^ 329s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 329s return self.__get_result() 329s ~~~~~~~~~~~~~~~~~^^ 329s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 329s raise self._exception 329s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 329s result = coro.send(None) 329s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 329s stopper = ensure_async(km.shutdown_kernel(now, restart)) 329s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 329s return _runner_map[name].run(inner) 329s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 329s return fut.result(None) 329s ~~~~~~~~~~^^^^^^ 329s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 329s return self.__get_result() 329s ~~~~~~~~~~~~~~~~~^^ 329s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 329s raise self._exception 329s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 329s result = coro.send(None) 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 329s raise e 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 329s out = await method(self, *args, **kwargs) 329s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 329s await self._async_finish_shutdown(restart=restart) 329s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 329s await asyncio.wait_for( 329s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 329s ) 329s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 329s async with timeouts.timeout(timeout): 329s ~~~~~~~~~~~~~~~~^^^^^^^^^ 329s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 329s raise RuntimeError("Timeout should be used inside a task") 329s RuntimeError: Timeout should be used inside a task 329s WARNING NotebookApp:handlers.py:612 Unhandled error 329s ERROR NotebookApp:log.py:55 { 329s "Host": "localhost:12341", 329s "Accept": "*/*", 329s "User-Agent": "python-requests/2.32.5" 329s } 329s ERROR NotebookApp:log.py:59 500 DELETE /a%40b/api/sessions/b6520f13-e798-42c3-94e4-1ae18d6b9de6 (::1) 7.610000ms referer=None 329s --------------------------- Captured stderr teardown --------------------------- 329s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 329s return _run_code(code, main_globals, None, 329s "__main__", mod_spec) 329s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 329s exec(code, run_globals) 329s ~~~~^^^^^^^^^^^^^^^^^^^ 329s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 329s from pathlib import Path 329s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 329s from ._local import * 329s File "/usr/lib/python3.13/pathlib/_local.py", line 484, in 329s class Path(PathBase, PurePath): 329s ...<353 lines>... 329s return path 329s KeyboardInterrupt 329s __________________ SessionAPITest.test_create_with_kernel_id ___________________ 329s 329s self = 329s 329s def test_create_with_kernel_id(self): 329s # create a new kernel 329s r = self.request('POST', 'api/kernels') 329s r.raise_for_status() 329s kernel = r.json() 329s 329s resp = self.sess_api.create('foo/nb1.ipynb', kernel_id=kernel['id']) 329s self.assertEqual(resp.status_code, 201) 329s newsession = resp.json() 329s self.assertIn('id', newsession) 329s self.assertEqual(newsession['path'], 'foo/nb1.ipynb') 329s self.assertEqual(newsession['kernel']['id'], kernel['id']) 329s 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': 'b6520f13-e798-42c3-94e4-1ae18d6b9de6', 'p[553 chars]ne}}] != [{'id': 'dfe7b537-9f2a-4189-b023-1170ad623847', 'p[279 chars]ne}}] 330s E 330s E First differing element 0: 330s E {'id': 'b6520f13-e798-42c3-94e4-1ae18d6b9de6', 'p[218 chars]: 0}} 330s E {'id': 'dfe7b537-9f2a-4189-b023-1170ad623847', 'p[278 chars]one}} 330s E 330s E First list contains 1 additional elements. 330s E First extra element 1: 330s E {'id': 'dfe7b537-9f2a-4189-b023-1170ad623847', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': 'ee4364c1-051c-4d15-ab8d-e48005aa7262', 'name': 'python3', 'last_activity': '2026-02-06T02:22:17.613739Z', '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 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 125, in 330s import selectors 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 1140, in get_code 330s File "", line 751, in _validate_timestamp_pyc 330s File "", line 89, in _unpack_uint32 330s KeyboardInterrupt 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmpcw2q_12b/runtime/kernel-ee4364c1-051c-4d15-ab8d-e48005aa7262.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38033 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59197 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: ee4364c1-051c-4d15-ab8d-e48005aa7262, 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 (::1) 17.910000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.780000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.590000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.600000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 85144d9f-262c-4d77-9c7c-a37796624220 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 85144d9f-262c-4d77-9c7c-a37796624220 330s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b6520f13-e798-42c3-94e4-1ae18d6b9de6 (::1) 2.040000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ee4364c1-051c-4d15-ab8d-e48005aa7262 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ee4364c1-051c-4d15-ab8d-e48005aa7262 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/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847', version='HTTP/1.1', remote_ip='::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 443, 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 443, 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/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 7.480000ms 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/dfe7b537-9f2a-4189-b023-1170ad623847 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 9, in 330s from subprocess import PIPE, Popen 330s File "/usr/lib/python3.13/subprocess.py", line 49, in 330s import signal 330s File "/usr/lib/python3.13/signal.py", line 7, in 330s _IntEnum._convert_( 330s ~~~~~~~~~~~~~~~~~~^ 330s 'Signals', __name__, 330s ^^^^^^^^^^^^^^^^^^^^ 330s ...<2 lines>... 330s and (name.startswith('SIG') and not name.startswith('SIG_')) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s or name.startswith('CTRL_')) 330s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3.13/enum.py", line 928, in _convert_ 330s cls = _simple_enum(etype=cls, boundary=boundary or KEEP)(tmp_cls) 330s File "/usr/lib/python3.13/enum.py", line 1794, in convert_class 330s if _is_dunder(name) or _is_private(cls_name, name) or _is_sunder(name) or _is_descriptor(obj): 330s ~~~~~~~~~~~^^^^^^^^^^^^^^^^ 330s File "/usr/lib/python3.13/enum.py", line 78, in _is_private 330s def _is_private(cls_name, name): 330s 330s KeyboardInterrupt 330s ------------------------------ Captured log call ------------------------------- 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 2.070000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmpcw2q_12b/runtime/kernel-22651ae5-7dff-485e-a953-65867daa1d97.json'] 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54007 330s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47815 330s INFO NotebookApp:kernelmanager.py:179 Kernel started: 22651ae5-7dff-485e-a953-65867daa1d97, 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 (::1) 16.110000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for ee4364c1-051c-4d15-ab8d-e48005aa7262 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: ee4364c1-051c-4d15-ab8d-e48005aa7262 330s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 2.360000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.510000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.710000ms 330s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 330s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 22651ae5-7dff-485e-a953-65867daa1d97 330s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 22651ae5-7dff-485e-a953-65867daa1d97 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/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 330s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847', version='HTTP/1.1', remote_ip='::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 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 12.080000ms referer=None 331s ____________________ SessionAPITest.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/dfe7b537-9f2a-4189-b023-1170ad623847 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 ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 2.170000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmpcw2q_12b/runtime/kernel-4925d4aa-a19d-4259-8fbb-065652ad1843.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54127 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47677 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4925d4aa-a19d-4259-8fbb-065652ad1843, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmpcw2q_12b/notebooks/foo'} 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 22651ae5-7dff-485e-a953-65867daa1d97 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 22651ae5-7dff-485e-a953-65867daa1d97 331s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 15.160000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.840000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4925d4aa-a19d-4259-8fbb-065652ad1843 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4925d4aa-a19d-4259-8fbb-065652ad1843 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:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/dfe7b537-9f2a-4189-b023-1170ad623847', version='HTTP/1.1', remote_ip='::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/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 802, in run 331s yielded = self.gen.send(value) 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/dfe7b537-9f2a-4189-b023-1170ad623847 (::1) 8.100000ms 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 5, in 331s import re 331s File "/usr/lib/python3.13/re/__init__.py", line 126, in 331s from . import _compiler, _parser 331s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 331s from . import _parser 331s File "/usr/lib/python3.13/re/_parser.py", line 110, in 331s class SubPattern: 331s ...<116 lines>... 331s return self.width 331s KeyboardInterrupt 331s ---------------------------- Captured log teardown ----------------------------- 331s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4925d4aa-a19d-4259-8fbb-065652ad1843 331s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 331s _______________________ AsyncSessionAPITest.test_create ________________________ 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/3ca30f2c-d2ba-443a-b205-28a5bfa3374e 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ------------------------------ Captured log setup ------------------------------ 331s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp_fwce4n8/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp_fwce4n8/etc/jupyter'] for config files 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp_fwce4n8/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp_fwce4n8/config 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp_fwce4n8/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp_fwce4n8/config 331s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp_fwce4n8/notebooks 331s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 331s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 331s WARNING NotebookApp:handlers.py:612 Forbidden 331s ----------------------------- Captured stderr call ----------------------------- 331s Traceback (most recent call last): 331s ------------------------------ Captured log call ------------------------------- 331s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 2.130000ms referer=None 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 2.070000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp_fwce4n8/runtime/kernel-7f0d8fe8-04e6-4eea-b0ce-61294ac46786.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45231 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45569 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 7f0d8fe8-04e6-4eea-b0ce-61294ac46786, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp_fwce4n8/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.160000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.570000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/3ca30f2c-d2ba-443a-b205-28a5bfa3374e (::1) 1.810000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.570000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7f0d8fe8-04e6-4eea-b0ce-61294ac46786 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7f0d8fe8-04e6-4eea-b0ce-61294ac46786 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/3ca30f2c-d2ba-443a-b205-28a5bfa3374e (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/3ca30f2c-d2ba-443a-b205-28a5bfa3374e', version='HTTP/1.1', remote_ip='::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, i/usr/lib/python3/dist-packages/_pytest/unraisableexception.py:33: RuntimeWarning: coroutine 'KernelManager._async_wait' was never awaited 331s gc.collect() 331s RuntimeWarning: Enable tracemalloc to get the object allocation traceback 331s n 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 --------------------------- 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 29, in 331s class _PathParents(Sequence): 331s ...<25 lines>... 331s return "<{}.parents>".format(type(self._path).__name__) 331s File "/usr/lib/python3.13/abc.py", line 106, in __new__ 331s cls = super().__new__(mcls, name, bases, namespace, **kwargs) 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/c7ffd07f-1fea-4d15-9d94-ab202f6e4384 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 ::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/tmp_fwce4n8/runtime/kernel-5a7f9d34-c106-48f0-925a-dbe442b975e3.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41227 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44989 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 5a7f9d34-c106-48f0-925a-dbe442b975e3, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp_fwce4n8/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 16.090000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.890000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7f0d8fe8-04e6-4eea-b0ce-61294ac46786 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7f0d8fe8-04e6-4eea-b0ce-61294ac46786 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/3ca30f2c-d2ba-443a-b205-28a5bfa3374e (::1) 0.940000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 5a7f9d34-c106-48f0-925a-dbe442b975e3 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5a7f9d34-c106-48f0-925a-dbe442b975e3 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/c7ffd07f-1fea-4d15-9d94-ab202f6e4384 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/c7ffd07f-1fea-4d15-9d94-ab202f6e4384', version='HTTP/1.1', remote_ip='::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 --------------------------- 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 5, in 331s import re 331s File "/usr/lib/python3.13/re/__init__.py", line 126, in 331s from . import _compiler, _parser 331s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 331s from . import _parser 331s File "/usr/lib/python3.13/re/_parser.py", line 15, in 331s from ._constants import * 331s File "/usr/lib/python3.13/re/_constants.py", line 78, in 331s OPCODES = _makecodes( 331s # failure=0 success=1 (just because it looks better that way :-) 331s ...<45 lines>... 331s 'MIN_REPEAT', 'MAX_REPEAT', 331s ) 331s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 331s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 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/95f6a4fc-603f-4af8-bd4a-83f611dce1ec 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 ::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/tmp_fwce4n8/runtime/kernel-e9119a01-7cb5-43f9-aace-b5aa630cd3a7.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52423 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47075 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: e9119a01-7cb5-43f9-aace-b5aa630cd3a7, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp_fwce4n8/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 21.410000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.800000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 5a7f9d34-c106-48f0-925a-dbe442b975e3 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5a7f9d34-c106-48f0-925a-dbe442b975e3 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/c7ffd07f-1fea-4d15-9d94-ab202f6e4384 (::1) 1.910000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e9119a01-7cb5-43f9-aace-b5aa630cd3a7 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e9119a01-7cb5-43f9-aace-b5aa630cd3a7 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/95f6a4fc-603f-4af8-bd4a-83f611dce1ec (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/95f6a4fc-603f-4af8-bd4a-83f611dce1ec', version='HTTP/1.1', remote_ip='::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 --------------------------- 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 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 7, in 331s import json 331s File "/usr/lib/python3.13/json/__init__.py", line 106, in 331s from .decoder import JSONDecoder, JSONDecodeError 331s File "/usr/lib/python3.13/json/decoder.py", line 5, in 331s from json import scanner 331s File "/usr/lib/python3.13/json/scanner.py", line 11, in 331s NUMBER_RE = re.compile( 331s r'(-?(?:0|[1-9][0-9]*))(\.[0-9]+)?([eE][-+]?[0-9]+)?', 331s (re.VERBOSE | re.MULTILINE | re.DOTALL)) 331s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 331s return _compile(pattern, flags) 331s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 331s p = _compiler.compile(pattern, flags) 331s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 331s code = _code(p, flags) 331s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 331s _compile(code, p.data, flags) 331s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3.13/re/_compiler.py", line 126, in _compile 331s _compile(code, p, _combine_flags(flags, add_flags, del_flags)) 331s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3.13/re/_compiler.py", line 110, in _compile 331s emit(SUCCESS) 331s ~~~~^^^^^^^^^ 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/b05313fa-02fc-41d3-882e-36c88ab60d5d 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 ::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/tmp_fwce4n8/runtime/kernel-f98dfcec-1111-4414-988d-0d107644f58a.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:60507 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43095 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: f98dfcec-1111-4414-988d-0d107644f58a, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp_fwce4n8/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 20.140000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.900000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e9119a01-7cb5-43f9-aace-b5aa630cd3a7 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e9119a01-7cb5-43f9-aace-b5aa630cd3a7 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/95f6a4fc-603f-4af8-bd4a-83f611dce1ec (::1) 1.950000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f98dfcec-1111-4414-988d-0d107644f58a 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f98dfcec-1111-4414-988d-0d107644f58a 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/b05313fa-02fc-41d3-882e-36c88ab60d5d (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b05313fa-02fc-41d3-882e-36c88ab60d5d', version='HTTP/1.1', remote_ip='::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 --------------------------- 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 16, in 331s from ipykernel import kernelapp as app 331s File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 1, in 331s from ._version import ( 331s ...<4 lines>... 331s ) 331s File "/usr/lib/python3/dist-packages/ipykernel/_version.py", line 11, in 331s match = re.match(pattern, __version__) 331s File "/usr/lib/python3.13/re/__init__.py", line 167, in match 331s return _compile(pattern, flags).match(string) 331s ~~~~~~~~^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 331s p = _compiler.compile(pattern, flags) 331s File "/usr/lib/python3.13/re/_compiler.py", line 752, in compile 331s code = _code(p, flags) 331s File "/usr/lib/python3.13/re/_compiler.py", line 585, in _code 331s _compile(code, p.data, flags) 331s ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3.13/re/_compiler.py", line 126, in _compile 331s _compile(code, p, _combine_flags(flags, add_flags, del_flags)) 331s ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3.13/re/_compiler.py", line 31, in _combine_flags 331s def _combine_flags(flags, add_flags, del_flags, 331s 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': 'b05313fa-02fc-41d3-882e-36c88ab60d5d', 'p[553 chars]ne}}] != [{'id': '660c5586-7955-43b3-a322-7bfab069ed29', 'p[279 chars]ne}}] 331s E 331s E First differing element 0: 331s E {'id': 'b05313fa-02fc-41d3-882e-36c88ab60d5d', 'p[218 chars]: 0}} 331s E {'id': '660c5586-7955-43b3-a322-7bfab069ed29', 'p[278 chars]one}} 331s E 331s E First list contains 1 additional elements. 331s E First extra element 1: 331s E {'id': '660c5586-7955-43b3-a322-7bfab069ed29', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': 'dc7a66e3-27e5-48ff-9b16-7447e9daafcb', 'name': 'python3', 'last_activity': '2026-02-06T02:22:18.103446Z', '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 ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp_fwce4n8/runtime/kernel-dc7a66e3-27e5-48ff-9b16-7447e9daafcb.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53119 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50353 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: dc7a66e3-27e5-48ff-9b16-7447e9daafcb, 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 (::1) 15.610000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 1.890000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.590000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.580000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f98dfcec-1111-4414-988d-0d107644f58a 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f98dfcec-1111-4414-988d-0d107644f58a 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b05313fa-02fc-41d3-882e-36c88ab60d5d (::1) 0.720000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dc7a66e3-27e5-48ff-9b16-7447e9daafcb 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dc7a66e3-27e5-48ff-9b16-7447e9daafcb 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/660c5586-7955-43b3-a322-7bfab069ed29 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/660c5586-7955-43b3-a322-7bfab069ed29', version='HTTP/1.1', remote_ip='::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 __________________ 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/660c5586-7955-43b3-a322-7bfab069ed29 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 ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.820000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp_fwce4n8/runtime/kernel-0c6afe88-5f05-401d-b635-c42d095288ed.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59457 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55873 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 0c6afe88-5f05-401d-b635-c42d095288ed, 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 (::1) 14.740000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dc7a66e3-27e5-48ff-9b16-7447e9daafcb 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dc7a66e3-27e5-48ff-9b16-7447e9daafcb 331s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/660c5586-7955-43b3-a322-7bfab069ed29 (::1) 2.200000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.470000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.530000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0c6afe88-5f05-401d-b635-c42d095288ed 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0c6afe88-5f05-401d-b635-c42d095288ed 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/660c5586-7955-43b3-a322-7bfab069ed29 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/660c5586-7955-43b3-a322-7bfab069ed29', version='HTTP/1.1', remote_ip='::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 --------------------------- 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 849, in 331s from nt import _path_isdir as isdir 331s File "", line 1349, in _find_and_load 331s KeyboardInterrupt 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/660c5586-7955-43b3-a322-7bfab069ed29 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 ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.830000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp_fwce4n8/runtime/kernel-4f172e14-6d79-4c0e-8ef5-a5c5c3971e4e.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39817 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:43893 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4f172e14-6d79-4c0e-8ef5-a5c5c3971e4e, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmp_fwce4n8/notebooks/foo'} 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0c6afe88-5f05-401d-b635-c42d095288ed 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0c6afe88-5f05-401d-b635-c42d095288ed 331s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/660c5586-7955-43b3-a322-7bfab069ed29 (::1) 16.280000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.820000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.550000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4f172e14-6d79-4c0e-8ef5-a5c5c3971e4e 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4f172e14-6d79-4c0e-8ef5-a5c5c3971e4e 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/660c5586-7955-43b3-a322-7bfab069ed29 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/660c5586-7955-43b3-a322-7bfab069ed29', version='HTTP/1.1', remote_ip='::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 --------------------------- 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 5, in 331s import re 331s File "/usr/lib/python3.13/re/__init__.py", line 126, in 331s from . import _compiler, _parser 331s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 331s from . import _parser 331s File "/usr/lib/python3.13/re/_parser.py", line 15, in 331s from ._constants import * 331s File "/usr/lib/python3.13/re/_constants.py", line 78, in 331s OPCODES = _makecodes( 331s # failure=0 success=1 (just because it looks better that way :-) 331s ...<45 lines>... 331s 'MIN_REPEAT', 'MAX_REPEAT', 331s ) 331s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 331s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 331s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3.13/re/_constants.py", line 61, in __new__ 331s self = super(_NamedIntConstant, cls).__new__(cls, value) 331s KeyboardInterrupt 331s ---------------------------- Captured log teardown ----------------------------- 331s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e9119a01-7cb5-43f9-aace-b5aa630cd3a7 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7f0d8fe8-04e6-4eea-b0ce-61294ac46786 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 5a7f9d34-c106-48f0-925a-dbe442b975e3 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f98dfcec-1111-4414-988d-0d107644f58a 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dc7a66e3-27e5-48ff-9b16-7447e9daafcb 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0c6afe88-5f05-401d-b635-c42d095288ed 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4f172e14-6d79-4c0e-8ef5-a5c5c3971e4e 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: 65 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: 24 warnings 331s services/sessions/tests/test_sessions_api.py: 19 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, 213 warnings, 4 errors in 6.52s ========== 331s *** END OF RUN 4: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 331s *** 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 331s ============================= test session starts ============================== 331s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 331s rootdir: /tmp/autopkgtest.tpx4mW/autopkgtest_tmp 331s plugins: typeguard-4.4.4 331s collected 330 items / 307 deselected / 23 selected 331s run-last-failure: rerun previous 23 failures 331s 331s services/kernels/tests/test_kernels_api.py FFFEFFFFFEF [ 39%] 331s services/sessions/tests/test_sessions_api.py FFFFFEFFFFFFFEFF [100%] 331s 331s ==================================== ERRORS ==================================== 331s _________ ERROR at teardown of KernelAPITest.test_main_kernel_handler __________ 331s 331s self = 331s 331s def tearDown(self): 331s for k in self.kern_api.list().json(): 331s > self.kern_api.shutdown(k['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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/kernels/64a62e79-969d-4379-b350-4737a854624d 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 File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 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 File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 331s from subprocess import PIPE, Popen 331s File "/usr/lib/python3.13/subprocess.py", line 51, in 331s import threading 331s File "/usr/lib/python3.13/threading.py", line 9, in 331s from _weakrefset import WeakSet 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 1214, in get_data 331s KeyboardInterrupt 331s Traceback (most recent call last): 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp6rb3redp/runtime/kernel-64a62e79-969d-4379-b350-4737a854624d.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48697 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56887 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 64a62e79-969d-4379-b350-4737a854624d, 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 (::1) 14.370000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.510000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp6rb3redp/runtime/kernel-66f2355b-c520-4b71-a463-df1efa2f0d06.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52077 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48853 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 66f2355b-c520-4b71-a463-df1efa2f0d06, 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 (::1) 21.770000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.800000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 66f2355b-c520-4b71-a463-df1efa2f0d06 331s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/66f2355b-c520-4b71-a463-df1efa2f0d06/interrupt (::1) 1.840000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 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:handlers.py:91 Exception restarting kernel 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 331s yield maybe_future(km.restart_kernel(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 314, in restart_kernel 331s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 331s await ensure_async(kernel.restart_kernel(now=now)) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/manager.py", line 590, in _async_restart_kernel 331s await self._async_shutdown_kernel(now=now, restart=True) 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: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 POST /a%40b/api/kernels/66f2355b-c520-4b71-a463-df1efa2f0d06/restart (::1) 7.270000ms referer=None 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 64a62e79-969d-4379-b350-4737a854624d 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 64a62e79-969d-4379-b350-4737a854624d 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:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/64a62e79-969d-4379-b350-4737a854624d (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/64a62e79-969d-4379-b350-4737a854624d', version='HTTP/1.1', remote_ip='::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/dist-packages/tornado/gen.py", line 239, in wrapper 331s yielded = ctx_run(next, result) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 331s yield maybe_future(km.shutdown_kernel(kernel_id)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/kernels/64a62e79-969d-4379-b350-4737a854624d (::1) 6.670000ms 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 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 12, in 331s import jupyter_client 331s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 331s from .asynchronous import AsyncKernelClient 331s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 331s from .client import AsyncKernelClient # noqa 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 331s import zmq.asyncio 331s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 331s import asyncio 331s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 331s from .base_events import * 331s File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in 331s import concurrent.futures 331s File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in 331s from concurrent.futures._base import (FIRST_COMPLETED, 331s ...<9 lines>... 331s as_completed) 331s File "/usr/lib/python3.13/concurrent/futures/_base.py", line 7, in 331s import logging 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 _______ ERROR at teardown of AsyncKernelAPITest.test_main_kernel_handler _______ 331s 331s self = 331s 331s def tearDown(self): 331s for k in self.kern_api.list().json(): 331s > self.kern_api.shutdown(k['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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/kernels/f28e8c01-8030-4a10-8866-63f544c89a81 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 File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 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 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 ::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/tmp121wp5l1/runtime/kernel-f28e8c01-8030-4a10-8866-63f544c89a81.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33753 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53579 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: f28e8c01-8030-4a10-8866-63f544c89a81, 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 (::1) 15.990000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.490000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp121wp5l1/runtime/kernel-4f8df466-d8a2-43dd-86c8-0a13160d39f4.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59741 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37313 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4f8df466-d8a2-43dd-86c8-0a13160d39f4, 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 (::1) 18.470000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.570000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 4f8df466-d8a2-43dd-86c8-0a13160d39f4 331s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/4f8df466-d8a2-43dd-86c8-0a13160d39f4/interrupt (::1) 0.620000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 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:handlers.py:91 Exception restarting kernel 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 331s yield maybe_future(km.restart_kernel(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 291, in __step_run_and_handle_result 331s result = coro.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 331s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 331s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 331s yield self # This tells Task to wait for completion. 331s ^^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 331s future.result() 331s ~~~~~~~~~~~~~^^ 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/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 331s await ensure_async(kernel.restart_kernel(now=now)) 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 590, in _async_restart_kernel 331s await self._async_shutdown_kernel(now=now, restart=True) 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: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 POST /a%40b/api/kernels/4f8df466-d8a2-43dd-86c8-0a13160d39f4/restart (::1) 3.310000ms referer=None 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.520000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f28e8c01-8030-4a10-8866-63f544c89a81 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f28e8c01-8030-4a10-8866-63f544c89a81 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/kernels/f28e8c01-8030-4a10-8866-63f544c89a81 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/f28e8c01-8030-4a10-8866-63f544c89a81', version='HTTP/1.1', remote_ip='::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/kernels/handlers.py", line 72, in delete 331s yield maybe_future(km.shutdown_kernel(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 --------------------------- Captured stderr teardown --------------------------- 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 12, in 331s import jupyter_client 331s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 331s from .asynchronous import AsyncKernelClient 331s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 331s from .client import AsyncKernelClient # noqa 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 331s import zmq.asyncio 331s File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 10, in 331s import asyncio 331s File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in 331s from .base_events import * 331s File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in 331s import concurrent.futures 331s File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in 331s from concurrent.futures._base import (FIRST_COMPLETED, 331s ...<9 lines>... 331s as_completed) 331s File "/usr/lib/python3.13/concurrent/futures/_base.py", line 7, in 331s import logging 331s File "/usr/lib/python3.13/logging/__init__.py", line 26, in 331s import sys, os, time, io, re, traceback, warnings, weakref, collections.abc 331s File "", line 1360, in _find_and_load 331s File "", line 1322, in _find_and_load_unlocked 331s File "", line 1262, in _find_spec 331s File "", line 1556, in find_spec 331s File "", line 1530, in _get_spec 331s File "", line 1663, in find_spec 331s File "", line 1618, in _get_spec 331s File "", line 830, in spec_from_file_location 331s KeyboardInterrupt 331s ________ ERROR at teardown of SessionAPITest.test_create_with_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/e549be35-5f86-489d-a295-51877a509a27 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 ::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/tmp8aquxh0f/runtime/kernel-bd1a7217-1aea-4fd9-8483-cc9afc0397f2.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47391 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50755 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: bd1a7217-1aea-4fd9-8483-cc9afc0397f2, 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 (::1) 17.350000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 5.300000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.650000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.660000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0d8fc60c-53cf-40aa-9d7f-c48e52090548 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0d8fc60c-53cf-40aa-9d7f-c48e52090548 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/611521ae-c80f-4595-ab24-ab1e2af89984 (::1) 1.310000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for bd1a7217-1aea-4fd9-8483-cc9afc0397f2 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: bd1a7217-1aea-4fd9-8483-cc9afc0397f2 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:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27', version='HTTP/1.1', remote_ip='::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/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 802, in run 331s yielded = self.gen.send(value) 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/e549be35-5f86-489d-a295-51877a509a27 (::1) 15.740000ms 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 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 12, in 331s import jupyter_client 331s File "/usr/lib/python3/dist-packages/jupyter_client/__init__.py", line 4, in 331s from .asynchronous import AsyncKernelClient 331s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in 331s from .client import AsyncKernelClient # noqa 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_client/asynchronous/client.py", line 9, in 331s import zmq.asyncio 331s File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 52, in 331s from zmq import backend 331s File "/usr/lib/python3/dist-packages/zmq/backend/__init__.py", line 25, in 331s _ns = select_backend(first) 331s File "/usr/lib/python3/dist-packages/zmq/backend/select.py", line 31, in select_backend 331s mod = import_module(name) 331s File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module 331s return _bootstrap._gcd_import(name[level:], package, level) 331s ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/zmq/backend/cython/__init__.py", line 6, in 331s from . import _zmq 331s File "", line 645, in parent 331s KeyboardInterrupt 331s _____ ERROR at teardown of AsyncSessionAPITest.test_create_with_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/20b8ff43-8c65-40f3-a825-8531305338f3 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 ::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/tmp35zgywqv/runtime/kernel-240478c7-4b4a-46c3-b4da-2601bf5d46ce.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40917 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35557 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 240478c7-4b4a-46c3-b4da-2601bf5d46ce, 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 (::1) 15.710000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.680000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.580000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.810000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2d3d27da-ad85-4454-8c28-988747f89ad0 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d3d27da-ad85-4454-8c28-988747f89ad0 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/79b55853-df0c-4ab4-ae45-0b722d2ff25e (::1) 1.940000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 240478c7-4b4a-46c3-b4da-2601bf5d46ce 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 240478c7-4b4a-46c3-b4da-2601bf5d46ce 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/20b8ff43-8c65-40f3-a825-8531305338f3 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/20b8ff43-8c65-40f3-a825-8531305338f3', version='HTTP/1.1', remote_ip='::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/20b8ff43-8c65-40f3-a825-8531305338f3 (::1) 7.180000ms 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 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 7, in 331s import json 331s File "/usr/lib/python3.13/json/__init__.py", line 106, in 331s from .decoder import JSONDecoder, JSONDecodeError 331s File "/usr/lib/python3.13/json/decoder.py", line 54, in 331s STRINGCHUNK = re.compile(r'(.*?)(["\\\x00-\x1f])', FLAGS) 331s File "/usr/lib/python3.13/re/__init__.py", line 289, in compile 331s return _compile(pattern, flags) 331s File "/usr/lib/python3.13/re/__init__.py", line 350, in _compile 331s p = _compiler.compile(pattern, flags) 331s File "/usr/lib/python3.13/re/_compiler.py", line 748, in compile 331s p = _parser.parse(p, flags) 331s File "/usr/lib/python3.13/re/_parser.py", line 980, in parse 331s p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) 331s File "/usr/lib/python3.13/re/_parser.py", line 451, in _parse_sub 331s def _parse_sub(source, state, verbose, nested): 331s 331s KeyboardInterrupt 331s =================================== FAILURES =================================== 331s ______________________ KernelAPITest.test_default_kernel _______________________ 331s 331s self = 331s 331s def tearDown(self): 331s for k in self.kern_api.list().json(): 331s > self.kern_api.shutdown(k['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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/kernels/2734955c-09ca-4833-b3a7-b685e61c774b 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ------------------------------ Captured log setup ------------------------------ 331s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp6rb3redp/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp6rb3redp/etc/jupyter'] for config files 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp6rb3redp/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp6rb3redp/config 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp6rb3redp/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp6rb3redp/config 331s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp6rb3redp/notebooks 331s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 331s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 331s WARNING NotebookApp:handlers.py:612 Forbidden 331s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.680000ms referer=None 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 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 861, in 331s from nt import _path_isdevdrive 331s File "", line 1360, in _find_and_load 331s File "", line 1322, in _find_and_load_unlocked 331s File "", line 1256, in _find_spec 331s File "", line 1228, in __exit__ 331s KeyboardInterrupt 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp6rb3redp/runtime/kernel-2734955c-09ca-4833-b3a7-b685e61c774b.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56467 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35525 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2734955c-09ca-4833-b3a7-b685e61c774b, 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 (::1) 60.940000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.730000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2734955c-09ca-4833-b3a7-b685e61c774b 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2734955c-09ca-4833-b3a7-b685e61c774b 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:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/2734955c-09ca-4833-b3a7-b685e61c774b (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/2734955c-09ca-4833-b3a7-b685e61c774b', version='HTTP/1.1', remote_ip='::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/dist-packages/tornado/gen.py", line 239, in wrapper 331s yielded = ctx_run(next, result) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 331s yield maybe_future(km.shutdown_kernel(kernel_id)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/kernels/2734955c-09ca-4833-b3a7-b685e61c774b (::1) 13.310000ms referer=None 331s ______________________ KernelAPITest.test_kernel_handler _______________________ 331s 331s self = 331s 331s def test_kernel_handler(self): 331s # GET kernel with given id 331s kid = self.kern_api.start().json()['id'] 331s r = self.kern_api.get(kid) 331s kern1 = r.json() 331s self.assertEqual(r.status_code, 200) 331s assert isinstance(kern1, dict) 331s self.assertIn('id', kern1) 331s self.assertEqual(kern1['id'], kid) 331s 331s # Request a bad kernel id and check that a JSON 331s # message is returned! 331s bad_id = '111-111-111-111-111' 331s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 331s self.kern_api.get(bad_id) 331s 331s # DELETE kernel with id 331s > r = self.kern_api.shutdown(kid) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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/kernels/50754e58-f041-4a54-8f24-c2c0295e2c05 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 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 45, in 331s from _winapi import ( 331s ...<2 lines>... 331s LCMAP_LOWERCASE as _LCMAP_LOWERCASE) 331s File "", line 1360, in _find_and_load 331s File "", line 1322, in _find_and_load_unlocked 331s File "", line 1262, in _find_spec 331s File "/usr/lib/python3/dist-packages/_distutils_hack/__init__.py", line 107, in find_spec 331s method_name = 'spec_for_{fullname}'.format(**locals()) 331s ~~~~~~^^ 331s KeyboardInterrupt 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp6rb3redp/runtime/kernel-50754e58-f041-4a54-8f24-c2c0295e2c05.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58117 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40487 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 50754e58-f041-4a54-8f24-c2c0295e2c05, 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 (::1) 14.630000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/50754e58-f041-4a54-8f24-c2c0295e2c05 (::1) 0.530000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1): Kernel does not exist: 111-111-111-111-111 331s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 331s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1) 0.580000ms referer=None 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 50754e58-f041-4a54-8f24-c2c0295e2c05 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 50754e58-f041-4a54-8f24-c2c0295e2c05 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:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/50754e58-f041-4a54-8f24-c2c0295e2c05 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/50754e58-f041-4a54-8f24-c2c0295e2c05', version='HTTP/1.1', remote_ip='::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/dist-packages/tornado/gen.py", line 239, in wrapper 331s yielded = ctx_run(next, result) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 331s yield maybe_future(km.shutdown_kernel(kernel_id)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/kernels/50754e58-f041-4a54-8f24-c2c0295e2c05 (::1) 6.460000ms referer=None 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.470000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2734955c-09ca-4833-b3a7-b685e61c774b 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2734955c-09ca-4833-b3a7-b685e61c774b 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/2734955c-09ca-4833-b3a7-b685e61c774b (::1) 1.850000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 50754e58-f041-4a54-8f24-c2c0295e2c05 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 50754e58-f041-4a54-8f24-c2c0295e2c05 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/50754e58-f041-4a54-8f24-c2c0295e2c05 (::1) 0.630000ms 331s ____________________ KernelAPITest.test_main_kernel_handler ____________________ 331s 331s self = 331s 331s def test_main_kernel_handler(self): 331s # POST request 331s r = self.kern_api.start() 331s kern1 = r.json() 331s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 331s self.assertEqual(r.status_code, 201) 331s self.assertIsInstance(kern1, dict) 331s 331s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 331s expected_csp = '; '.join([ 331s "frame-ancestors 'self'", 331s 'report-uri ' + report_uri, 331s "default-src 'none'" 331s ]) 331s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 331s 331s # GET request 331s r = self.kern_api.list() 331s self.assertEqual(r.status_code, 200) 331s assert isinstance(r.json(), list) 331s self.assertEqual(r.json()[0]['id'], kern1['id']) 331s self.assertEqual(r.json()[0]['name'], kern1['name']) 331s 331s # create another kernel and check that they both are added to the 331s # list of kernels from a GET request 331s kern2 = self.kern_api.start().json() 331s assert isinstance(kern2, dict) 331s r = self.kern_api.list() 331s kernels = r.json() 331s self.assertEqual(r.status_code, 200) 331s assert isinstance(kernels, list) 331s self.assertEqual(len(kernels), 2) 331s 331s # Interrupt a kernel 331s r = self.kern_api.interrupt(kern2['id']) 331s self.assertEqual(r.status_code, 204) 331s 331s # Restart a kernel 331s > r = self.kern_api.restart(kern2['id']) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 331s return self._req('POST', url_path_join(id, 'restart')) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/66f2355b-c520-4b71-a463-df1efa2f0d06/restart 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 File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 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 File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 9, in 331s from subprocess import PIPE, Popen 331s File "/usr/lib/python3.13/subprocess.py", line 51, in 331s import threading 331s File "/usr/lib/python3.13/threading.py", line 9, in 331s from _weakrefset import WeakSet 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 1214, in get_data 331s KeyboardInterrupt 331s Traceback (most recent call last): 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp6rb3redp/runtime/kernel-64a62e79-969d-4379-b350-4737a854624d.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48697 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56887 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 64a62e79-969d-4379-b350-4737a854624d, 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 (::1) 14.370000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.510000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp6rb3redp/runtime/kernel-66f2355b-c520-4b71-a463-df1efa2f0d06.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52077 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48853 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 66f2355b-c520-4b71-a463-df1efa2f0d06, 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 (::1) 21.770000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.800000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 66f2355b-c520-4b71-a463-df1efa2f0d06 331s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/66f2355b-c520-4b71-a463-df1efa2f0d06/interrupt (::1) 1.840000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 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:handlers.py:91 Exception restarting kernel 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 331s yield maybe_future(km.restart_kernel(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 314, in restart_kernel 331s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 331s await ensure_async(kernel.restart_kernel(now=now)) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/manager.py", line 590, in _async_restart_kernel 331s await self._async_shutdown_kernel(now=now, restart=True) 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: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 POST /a%40b/api/kernels/66f2355b-c520-4b71-a463-df1efa2f0d06/restart (::1) 7.270000ms referer=None 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.540000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 64a62e79-969d-4379-b350-4737a854624d 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 64a62e79-969d-4379-b350-4737a854624d 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:web.py:1945 Uncaught exception DELETE /a%40b/api/kernels/64a62e79-969d-4379-b350-4737a854624d (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/64a62e79-969d-4379-b350-4737a854624d', version='HTTP/1.1', remote_ip='::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/dist-packages/tornado/gen.py", line 239, in wrapper 331s yielded = ctx_run(next, result) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 72, in delete 331s yield maybe_future(km.shutdown_kernel(kernel_id)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 443, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/kernels/64a62e79-969d-4379-b350-4737a854624d (::1) 6.670000ms referer=None 331s ________________________ KernelAPITest.test_no_kernels _________________________ 331s 331s self = 331s 331s def test_no_kernels(self): 331s """Make sure there are no kernels running at the start""" 331s kernels = self.kern_api.list().json() 331s > self.assertEqual(kernels, []) 331s E AssertionError: Lists differ: [{'id': '64a62e79-969d-4379-b350-4737a8546[281 chars]: 0}] != [] 331s E 331s E First list contains 2 additional elements. 331s E First extra element 0: 331s E {'id': '64a62e79-969d-4379-b350-4737a854624d', 'name': 'python3', 'last_activity': '2026-02-06T02:22:23.391851Z', 'execution_state': 'starting', 'connections': 0} 331s E 331s E + [] 331s E - [{'connections': 0, 331s E - 'execution_state': 'starting', 331s E - 'id': '64a62e79-969d-4379-b350-4737a854624d', 331s E - 'last_activity': '2026-02-06T02:22:23.391851Z', 331s E - 'name': 'python3'}, 331s E - {'connections': 0, 331s E - 'execution_state': 'starting', 331s E - 'id': '66f2355b-c520-4b71-a463-df1efa2f0d06', 331s E - 'last_activity': '2026-02-06T02:22:23.417703Z', 331s E - 'name': 'python3'}] 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.630000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.480000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 64a62e79-969d-4379-b350-4737a854624d 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 64a62e79-969d-4379-b350-4737a854624d 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/64a62e79-969d-4379-b350-4737a854624d (::1) 0.770000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 66f2355b-c520-4b71-a463-df1efa2f0d06 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 66f2355b-c520-4b71-a463-df1efa2f0d06 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/66f2355b-c520-4b71-a463-df1efa2f0d06 (::1) 0.840000ms 331s ---------------------------- Captured log teardown ----------------------------- 331s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 331s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 331s _____________________ AsyncKernelAPITest.test_connections ______________________ 331s 331s self = 331s 331s def tearDown(self): 331s for k in self.kern_api.list().json(): 331s > self.kern_api.shutdown(k['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ------------------------------ Captured log setup ------------------------------ 331s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp121wp5l1/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp121wp5l1/etc/jupyter'] for config files 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp121wp5l1/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp121wp5l1/config 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp121wp5l1/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp121wp5l1/config 331s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp121wp5l1/notebooks 331s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 331s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 331s WARNING NotebookApp:handlers.py:612 Forbidden 331s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.430000ms referer=None 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp121wp5l1/runtime/kernel-953d7d98-9899-4d9a-a827-a21ada8136d0.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58303 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56565 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 953d7d98-9899-4d9a-a827-a21ada8136d0, 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 (::1) 14.390000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0 (::1) 1.670000ms 331s DEBUG NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0/channels 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s WARNING NotebookApp:zmqhandlers.py:286 No session ID specified 331s DEBUG NotebookApp:handlers.py:277 Requesting kernel info from 953d7d98-9899-4d9a-a827-a21ada8136d0 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34169 331s 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/'}]} 331s INFO NotebookApp:handlers.py:326 Adapting from protocol version 5.3 (kernel 953d7d98-9899-4d9a-a827-a21ada8136d0) to 5.4 (client). 331s DEBUG NotebookApp:log.py:59 101 GET /a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0/channels (::1) 476.050000ms 331s DEBUG NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0/channels 331s DEBUG NotebookApp:kernelmanager.py:252 Getting buffer for 953d7d98-9899-4d9a-a827-a21ada8136d0 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56565 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34169 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58303 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35741 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34169 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58303 331s WARNING NotebookApp:websocket.py:1327 The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000). 331s Setting websocket_ping_timeout=30000 331s DEBUG NotebookApp:handlers.py:255 Nudge: attempt 1 on kernel 953d7d98-9899-4d9a-a827-a21ada8136d0 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0 (::1) 0.620000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0 (::1) 0.530000ms 331s DEBUG NotebookApp:handlers.py:207 Nudge: IOPub received: 953d7d98-9899-4d9a-a827-a21ada8136d0 331s DEBUG NotebookApp:handlers.py:210 Nudge: resolving iopub future: 953d7d98-9899-4d9a-a827-a21ada8136d0 331s DEBUG NotebookApp:handlers.py:201 Nudge: control info reply received: 953d7d98-9899-4d9a-a827-a21ada8136d0 331s DEBUG NotebookApp:handlers.py:203 Nudge: resolving control future: 953d7d98-9899-4d9a-a827-a21ada8136d0 331s DEBUG NotebookApp:handlers.py:579 Websocket closed 953d7d98-9899-4d9a-a827-a21ada8136d0:3056f836-7ab676ad6d5798c2a273083c 331s INFO NotebookApp:kernelmanager.py:222 Starting buffering for 953d7d98-9899-4d9a-a827-a21ada8136d0:3056f836-7ab676ad6d5798c2a273083c 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 953d7d98-9899-4d9a-a827-a21ada8136d0 331s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 953d7d98-9899-4d9a-a827-a21ada8136d0:iopub 331s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 953d7d98-9899-4d9a-a827-a21ada8136d0:iopub 331s DEBUG NotebookApp:kernelmanager.py:235 Buffering msg on 953d7d98-9899-4d9a-a827-a21ada8136d0:iopub 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0 (::1) 0.660000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0 (::1) 0.490000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.470000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 953d7d98-9899-4d9a-a827-a21ada8136d0 331s INFO NotebookApp:kernelmanager.py:286 Discarding 3 buffered messages for 953d7d98-9899-4d9a-a827-a21ada8136d0:3056f836-7ab676ad6d5798c2a273083c 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 953d7d98-9899-4d9a-a827-a21ada8136d0 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/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0', version='HTTP/1.1', remote_ip='::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/kernels/handlers.py", line 72, in delete 331s yield maybe_future(km.shutdown_kernel(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/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0 (::1) 6.900000ms referer=None 331s ____________________ AsyncKernelAPITest.test_default_kernel ____________________ 331s 331s self = 331s 331s def tearDown(self): 331s for k in self.kern_api.list().json(): 331s > self.kern_api.shutdown(k['id']) 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:86: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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/kernels/19a3c48b-6bd5-4c01-90cb-062c7297ae37 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp121wp5l1/runtime/kernel-19a3c48b-6bd5-4c01-90cb-062c7297ae37.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53749 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40639 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 19a3c48b-6bd5-4c01-90cb-062c7297ae37, 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 (::1) 16.470000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.840000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 953d7d98-9899-4d9a-a827-a21ada8136d0 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 953d7d98-9899-4d9a-a827-a21ada8136d0 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/953d7d98-9899-4d9a-a827-a21ada8136d0 (::1) 4.680000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 19a3c48b-6bd5-4c01-90cb-062c7297ae37 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 19a3c48b-6bd5-4c01-90cb-062c7297ae37 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/kernels/19a3c48b-6bd5-4c01-90cb-062c7297ae37 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/19a3c48b-6bd5-4c01-90cb-062c7297ae37', version='HTTP/1.1', remote_ip='::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/kernels/handlers.py", line 72, in delete 331s yield maybe_future(km.shutdown_kernel(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/kernels/19a3c48b-6bd5-4c01-90cb-062c7297ae37 (::1) 14.900000ms referer=None 331s --------------------------- Captured stderr teardown --------------------------- 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 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 5, in 331s import re 331s File "/usr/lib/python3.13/re/__init__.py", line 125, in 331s import enum 331s File "/usr/lib/python3.13/enum.py", line 1343, in 331s class ReprEnum(Enum): 331s ...<2 lines>... 331s """ 331s File "/usr/lib/python3.13/enum.py", line 555, in __new__ 331s classdict['_value_repr_'] = metacls._find_data_repr_(cls, bases) 331s ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ 331s File "/usr/lib/python3.13/enum.py", line 965, in _find_data_repr_ 331s @classmethod 331s 331s KeyboardInterrupt 331s ____________________ AsyncKernelAPITest.test_kernel_handler ____________________ 331s 331s self = 331s 331s def test_kernel_handler(self): 331s # GET kernel with given id 331s kid = self.kern_api.start().json()['id'] 331s r = self.kern_api.get(kid) 331s kern1 = r.json() 331s self.assertEqual(r.status_code, 200) 331s assert isinstance(kern1, dict) 331s self.assertIn('id', kern1) 331s self.assertEqual(kern1['id'], kid) 331s 331s # Request a bad kernel id and check that a JSON 331s # message is returned! 331s bad_id = '111-111-111-111-111' 331s with assert_http_error(404, 'Kernel does not exist: ' + bad_id): 331s self.kern_api.get(bad_id) 331s 331s # DELETE kernel with id 331s > r = self.kern_api.shutdown(kid) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:169: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:57: in shutdown 331s return self._req('DELETE', id) 331s ^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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/kernels/220a9529-aafb-4c4b-94ab-5b4a4e318e98 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 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 14, in 331s import functools 331s File "", line 1360, in _find_and_load 331s File "", line 1331, in _find_and_load_unlocked 331s File "", line 946, in _load_unlocked 331s KeyboardInterrupt 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp121wp5l1/runtime/kernel-220a9529-aafb-4c4b-94ab-5b4a4e318e98.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35677 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48579 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 220a9529-aafb-4c4b-94ab-5b4a4e318e98, 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 (::1) 14.380000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels/220a9529-aafb-4c4b-94ab-5b4a4e318e98 (::1) 0.550000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s WARNING NotebookApp:web.py:1943 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1): Kernel does not exist: 111-111-111-111-111 331s WARNING NotebookApp:handlers.py:612 Kernel does not exist: 111-111-111-111-111 331s WARNING NotebookApp:log.py:59 404 GET /a%40b/api/kernels/111-111-111-111-111 (::1) 0.600000ms referer=None 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 220a9529-aafb-4c4b-94ab-5b4a4e318e98 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 220a9529-aafb-4c4b-94ab-5b4a4e318e98 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/kernels/220a9529-aafb-4c4b-94ab-5b4a4e318e98 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/220a9529-aafb-4c4b-94ab-5b4a4e318e98', version='HTTP/1.1', remote_ip='::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/kernels/handlers.py", line 72, in delete 331s yield maybe_future(km.shutdown_kernel(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/kernels/220a9529-aafb-4c4b-94ab-5b4a4e318e98 (::1) 7.380000ms referer=None 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.470000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 19a3c48b-6bd5-4c01-90cb-062c7297ae37 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 19a3c48b-6bd5-4c01-90cb-062c7297ae37 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/19a3c48b-6bd5-4c01-90cb-062c7297ae37 (::1) 1.740000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 220a9529-aafb-4c4b-94ab-5b4a4e318e98 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 220a9529-aafb-4c4b-94ab-5b4a4e318e98 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/220a9529-aafb-4c4b-94ab-5b4a4e318e98 (::1) 0.560000ms 331s _________________ AsyncKernelAPITest.test_main_kernel_handler __________________ 331s 331s self = 331s 331s def test_main_kernel_handler(self): 331s # POST request 331s r = self.kern_api.start() 331s kern1 = r.json() 331s self.assertEqual(r.headers['location'], url_path_join(self.url_prefix, 'api/kernels', kern1['id'])) 331s self.assertEqual(r.status_code, 201) 331s self.assertIsInstance(kern1, dict) 331s 331s report_uri = url_path_join(self.url_prefix, 'api/security/csp-report') 331s expected_csp = '; '.join([ 331s "frame-ancestors 'self'", 331s 'report-uri ' + report_uri, 331s "default-src 'none'" 331s ]) 331s self.assertEqual(r.headers['Content-Security-Policy'], expected_csp) 331s 331s # GET request 331s r = self.kern_api.list() 331s self.assertEqual(r.status_code, 200) 331s assert isinstance(r.json(), list) 331s self.assertEqual(r.json()[0]['id'], kern1['id']) 331s self.assertEqual(r.json()[0]['name'], kern1['name']) 331s 331s # create another kernel and check that they both are added to the 331s # list of kernels from a GET request 331s kern2 = self.kern_api.start().json() 331s assert isinstance(kern2, dict) 331s r = self.kern_api.list() 331s kernels = r.json() 331s self.assertEqual(r.status_code, 200) 331s assert isinstance(kernels, list) 331s self.assertEqual(len(kernels), 2) 331s 331s # Interrupt a kernel 331s r = self.kern_api.interrupt(kern2['id']) 331s self.assertEqual(r.status_code, 204) 331s 331s # Restart a kernel 331s > r = self.kern_api.restart(kern2['id']) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:147: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:63: in restart 331s return self._req('POST', url_path_join(id, 'restart')) 331s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:42: 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: Internal Server Error for url: http://localhost:12341/a%40b/api/kernels/4f8df466-d8a2-43dd-86c8-0a13160d39f4/restart 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 File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 331s exec(code, run_globals) 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 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 ::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/tmp121wp5l1/runtime/kernel-f28e8c01-8030-4a10-8866-63f544c89a81.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:33753 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:53579 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: f28e8c01-8030-4a10-8866-63f544c89a81, 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 (::1) 15.990000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.490000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp121wp5l1/runtime/kernel-4f8df466-d8a2-43dd-86c8-0a13160d39f4.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59741 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37313 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 4f8df466-d8a2-43dd-86c8-0a13160d39f4, 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 (::1) 18.470000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.570000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s INFO NotebookApp:multikernelmanager.py:396 Kernel interrupted: 4f8df466-d8a2-43dd-86c8-0a13160d39f4 331s DEBUG NotebookApp:log.py:59 204 POST /a%40b/api/kernels/4f8df466-d8a2-43dd-86c8-0a13160d39f4/interrupt (::1) 0.620000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 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:handlers.py:91 Exception restarting kernel 331s Traceback (most recent call last): 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 89, in post 331s yield maybe_future(km.restart_kernel(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 291, in __step_run_and_handle_result 331s result = coro.throw(exc) 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 314, in restart_kernel 331s await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now)) 331s File "/usr/lib/python3.14/asyncio/futures.py", line 295, in __await__ 331s yield self # This tells Task to wait for completion. 331s ^^^^^^^^^^ 331s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 331s future.result() 331s ~~~~~~~~~~~~~^^ 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/jupyter_client/multikernelmanager.py", line 434, in _async_restart_kernel 331s await ensure_async(kernel.restart_kernel(now=now)) 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 590, in _async_restart_kernel 331s await self._async_shutdown_kernel(now=now, restart=True) 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: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 POST /a%40b/api/kernels/4f8df466-d8a2-43dd-86c8-0a13160d39f4/restart (::1) 3.310000ms referer=None 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.520000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f28e8c01-8030-4a10-8866-63f544c89a81 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f28e8c01-8030-4a10-8866-63f544c89a81 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/kernels/f28e8c01-8030-4a10-8866-63f544c89a81 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/kernels/f28e8c01-8030-4a10-8866-63f544c89a81', version='HTTP/1.1', remote_ip='::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/kernels/handlers.py", line 72, in delete 331s yield maybe_future(km.shutdown_kernel(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 ______________________ AsyncKernelAPITest.test_no_kernels ______________________ 331s 331s self = 331s 331s def test_no_kernels(self): 331s """Make sure there are no kernels running at the start""" 331s kernels = self.kern_api.list().json() 331s > self.assertEqual(kernels, []) 331s E AssertionError: Lists differ: [{'id': 'f28e8c01-8030-4a10-8866-63f544c89[281 chars]: 0}] != [] 331s E 331s E First list contains 2 additional elements. 331s E First extra element 0: 331s E {'id': 'f28e8c01-8030-4a10-8866-63f544c89a81', 'name': 'python3', 'last_activity': '2026-02-06T02:22:24.365576Z', 'execution_state': 'starting', 'connections': 0} 331s E 331s E + [] 331s E - [{'connections': 0, 331s E - 'execution_state': 'starting', 331s E - 'id': 'f28e8c01-8030-4a10-8866-63f544c89a81', 331s E - 'last_activity': '2026-02-06T02:22:24.365576Z', 331s E - 'name': 'python3'}, 331s E - {'connections': 0, 331s E - 'execution_state': 'starting', 331s E - 'id': '4f8df466-d8a2-43dd-86c8-0a13160d39f4', 331s E - 'last_activity': '2026-02-06T02:22:24.387832Z', 331s E - 'name': 'python3'}] 331s 331s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:91: AssertionError 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.550000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 0.460000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for f28e8c01-8030-4a10-8866-63f544c89a81 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f28e8c01-8030-4a10-8866-63f544c89a81 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/f28e8c01-8030-4a10-8866-63f544c89a81 (::1) 1.750000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 4f8df466-d8a2-43dd-86c8-0a13160d39f4 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 4f8df466-d8a2-43dd-86c8-0a13160d39f4 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/4f8df466-d8a2-43dd-86c8-0a13160d39f4 (::1) 0.640000ms 331s ---------------------------- Captured log teardown ----------------------------- 331s INFO NotebookApp:notebookapp.py:2164 Shutting down 0 kernels 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: f28e8c01-8030-4a10-8866-63f544c89a81 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 953d7d98-9899-4d9a-a827-a21ada8136d0 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 19a3c48b-6bd5-4c01-90cb-062c7297ae37 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 220a9529-aafb-4c4b-94ab-5b4a4e318e98 331s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 331s __________________________ SessionAPITest.test_create __________________________ 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/df7d46b2-d78d-4050-8175-7cfe14fd5ae6 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ------------------------------ Captured log setup ------------------------------ 331s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp8aquxh0f/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp8aquxh0f/etc/jupyter'] for config files 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp8aquxh0f/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp8aquxh0f/config 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp8aquxh0f/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp8aquxh0f/config 331s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp8aquxh0f/notebooks 331s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 331s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 331s WARNING NotebookApp:handlers.py:612 Forbidden 331s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.430000ms referer=None 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 ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.870000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8aquxh0f/runtime/kernel-c21b397e-d556-4417-b14c-c2844290f2bc.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:36617 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:56475 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: c21b397e-d556-4417-b14c-c2844290f2bc, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp8aquxh0f/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 16.490000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.600000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/df7d46b2-d78d-4050-8175-7cfe14fd5ae6 (::1) 0.650000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.790000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c21b397e-d556-4417-b14c-c2844290f2bc 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c21b397e-d556-4417-b14c-c2844290f2bc 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:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/df7d46b2-d78d-4050-8175-7cfe14fd5ae6 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/df7d46b2-d78d-4050-8175-7cfe14fd5ae6', version='HTTP/1.1', remote_ip='::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/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 802, in run 331s yielded = self.gen.send(value) 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/df7d46b2-d78d-4050-8175-7cfe14fd5ae6 (::1) 11.900000ms 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 5, in 331s import re 331s File "/usr/lib/python3.13/re/__init__.py", line 316, in 331s Match = type(_compiler.compile('', 0).match('')) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^ 331s KeyboardInterrupt 331s __________________ SessionAPITest.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/0cbea616-8a2e-4ecf-989f-6a366515a577 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ----------------------------- Captured stderr call ----------------------------- 331s Exception ignored in: .cb at 0x6ecb099d00e0> 331s Traceback (most recent call last): 331s File "", line 446, in cb 331s KeyboardInterrupt: 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8aquxh0f/runtime/kernel-3166c70c-a170-44c7-9b9f-a813b75326b9.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:58697 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:34871 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 3166c70c-a170-44c7-9b9f-a813b75326b9, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp8aquxh0f/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 14.810000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.730000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for c21b397e-d556-4417-b14c-c2844290f2bc 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: c21b397e-d556-4417-b14c-c2844290f2bc 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/df7d46b2-d78d-4050-8175-7cfe14fd5ae6 (::1) 4.580000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3166c70c-a170-44c7-9b9f-a813b75326b9 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3166c70c-a170-44c7-9b9f-a813b75326b9 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:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/0cbea616-8a2e-4ecf-989f-6a366515a577 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/0cbea616-8a2e-4ecf-989f-6a366515a577', version='HTTP/1.1', remote_ip='::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/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 802, in run 331s yielded = self.gen.send(value) 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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 ____________________ SessionAPITest.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/37f487e4-6cb4-4a34-bfbf-c48807f67c48 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ----------------------------- Captured stderr call ----------------------------- 331s Exception ignored in: .KeyedRef.remove at 0x68cd263d0b80> 331s Traceback (most recent call last): 331s File "", line 91, in remove 331s KeyboardInterrupt: 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8aquxh0f/runtime/kernel-dfdc30b1-5a85-4ee0-bbae-fe1a0b650079.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52065 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41485 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: dfdc30b1-5a85-4ee0-bbae-fe1a0b650079, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp8aquxh0f/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 21.400000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 3.820000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 3166c70c-a170-44c7-9b9f-a813b75326b9 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 3166c70c-a170-44c7-9b9f-a813b75326b9 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/0cbea616-8a2e-4ecf-989f-6a366515a577 (::1) 2.490000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dfdc30b1-5a85-4ee0-bbae-fe1a0b650079 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dfdc30b1-5a85-4ee0-bbae-fe1a0b650079 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:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/37f487e4-6cb4-4a34-bfbf-c48807f67c48 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/37f487e4-6cb4-4a34-bfbf-c48807f67c48', version='HTTP/1.1', remote_ip='::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/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 802, in run 331s yielded = self.gen.send(value) 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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 ___________________ SessionAPITest.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/611521ae-c80f-4595-ab24-ab1e2af89984 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8aquxh0f/runtime/kernel-0d8fc60c-53cf-40aa-9d7f-c48e52090548.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40607 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:39965 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 0d8fc60c-53cf-40aa-9d7f-c48e52090548, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp8aquxh0f/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 19.160000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.640000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for dfdc30b1-5a85-4ee0-bbae-fe1a0b650079 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: dfdc30b1-5a85-4ee0-bbae-fe1a0b650079 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/37f487e4-6cb4-4a34-bfbf-c48807f67c48 (::1) 2.070000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0d8fc60c-53cf-40aa-9d7f-c48e52090548 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0d8fc60c-53cf-40aa-9d7f-c48e52090548 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:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/611521ae-c80f-4595-ab24-ab1e2af89984 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/611521ae-c80f-4595-ab24-ab1e2af89984', version='HTTP/1.1', remote_ip='::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/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 802, in run 331s yielded = self.gen.send(value) 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/611521ae-c80f-4595-ab24-ab1e2af89984 (::1) 15.190000ms referer=None 331s --------------------------- Captured stderr teardown --------------------------- 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 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 5, in 331s import re 331s File "/usr/lib/python3.13/re/__init__.py", line 125, in 331s import enum 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 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 13, in 331s if sys.path[0] == "" or Path(sys.path[0]) == Path.cwd(): 331s ~~~~~~~~^^ 331s File "/usr/lib/python3.13/pathlib/_abc.py", line 746, in cwd 331s return cls('').absolute() 331s ~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.13/pathlib/_local.py", line 651, in absolute 331s cwd = os.getcwd() 331s FileNotFoundError: [Errno 2] No such file or directory 331s __________________ SessionAPITest.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': '611521ae-c80f-4595-ab24-ab1e2af89984', 'p[553 chars]ne}}] != [{'id': 'e549be35-5f86-489d-a295-51877a509a27', 'p[279 chars]ne}}] 331s E 331s E First differing element 0: 331s E {'id': '611521ae-c80f-4595-ab24-ab1e2af89984', 'p[218 chars]: 0}} 331s E {'id': 'e549be35-5f86-489d-a295-51877a509a27', 'p[278 chars]one}} 331s E 331s E First list contains 1 additional elements. 331s E First extra element 1: 331s E {'id': 'e549be35-5f86-489d-a295-51877a509a27', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': 'bd1a7217-1aea-4fd9-8483-cc9afc0397f2', 'name': 'python3', 'last_activity': '2026-02-06T02:22:24.929582Z', '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 ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8aquxh0f/runtime/kernel-bd1a7217-1aea-4fd9-8483-cc9afc0397f2.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:47391 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50755 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: bd1a7217-1aea-4fd9-8483-cc9afc0397f2, 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 (::1) 17.350000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 5.300000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.650000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.660000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 0d8fc60c-53cf-40aa-9d7f-c48e52090548 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 0d8fc60c-53cf-40aa-9d7f-c48e52090548 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/611521ae-c80f-4595-ab24-ab1e2af89984 (::1) 1.310000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for bd1a7217-1aea-4fd9-8483-cc9afc0397f2 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: bd1a7217-1aea-4fd9-8483-cc9afc0397f2 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:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27', version='HTTP/1.1', remote_ip='::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/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 802, in run 331s yielded = self.gen.send(value) 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/e549be35-5f86-489d-a295-51877a509a27 (::1) 15.740000ms referer=None 331s _____________________ SessionAPITest.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/e549be35-5f86-489d-a295-51877a509a27 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 7, in 331s import json 331s File "/usr/lib/python3.13/json/__init__.py", line 106, in 331s from .decoder import JSONDecoder, JSONDecodeError 331s File "/usr/lib/python3.13/json/decoder.py", line 5, in 331s from json import scanner 331s File "", line 1357, in _find_and_load 331s File "", line 418, in __enter__ 331s File "", line 316, in acquire 331s KeyboardInterrupt 331s ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.780000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8aquxh0f/runtime/kernel-7721069e-4b17-4150-b0ae-f15860945e11.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:38935 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44565 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 7721069e-4b17-4150-b0ae-f15860945e11, 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 (::1) 18.690000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for bd1a7217-1aea-4fd9-8483-cc9afc0397f2 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: bd1a7217-1aea-4fd9-8483-cc9afc0397f2 331s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27 (::1) 2.700000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.900000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 3.250000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7721069e-4b17-4150-b0ae-f15860945e11 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7721069e-4b17-4150-b0ae-f15860945e11 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:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27', version='HTTP/1.1', remote_ip='::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/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 802, in run 331s yielded = self.gen.send(value) 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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/e549be35-5f86-489d-a295-51877a509a27 (::1) 13.150000ms referer=None 331s --------------------------- Captured stderr teardown --------------------------- 331s [IPKernelApp] ERROR | Current working directory doesn't exist. 331s ____________________ SessionAPITest.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/e549be35-5f86-489d-a295-51877a509a27 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 ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.830000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp8aquxh0f/runtime/kernel-69e1dd8c-f52d-48de-8114-eb4103b08fed.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:50329 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:41033 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 69e1dd8c-f52d-48de-8114-eb4103b08fed, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmp8aquxh0f/notebooks/foo'} 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 7721069e-4b17-4150-b0ae-f15860945e11 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 7721069e-4b17-4150-b0ae-f15860945e11 331s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27 (::1) 20.870000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.930000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.880000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 69e1dd8c-f52d-48de-8114-eb4103b08fed 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 69e1dd8c-f52d-48de-8114-eb4103b08fed 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:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/e549be35-5f86-489d-a295-51877a509a27', version='HTTP/1.1', remote_ip='::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/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 802, in run 331s yielded = self.gen.send(value) 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 304, in shutdown_kernel 331s self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 331s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/jupyter_client/multikernelmanager.py", line 323, in _async_shutdown_kernel 331s stopper = ensure_async(km.shutdown_kernel(now, restart)) 331s ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 171, in wrapped 331s return _runner_map[name].run(inner) 331s ~~~~~~~~~~~~~~~~~~~~~^^^^^^^ 331s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 128, in run 331s return fut.result(None) 331s ~~~~~~~~~~^^^^^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 450, in result 331s return self.__get_result() 331s ~~~~~~~~~~~~~~~~~^^ 331s File "/usr/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result 331s raise self._exception 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/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 --------------------------- 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 514, in 331s from nt import _getfullpathname 331s File "", line 1360, in _find_and_load 331s File "", line 1322, in _find_and_load_unlocked 331s File "", line 1262, in _find_spec 331s File "", line 1556, in find_spec 331s File "", line 1530, in _get_spec 331s File "", line 1661, in find_spec 331s KeyboardInterrupt 331s ---------------------------- Captured log teardown ----------------------------- 331s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 69e1dd8c-f52d-48de-8114-eb4103b08fed 331s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 331s _______________________ AsyncSessionAPITest.test_create ________________________ 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/b9734187-aad6-49a9-b2e8-c58a5aa80642 331s 331s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 331s ------------------------------ Captured log setup ------------------------------ 331s DEBUG NotebookApp:application.py:195 Searching ['/tmp/tmp35zgywqv/config', '/tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter', '/usr/etc/jupyter', '/tmp/tmp35zgywqv/etc/jupyter'] for config files 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp35zgywqv/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_config in /tmp/tmp35zgywqv/config 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp35zgywqv/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /usr/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/autopkgtest.tpx4mW/autopkgtest_tmp/home/.local/etc/jupyter 331s DEBUG NotebookApp:application.py:909 Looking for jupyter_notebook_config in /tmp/tmp35zgywqv/config 331s INFO NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmp35zgywqv/notebooks 331s INFO NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.13 is running at: 331s INFO NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2327 or http://127.0.0.1:12341/a%40b/?token=... 331s INFO NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 331s WARNING NotebookApp:handlers.py:612 Forbidden 331s WARNING NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.450000ms referer=None 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 ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.780000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp35zgywqv/runtime/kernel-e4eb1c05-ad86-433b-98b2-230232cee231.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:37283 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52265 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: e4eb1c05-ad86-433b-98b2-230232cee231, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp35zgywqv/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 14.540000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.560000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions/b9734187-aad6-49a9-b2e8-c58a5aa80642 (::1) 0.530000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.520000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e4eb1c05-ad86-433b-98b2-230232cee231 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e4eb1c05-ad86-433b-98b2-230232cee231 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/b9734187-aad6-49a9-b2e8-c58a5aa80642 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/b9734187-aad6-49a9-b2e8-c58a5aa80642', version='HTTP/1.1', remote_ip='::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 --------------------------- 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 "", line 1360, in _find_and_load 331s File "", line 1322, in _find_and_load_unlocked 331s File "", line 1256, in _find_spec 331s File "", line 1226, in __exit__ 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/3f622559-758f-4d8a-809b-21df63096afe 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 ::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/tmp35zgywqv/runtime/kernel-262ef22c-8cb6-4424-8daa-344a561421a2.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:55273 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:45889 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 262ef22c-8cb6-4424-8daa-344a561421a2, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp35zgywqv/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 14.330000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.780000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for e4eb1c05-ad86-433b-98b2-230232cee231 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e4eb1c05-ad86-433b-98b2-230232cee231 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/b9734187-aad6-49a9-b2e8-c58a5aa80642 (::1) 1.880000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 262ef22c-8cb6-4424-8daa-344a561421a2 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 262ef22c-8cb6-4424-8daa-344a561421a2 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/3f622559-758f-4d8a-809b-21df63096afe (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/3f622559-758f-4d8a-809b-21df63096afe', version='HTTP/1.1', remote_ip='::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 --------------------------- 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 5, in 331s import re 331s File "/usr/lib/python3.13/re/__init__.py", line 126, in 331s from . import _compiler, _parser 331s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 331s from . import _parser 331s File "/usr/lib/python3.13/re/_parser.py", line 15, in 331s from ._constants import * 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/03a7f778-4832-4ed1-b07a-eb22d60206ad 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 ::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/tmp35zgywqv/runtime/kernel-130341ba-bf03-419f-a95f-2861e7537a1e.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:59687 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:46417 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 130341ba-bf03-419f-a95f-2861e7537a1e, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp35zgywqv/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 14.460000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.590000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 262ef22c-8cb6-4424-8daa-344a561421a2 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 262ef22c-8cb6-4424-8daa-344a561421a2 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/3f622559-758f-4d8a-809b-21df63096afe (::1) 1.900000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 130341ba-bf03-419f-a95f-2861e7537a1e 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 130341ba-bf03-419f-a95f-2861e7537a1e 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/03a7f778-4832-4ed1-b07a-eb22d60206ad (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/03a7f778-4832-4ed1-b07a-eb22d60206ad', version='HTTP/1.1', remote_ip='::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 --------------------------- 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 5, in 331s import re 331s File "/usr/lib/python3.13/re/__init__.py", line 126, in 331s from . import _compiler, _parser 331s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 331s from . import _parser 331s File "/usr/lib/python3.13/re/_parser.py", line 15, in 331s from ._constants import * 331s File "/usr/lib/python3.13/re/_constants.py", line 130, in 331s ATCODES = _makecodes( 331s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 331s ...<5 lines>... 331s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 331s ) 331s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 331s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 331s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 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/79b55853-df0c-4ab4-ae45-0b722d2ff25e 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 ::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/tmp35zgywqv/runtime/kernel-2d3d27da-ad85-4454-8c28-988747f89ad0.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:52679 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:54571 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 2d3d27da-ad85-4454-8c28-988747f89ad0, name: python3 331s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python', 'cwd': '/tmp/tmp35zgywqv/notebooks/foo'} 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 15.730000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.790000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 130341ba-bf03-419f-a95f-2861e7537a1e 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 130341ba-bf03-419f-a95f-2861e7537a1e 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/03a7f778-4832-4ed1-b07a-eb22d60206ad (::1) 0.720000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2d3d27da-ad85-4454-8c28-988747f89ad0 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d3d27da-ad85-4454-8c28-988747f89ad0 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/79b55853-df0c-4ab4-ae45-0b722d2ff25e (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/79b55853-df0c-4ab4-ae45-0b722d2ff25e', version='HTTP/1.1', remote_ip='::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 --------------------------- 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 5, in 331s import re 331s File "/usr/lib/python3.13/re/__init__.py", line 126, in 331s from . import _compiler, _parser 331s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 331s from . import _parser 331s File "/usr/lib/python3.13/re/_parser.py", line 20, in 331s DIGITS = frozenset("0123456789") 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': '79b55853-df0c-4ab4-ae45-0b722d2ff25e', 'p[553 chars]ne}}] != [{'id': '20b8ff43-8c65-40f3-a825-8531305338f3', 'p[279 chars]ne}}] 331s E 331s E First differing element 0: 331s E {'id': '79b55853-df0c-4ab4-ae45-0b722d2ff25e', 'p[218 chars]: 0}} 331s E {'id': '20b8ff43-8c65-40f3-a825-8531305338f3', 'p[278 chars]one}} 331s E 331s E First list contains 1 additional elements. 331s E First extra element 1: 331s E {'id': '20b8ff43-8c65-40f3-a825-8531305338f3', 'path': 'foo/nb1.ipynb', 'name': None, 'type': 'notebook', 'kernel': {'id': '240478c7-4b4a-46c3-b4da-2601bf5d46ce', 'name': 'python3', 'last_activity': '2026-02-06T02:22:25.462286Z', '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 ------------------------------ Captured log call ------------------------------- 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp35zgywqv/runtime/kernel-240478c7-4b4a-46c3-b4da-2601bf5d46ce.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:40917 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35557 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 240478c7-4b4a-46c3-b4da-2601bf5d46ce, 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 (::1) 15.710000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.680000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 0.580000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.810000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 2d3d27da-ad85-4454-8c28-988747f89ad0 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d3d27da-ad85-4454-8c28-988747f89ad0 331s DEBUG NotebookApp:log.py:59 204 DELETE /a%40b/api/sessions/79b55853-df0c-4ab4-ae45-0b722d2ff25e (::1) 1.940000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 240478c7-4b4a-46c3-b4da-2601bf5d46ce 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 240478c7-4b4a-46c3-b4da-2601bf5d46ce 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/20b8ff43-8c65-40f3-a825-8531305338f3 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/20b8ff43-8c65-40f3-a825-8531305338f3', version='HTTP/1.1', remote_ip='::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/20b8ff43-8c65-40f3-a825-8531305338f3 (::1) 7.180000ms 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/20b8ff43-8c65-40f3-a825-8531305338f3 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 ::1 331s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 1.930000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::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/tmp35zgywqv/runtime/kernel-28435d7e-a41e-485b-9db0-539f1f2fb423.json'] 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:48869 331s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:57893 331s INFO NotebookApp:kernelmanager.py:179 Kernel started: 28435d7e-a41e-485b-9db0-539f1f2fb423, 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 (::1) 13.990000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 240478c7-4b4a-46c3-b4da-2601bf5d46ce 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 240478c7-4b4a-46c3-b4da-2601bf5d46ce 331s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/20b8ff43-8c65-40f3-a825-8531305338f3 (::1) 1.070000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.720000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.810000ms 331s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 331s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 28435d7e-a41e-485b-9db0-539f1f2fb423 331s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 28435d7e-a41e-485b-9db0-539f1f2fb423 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/20b8ff43-8c65-40f3-a825-8531305338f3 (::1) 331s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/20b8ff43-8c65-40f3-a825-8531305338f3', version='HTTP/1.1', remote_ip='::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) 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 332s await asyncio.wait_for( 332s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 332s ) 332s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 332s async with timeouts.timeout(timeout): 332s ~~~~~~~~~~~~~~~~^^^^^^^^^ 332s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 332s raise RuntimeError("Timeout should be used inside a task") 332s RuntimeError: Timeout should be used inside a task 332s WARNING NotebookApp:handlers.py:612 Unhandled error 332s --------------------------- Captured stderr teardown --------------------------- 332s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 332s return _run_code(code, main_globals, None, 332s "__main__", mod_spec) 332s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 332s exec(code, run_globals) 332s ~~~~^^^^^^^^^^^^^^^^^^^ 332s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 332s from pathlib import Path 332s File "/usr/lib/python3.13/pathlib/__init__.py", line 9, in 332s from ._local import * 332s File "/usr/lib/python3.13/pathlib/_local.py", line 58, in 332s class PurePath(PurePathBase): 332s ...<397 lines>... 332s return '' if path_str == '.' else path_str 332s KeyboardInterrupt 332s _________________ AsyncSessionAPITest.test_modify_kernel_name __________________ 332s 332s @self.addCleanup 332s def cleanup_sessions(): 332s for session in self.sess_api.list().json(): 332s > self.sess_api.delete(session['id']) 332s 332s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:111: 332s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 332s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:85: in delete 332s return self._req('DELETE', id) 332s ^^^^^^^^^^^^^^^^^^^^^^^ 332s /usr/lib/python3/dist-packages/notebook/services/sessions/tests/test_sessions_api.py:40: in _req 332s response.raise_for_status() 332s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 332s 332s self = 332s 332s def raise_for_status(self): 332s """Raises :class:`HTTPError`, if one occurred.""" 332s 332s http_error_msg = "" 332s if isinstance(self.reason, bytes): 332s # We attempt to decode utf-8 first because some servers 332s # choose to localize their reason strings. If the string 332s # isn't utf-8, we fall back to iso-8859-1 for all other 332s # encodings. (See PR #3538) 332s try: 332s reason = self.reason.decode("utf-8") 332s except UnicodeDecodeError: 332s reason = self.reason.decode("iso-8859-1") 332s else: 332s reason = self.reason 332s 332s if 400 <= self.status_code < 500: 332s http_error_msg = ( 332s f"{self.status_code} Client Error: {reason} for url: {self.url}" 332s ) 332s 332s elif 500 <= self.status_code < 600: 332s http_error_msg = ( 332s f"{self.status_code} Server Error: {reason} for url: {self.url}" 332s ) 332s 332s if http_error_msg: 332s > raise HTTPError(http_error_msg, response=self) 332s E requests.exceptions.HTTPError: 500 Server Error: Unhandled error for url: http://localhost:12341/a%40b/api/sessions/20b8ff43-8c65-40f3-a825-8531305338f3 332s 332s /usr/lib/python3/dist-packages/requests/models.py:1026: HTTPError 332s ----------------------------- Captured stderr call ----------------------------- 332s Traceback (most recent call last): 332s ------------------------------ Captured log call ------------------------------- 332s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 332s DEBUG NotebookApp:log.py:59 201 POST /a%40b/api/sessions (::1) 0.790000ms 332s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 332s DEBUG NotebookApp:factory.py:92 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner 332s DEBUG NotebookApp:manager.py:439 Starting kernel: ['/usr/bin/python3', '-Xfrozen_modules=off', '-m', 'ipykernel_launcher', '-f', '/tmp/tmp35zgywqv/runtime/kernel-462e2888-09e8-46a7-8b6d-1baebe629c78.json'] 332s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:44143 332s DEBUG NotebookApp:connect.py:654 Connecting to: tcp://127.0.0.1:35221 332s INFO NotebookApp:kernelmanager.py:179 Kernel started: 462e2888-09e8-46a7-8b6d-1baebe629c78, name: python3 332s DEBUG NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3', 'cwd': '/tmp/tmp35zgywqv/notebooks/foo'} 332s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 28435d7e-a41e-485b-9db0-539f1f2fb423 332s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 28435d7e-a41e-485b-9db0-539f1f2fb423 332s DEBUG NotebookApp:log.py:59 200 PATCH /a%40b/api/sessions/20b8ff43-8c65-40f3-a825-8531305338f3 (::1) 15.970000ms 332s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 332s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 1.680000ms 332s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 332s DEBUG NotebookApp:log.py:59 200 GET /a%40b/api/sessions (::1) 1.690000ms 332s DEBUG NotebookApp:login.py:213 Accepting token-authenticated connection from ::1 332s DEBUG NotebookApp:kernelmanager.py:272 Clearing buffer for 462e2888-09e8-46a7-8b6d-1baebe629c78 332s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 462e2888-09e8-46a7-8b6d-1baebe629c78 332s ERROR NotebookApp:manager.py:96 Timeout should be used inside a task 332s Traceback (most recent call last): 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 332s out = await method(self, *args, **kwargs) 332s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 332s await self._async_finish_shutdown(restart=restart) 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 332s await asyncio.wait_for( 332s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 332s ) 332s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 332s async with timeouts.timeout(timeout): 332s ~~~~~~~~~~~~~~~~^^^^^^^^^ 332s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 332s raise RuntimeError("Timeout should be used inside a task") 332s RuntimeError: Timeout should be used inside a task 332s ERROR NotebookApp:multikernelmanager.py:247 Timeout should be used inside a task 332s Traceback (most recent call last): 332s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 332s await kernel_awaitable 332s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 332s result = await obj 332s ^^^^^^^^^ 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 332s raise e 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 332s out = await method(self, *args, **kwargs) 332s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 332s await self._async_finish_shutdown(restart=restart) 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 332s await asyncio.wait_for( 332s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 332s ) 332s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 332s async with timeouts.timeout(timeout): 332s ~~~~~~~~~~~~~~~~^^^^^^^^^ 332s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 332s raise RuntimeError("Timeout should be used inside a task") 332s RuntimeError: Timeout should be used inside a task 332s ERROR NotebookApp:web.py:1945 Uncaught exception DELETE /a%40b/api/sessions/20b8ff43-8c65-40f3-a825-8531305338f3 (::1) 332s HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/sessions/20b8ff43-8c65-40f3-a825-8531305338f3', version='HTTP/1.1', remote_ip='::1') 332s Traceback (most recent call last): 332s File "/usr/lib/python3/dist-packages/tornado/web.py", line 1859, in _execute 332s result = await result 332s ^^^^^^^^^^^^ 332s File "/usr/lib/python3.14/asyncio/tasks.py", line 362, in __wakeup 332s future.result() 332s ~~~~~~~~~~~~~^^ 332s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 332s yielded = self.gen.throw(exc) 332s File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 164, in delete 332s yield maybe_future(sm.delete_session(session_id)) 332s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 332s value = future.result() 332s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 796, in run 332s yielded = self.gen.throw(exc) 332s File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 287, in delete_session 332s yield maybe_future(self.kernel_manager.shutdown_kernel(session['kernel']['id'])) 332s File "/usr/lib/python3/dist-packages/tornado/gen.py", line 783, in run 332s value = future.result() 332s File "/usr/lib/python3.14/asyncio/futures.py", line 208, in result 332s raise self._exception.with_traceback(self._exception_tb) 332s File "/usr/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result 332s result = coro.send(None) 332s File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 517, in shutdown_kernel 332s await self.pinned_superclass.shutdown_kernel(self, kernel_id, now=now, restart=restart) 332s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 331, in _async_shutdown_kernel 332s raise km.ready.exception() # type: ignore[misc] 332s ^^^^^^^^^^^^^^^^^^^^^^^^^^ 332s File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 243, in _remove_kernel_when_ready 332s await kernel_awaitable 332s File "/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async 332s result = await obj 332s ^^^^^^^^^ 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 97, in wrapper 332s raise e 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 88, in wrapper 332s out = await method(self, *args, **kwargs) 332s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 552, in _async_shutdown_kernel 332s await self._async_finish_shutdown(restart=restart) 332s File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 475, in _async_finish_shutdown 332s await asyncio.wait_for( 332s self._async_wait(pollinterval=pollinterval), timeout=waittime / 2 332s ) 332s File "/usr/lib/python3.14/asyncio/tasks.py", line 487, in wait_for 332s async with timeouts.timeout(timeout): 332s ~~~~~~~~~~~~~~~~^^^^^^^^^ 332s File "/usr/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__ 332s raise RuntimeError("Timeout should be used inside a task") 332s RuntimeError: Timeout should be used inside a task 332s WARNING NotebookApp:handlers.py:612 Unhandled error 332s --------------------------- Captured stderr teardown --------------------------- 332s File "/usr/lib/python3.13/runpy.py", line 198, in _run_module_as_main 332s return _run_code(code, main_globals, None, 332s "__main__", mod_spec) 332s File "/usr/lib/python3.13/runpy.py", line 88, in _run_code 332s exec(code, run_globals) 332s ~~~~^^^^^^^^^^^^^^^^^^^ 332s File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 8, in 332s from pathlib import Path 332s File "/usr/lib/python3.13/pathlib/__init__.py", line 8, in 332s from ._abc import * 332s File "/usr/lib/python3.13/pathlib/_abc.py", line 15, in 332s from glob import _Globber, _no_recurse_symlinks 332s File "/usr/lib/python3.13/glob.py", line 5, in 332s import re 332s File "/usr/lib/python3.13/re/__init__.py", line 126, in 332s from . import _compiler, _parser 332s File "/usr/lib/python3.13/re/_compiler.py", line 14, in 332s from . import _parser 332s File "/usr/lib/python3.13/re/_parser.py", line 15, in 332s from ._constants import * 332s File "/usr/lib/python3.13/re/_constants.py", line 130, in 332s ATCODES = _makecodes( 332s 'AT_BEGINNING', 'AT_BEGINNING_LINE', 'AT_BEGINNING_STRING', 332s ...<5 lines>... 332s 'AT_UNI_BOUNDARY', 'AT_UNI_NON_BOUNDARY', 332s ) 332s File "/usr/lib/python3.13/re/_constants.py", line 73, in _makecodes 332s items = [_NamedIntConstant(i, name) for i, name in enumerate(names)] 332s ~~~~~~~~~~~~~~~~~^^^^^^^^^ 332s KeyboardInterrupt 332s ---------------------------- Captured log teardown ----------------------------- 332s INFO NotebookApp:notebookapp.py:2164 Shutting down 1 kernel 332s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 262ef22c-8cb6-4424-8daa-344a561421a2 332s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: e4eb1c05-ad86-433b-98b2-230232cee231 332s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 28435d7e-a41e-485b-9db0-539f1f2fb423 332s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 240478c7-4b4a-46c3-b4da-2601bf5d46ce 332s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 130341ba-bf03-419f-a95f-2861e7537a1e 332s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 462e2888-09e8-46a7-8b6d-1baebe629c78 332s INFO NotebookApp:multikernelmanager.py:305 Kernel shutdown: 2d3d27da-ad85-4454-8c28-988747f89ad0 332s INFO NotebookApp:notebookapp.py:2179 Shutting down 0 terminals 332s =============================== warnings summary =============================== 332s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 332s ../../../usr/lib/python3/dist-packages/notebook/utils.py:280 332s /usr/lib/python3/dist-packages/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. 332s return LooseVersion(v) >= LooseVersion(check) 332s 332s ../../../usr/lib/python3/dist-packages/notebook/_tz.py:29: 1 warning 332s services/kernels/tests/test_kernels_api.py: 66 warnings 332s services/sessions/tests/test_sessions_api.py: 88 warnings 332s /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). 332s dt = unaware(*args, **kwargs) 332s 332s ../../../usr/lib/python3/dist-packages/notebook/tests/test_notebookapp_integration.py:14 332s /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 332s pytestmark = pytest.mark.integration_tests 332s 332s services/kernels/tests/test_kernels_api.py: 6 warnings 332s services/sessions/tests/test_sessions_api.py: 6 warnings 332s /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 332s policy = events.get_event_loop_policy() 332s 332s services/kernels/tests/test_kernels_api.py: 24 warnings 332s services/sessions/tests/test_sessions_api.py: 19 warnings 332s /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 332s loop = events.get_event_loop_policy().get_event_loop() 332s 332s services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 332s /usr/lib/python3/dist-packages/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first 332s loop.make_current() 332s 332s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 332s =========================== short test summary info ============================ 332s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_default_kernel 332s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_kernel_handler 332s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 332s FAILED services/kernels/tests/test_kernels_api.py::KernelAPITest::test_no_kernels 332s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections 332s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_default_kernel 332s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_kernel_handler 332s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 332s FAILED services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_no_kernels 332s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create 332s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_console_session 332s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_deprecated 332s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_file_session 332s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 332s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_id 332s FAILED services/sessions/tests/test_sessions_api.py::SessionAPITest::test_modify_kernel_name 332s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create 332s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_console_session 332s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_deprecated 332s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_file_session 332s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 332s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_id 332s FAILED services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_modify_kernel_name 332s ERROR services/kernels/tests/test_kernels_api.py::KernelAPITest::test_main_kernel_handler 332s ERROR services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_main_kernel_handler 332s ERROR services/sessions/tests/test_sessions_api.py::SessionAPITest::test_create_with_kernel_id 332s ERROR services/sessions/tests/test_sessions_api.py::AsyncSessionAPITest::test_create_with_kernel_id 332s ========== 23 failed, 307 deselected, 214 warnings, 4 errors in 6.56s ========== 332s *** END OF RUN 5: NOT ALL TESTS HAVE YET PASSED/XFAILED *** 332s *** SOME TESTS FAILED/ERRORED EVERY RUN, ABORTING *** 332s autopkgtest [02:22:32]: test pytest: -----------------------] 335s autopkgtest [02:22:36]: test pytest: - - - - - - - - - - results - - - - - - - - - - 335s pytest FAIL non-zero exit status 1 336s autopkgtest [02:22:37]: @@@@@@@@@@@@@@@@@@@@ summary 336s pytest FAIL non-zero exit status 1