jupyter-server / jupyter_server

The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.
https://jupyter-server.readthedocs.io
BSD 3-Clause "New" or "Revised" License
492 stars 308 forks source link

2.5.0: pytest is failing in some units #1237

Open kloczek opened 1 year ago

kloczek commented 1 year ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

I had much more failing units however today I found that I had few missing modules in buuld env. I'm assuming that still something is missing in build env of that mdule however I have difficulty now with finding what exactly still is missing. May I ask for some help/hints? 🤔

Here is list of installed modules in build env

```console Package Version ----------------------------- ----------------- alabaster 0.7.13 anyio 3.6.2 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 asttokens 2.2.1 attrs 22.2.0 Babel 2.12.1 backcall 0.2.0 beautifulsoup4 4.11.2 bleach 6.0.0 build 0.10.0 cffi 1.15.1 charset-normalizer 3.1.0 comm 0.1.2 debugpy 1.6.6 decorator 5.1.1 deepmerge 1.1.0 defusedxml 0.7.1 distro 1.8.0 docutils 0.19 editables 0.3 exceptiongroup 1.0.0 executing 1.2.0 fastjsonschema 2.16.3 gpg 1.18.0-unknown hatch-jupyter-builder 0.8.2 hatchling 1.13.0 html5lib 1.1 idna 3.4 imagesize 1.4.1 importlib-metadata 6.0.0 importlib-resources 5.12.0 iniconfig 2.0.0 ipykernel 6.21.3 ipython 8.6.0 jedi 0.18.2 Jinja2 3.1.2 jsonschema 4.17.3 jupyter_client 8.0.3 jupyter_core 5.2.0 jupyter-events 0.6.3 jupyter_server_terminals 0.4.4 jupyterlab-pygments 0.1.2 libcomps 0.1.19 markdown-it-py 2.2.0 MarkupSafe 2.1.2 matplotlib-inline 0.1.6 mdit-py-plugins 0.3.5 mdurl 0.1.2 mistune 2.0.5 myst-parser 0.19.1 nbclient 0.7.2 nbconvert 7.2.10 nbformat 5.7.3 nest-asyncio 1.5.6 packaging 23.0 pandocfilters 1.5.0 parso 0.8.3 pathspec 0.11.0 pexpect 4.8.0 pickleshare 0.7.5 picobox 2.2.0 pip 23.0.1 pkgutil_resolve_name 1.3.10 platformdirs 3.1.1 pluggy 1.0.0 ply 3.11 prometheus-client 0.16.0 prompt-toolkit 3.0.38 psutil 5.9.2 ptyprocess 0.7.0 pure-eval 0.2.2 pycparser 2.21 Pygments 2.14.0 pyproject_hooks 1.0.0 pyrsistent 0.19.3 pytest 7.2.2 pytest-console-scripts 1.3.1 pytest-jupyter 0.6.2 pytest-timeout 2.1.0 python-dateutil 2.8.2 python-json-logger 2.0.7 pytz 2022.4 PyYAML 6.0 pyzmq 24.0.1 requests 2.28.2 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rpm 4.17.0 Send2Trash 1.8.0 setuptools 65.6.3 six 1.16.0 sniffio 1.2.0 snowballstemmer 2.2.0 soupsieve 2.4 Sphinx 6.1.3 sphinx_autodoc_typehints 1.19.4 sphinx_mdinclude 0.5.3 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.2.dev20230202 sphinxcontrib_github_alt 1.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-httpdomain 1.8.0 sphinxcontrib-jsmath 1.0.1.dev20230128 sphinxcontrib-openapi 0.8.1 sphinxcontrib-qthelp 1.0.3.dev20230128 sphinxcontrib-serializinghtml 1.1.5 sphinxemoji 0.2.0 stack-data 0.6.2 terminado 0.17.1 tinycss2 1.2.1 tomli 2.0.1 tornado 6.2 traitlets 5.8.1 urllib3 1.26.15 wcwidth 0.2.6 webencodings 0.5.1 websocket-client 1.5.1 wheel 0.38.4 zipp 3.15.0 ```
kloczek commented 1 year ago

Here is the pytest summary output:

```console =============================== warnings summary =============================== jupyter_server/base/handlers.py:22 /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.5.0/jupyter_server/base/handlers.py:22: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import is_hidden tests/extension/test_app.py: 10 warnings /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.5.0/jupyter_server/serverapp.py:2370: ResourceWarning: unclosed self._find_http_port() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/kernels/test_cull.py::test_cull_dead[jp_server_config0] /usr/lib64/python3.8/json/encoder.py:253: ResourceWarning: unclosed _iterencode = _make_iterencode( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/kernels/test_cull.py::test_cull_dead[jp_server_config0] /usr/lib64/python3.8/json/encoder.py:253: ResourceWarning: unclosed _iterencode = _make_iterencode( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/sessions/test_api.py::test_restart_kernel[jp_server_config2] /usr/lib64/python3.8/asyncio/futures.py:367: ResourceWarning: unclosed def _call_set_state(source): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ============================= slowest 10 durations ============================= 12.14s call tests/test_terminal.py::test_culling 7.46s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config1] 7.33s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config0] 5.09s call tests/test_terminal.py::test_terminal_create_with_cwd 3.11s call tests/services/sessions/test_manager.py::test_pending_kernel 1.44s call tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/kernels/{kernel_id}/restart-None] 1.36s call tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/kernels-None] 1.34s call tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/kernels/{kernel_id}-None] 1.24s teardown tests/services/kernels/test_api.py::test_main_kernel_handler[jp_server_config0] 1.24s call tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/kernels/{kernel_id}/channels-None] =========================== short test summary info ============================ SKIPPED [1] tests/test_terminal.py:160: Not yet working SKIPPED [1] tests/test_terminal.py:197: Not yet working SKIPPED [7] tests/conftest.py:37: Skipping this test because it's marked 'integration_test'. Run integration tests using the `--integration_tests` flag. FAILED tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/contents/{nbpath}-None] - assert 500 in {200, 201, None, 204} FAILED tests/nbconvert/test_handlers.py::test_from_file - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/nbconvert/test_handlers.py::test_from_file_404 - assert False FAILED tests/nbconvert/test_handlers.py::test_from_file_download - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/nbconvert/test_handlers.py::test_from_file_zip - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/nbconvert/test_handlers.py::test_from_post - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/nbconvert/test_handlers.py::test_from_post_zip - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager--inroot] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-Directory with spaces in-inspace] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-unicod\xe9-innonascii] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-foo-a] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-foo-b] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-foo-name with spaces] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-foo-unicod\xe9] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-foo/bar-baz] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-ordering-A] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-ordering-b] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-ordering-C] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[FileContentsManager-\xe5 b-\xe7 d] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager--inroot] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-Directory with spaces in-inspace] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-unicod\xe9-innonascii] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo-a] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo-b] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo-name with spaces] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo-unicod\xe9] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo/bar-baz] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-ordering-A] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-ordering-b] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-ordering-C] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-\xe5 b-\xe7 d] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete_dirs[FileContentsManager] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete_dirs[AsyncFileContentsManager] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete_non_empty_dir[FileContentsManager] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_delete_non_empty_dir[AsyncFileContentsManager] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_regression_is_hidden[FileContentsManager] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_api.py::test_regression_is_hidden[AsyncFileContentsManager] - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error ====== 37 failed, 844 passed, 9 skipped, 14 warnings in 195.98s (0:03:15) ====== ```

And here it is full log python-jupyter-server.txt

kloczek commented 1 year ago

Looks like in 2.6.0 has been made some progress and now much less (only 11) are failing Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.6.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.6.0-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0 configfile: pyproject.toml testpaths: tests/ plugins: console-scripts-1.4.1, timeout-2.1.0, anyio-3.6.2 timeout: 100.0s timeout method: thread timeout func_only: False collected 912 items tests/test_config_manager.py . [ 0%] tests/test_files.py .................... [ 2%] tests/test_gateway.py .........................F [ 5%] tests/test_paths.py ...... [ 5%] tests/test_serialize.py .. [ 6%] tests/test_serverapp.py ................................................ [ 11%] ..................... [ 13%] tests/test_terminal.py ....ss..... [ 14%] tests/test_traittypes.py ........... [ 16%] tests/test_utils.py ............... [ 17%] tests/test_version.py ........ [ 18%] tests/test_view.py .... [ 18%] tests/auth/test_authorizer.py .......................................... [ 23%] .................... [ 25%] tests/auth/test_identity.py .................... [ 27%] tests/auth/test_legacy_login.py .................. [ 29%] tests/auth/test_login.py .............. [ 31%] tests/auth/test_security.py .... [ 31%] tests/auth/test_utils.py ............ [ 33%] tests/base/test_call_context.py .... [ 33%] tests/base/test_handlers.py ........ [ 34%] tests/base/test_websocket.py .... [ 34%] tests/extension/test_app.py ................ [ 36%] tests/extension/test_config.py . [ 36%] tests/extension/test_entrypoint.py . [ 36%] tests/extension/test_handler.py ..... [ 37%] tests/extension/test_launch.py ... [ 37%] tests/extension/test_manager.py ............... [ 39%] tests/extension/test_serverextension.py ....... [ 40%] tests/extension/test_utils.py ... [ 40%] tests/nbconvert/test_handlers.py FFFFFF [ 41%] tests/services/api/test_api.py .............. [ 42%] tests/services/config/test_api.py ... [ 43%] tests/services/contents/test_api.py .................................... [ 47%] ........................................................................ [ 54%] ........................................................................ [ 62%] ............................FFFF...................... [ 68%] tests/services/contents/test_checkpoints.py ............ [ 70%] tests/services/contents/test_config.py ..... [ 70%] tests/services/contents/test_fileio.py ...... [ 71%] tests/services/contents/test_largefilemanager.py .............. [ 72%] tests/services/contents/test_manager.py ................................ [ 76%] ........................................................................ [ 84%] .. [ 84%] tests/services/events/test_api.py ......... [ 85%] tests/services/events/test_extension.py . [ 85%] tests/services/kernels/test_api.py ..................... [ 87%] tests/services/kernels/test_config.py ... [ 88%] tests/services/kernels/test_connection.py . [ 88%] tests/services/kernels/test_cull.py ... [ 88%] tests/services/kernels/test_events.py ............ [ 89%] tests/services/kernelspecs/test_api.py ...... [ 90%] tests/services/nbconvert/test_api.py . [ 90%] tests/services/sessions/test_api.py .................................... [ 94%] ........................ [ 97%] tests/services/sessions/test_manager.py ................ [ 99%] tests/unix_sockets/test_api.py .. [ 99%] tests/unix_sockets/test_serverapp_integration.py sssssss [100%] =================================== FAILURES =================================== _______________________ test_websocket_connection_closed _______________________ init_gateway = None jp_serverapp = jp_fetch = .client_fetch at 0x7eff01b2c3a0> caplog = <_pytest.logging.LogCaptureFixture object at 0x7eff01b23820> @patch("tornado.websocket.websocket_connect", mock_websocket_connect()) async def test_websocket_connection_closed(init_gateway, jp_serverapp, jp_fetch, caplog): # Create the kernel and get the kernel manager... kernel_id = await create_kernel(jp_fetch, "kspec_foo") km: GatewayKernelManager = jp_serverapp.kernel_manager.get_kernel(kernel_id) # Create the KernelWebsocketHandler... request = HTTPServerRequest("foo", "GET") request.connection = MagicMock() handler = KernelWebsocketHandler(jp_serverapp.web_app, request) # Force the websocket handler to raise a closed error if we try to write a message # to the client. handler.ws_connection = MagicMock() handler.ws_connection.is_closing = lambda: True # Create the GatewayWebSocketConnection and attach it to the handler... conn = GatewayWebSocketConnection(parent=km, websocket_handler=handler) handler.connection = conn await conn.connect() # Processing websocket messages happens in separate coroutines and any # errors in that process will show up in logs, but not bubble up to the # caller. # # To check for these, we wait for the server to stop and then check the # logs for errors. await jp_serverapp._cleanup() for _, level, message in caplog.record_tuples: if level >= logging.ERROR: > pytest.fail(f"Logs contain an error: {message}") E Failed: Logs contain an error: exception calling callback for tests/test_gateway.py:719: Failed ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:00:25.509 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:39535/a%40b/?token=3d1cc38a69c21a826b7a93c4b318f7e680325467cad3fd5d INFO ServerApp:serverapp.py:2801 http://127.0.0.1:39535/a%40b/?token=3d1cc38a69c21a826b7a93c4b318f7e680325467cad3fd5d INFO ServerApp:serverapp.py:2801 Kernels will be managed by the Gateway server running at: INFO ServerApp:serverapp.py:2801 http://mock-gateway-server:8889 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_websocket_connection_clos0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:39535/a%40b/?token=3d1cc38a69c21a826b7a93c4b318f7e680325467cad3fd5d http://127.0.0.1:39535/a%40b/?token=3d1cc38a69c21a826b7a93c4b318f7e680325467cad3fd5d ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6f90846d2727481cb34bbf2e2ac00178 INFO ServerApp:managers.py:76 Request start kernel: kernel_id=None, path='None' DEBUG ServerApp:managers.py:480 Request new kernel at: http://mock-gateway-server:8889/api/kernels INFO ServerApp:managers.py:511 GatewayKernelManager started kernel: b2e25d26-b71f-4a87-90c2-761cb694b081, args: {'kernel_id': None, 'kernel_name': 'kspec_foo'} DEBUG ServerApp:log.py:98 201 POST /a%40b/api/kernels (6f90846d2727481cb34bbf2e2ac00178@127.0.0.1) 3.95ms INFO ServerApp:connections.py:43 Connecting to ws://mock-gateway-server:8889/api/kernels/b2e25d26-b71f-4a87-90c2-761cb694b081/channels INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:connections.py:61 Connection is ready: ws: DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped DEBUG ServerApp:connections.py:133 Notebook client closed websocket connection - message dropped: None INFO ServerApp:serverapp.py:2570 Shutting down 1 kernel DEBUG ServerApp:managers.py:525 Request shutdown kernel at: http://mock-gateway-server:8889/api/kernels/b2e25d26-b71f-4a87-90c2-761cb694b081 ERROR concurrent.futures:_base.py:330 exception calling callback for Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib64/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/_base.py", line 328, in _invoke_callbacks callback(self) File "/usr/lib64/python3.8/asyncio/futures.py", line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File "/usr/lib64/python3.8/asyncio/base_events.py", line 764, in call_soon_threadsafe self._check_closed() File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed ERROR concurrent.futures:_base.py:330 exception calling callback for Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib64/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/_base.py", line 328, in _invoke_callbacks callback(self) File "/usr/lib64/python3.8/asyncio/futures.py", line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File "/usr/lib64/python3.8/asyncio/base_events.py", line 764, in call_soon_threadsafe self._check_closed() File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed DEBUG ServerApp:managers.py:531 Shutdown kernel response: kernel not found (ignored) ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________________________ test_from_file ________________________________ jp_fetch = .client_fetch at 0x7eff02c22af0> notebook = None async def test_from_file(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "html", "foo", "testnb.ipynb", method="GET", params={"download": False}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:49: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:40.448 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_from_file0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_file0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_file0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:43955/a%40b/?token=8131ce7eb8720b0c484169653c1cb5ddd5fe35ba95f1d1b2 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:43955/a%40b/?token=8131ce7eb8720b0c484169653c1cb5ddd5fe35ba95f1d1b2 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_from_file0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:43955/a%40b/?token=8131ce7eb8720b0c484169653c1cb5ddd5fe35ba95f1d1b2 http://127.0.0.1:43955/a%40b/?token=8131ce7eb8720b0c484169653c1cb5ddd5fe35ba95f1d1b2 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 54848623582940ff8d4919aae88553b4 ERROR ServerApp:web.py:1798 Uncaught exception GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:43955', method='GET', uri='/a%40b/nbconvert/html/foo/testnb.ipynb?download=False', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 99, in get exporter = get_exporter(format, config=self.config, log=self.log) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 110, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 352, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 536, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 554, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 565, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 652, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'lab' found in the following paths: /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_file0/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:43955", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (54848623582940ff8d4919aae88553b4@127.0.0.1) 37.78ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_file_404 ______________________________ jp_fetch = .client_fetch at 0x7eff031bbc10> notebook = None async def test_from_file_404(jp_fetch, notebook): with pytest.raises(HTTPClientError) as e: await jp_fetch( "nbconvert", "html", "foo", "thisdoesntexist.ipynb", method="GET", params={"download": False}, ) > assert expected_http_error(e, 404) E assert False E + where False = expected_http_error(, 404) tests/nbconvert/test_handlers.py:87: AssertionError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:40.544 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:46249/a%40b/?token=acd1df5f5bcc00150f07442fd6df00e87ccbb8ce5da57ada INFO ServerApp:serverapp.py:2801 http://127.0.0.1:46249/a%40b/?token=acd1df5f5bcc00150f07442fd6df00e87ccbb8ce5da57ada INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:46249/a%40b/?token=acd1df5f5bcc00150f07442fd6df00e87ccbb8ce5da57ada http://127.0.0.1:46249/a%40b/?token=acd1df5f5bcc00150f07442fd6df00e87ccbb8ce5da57ada ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 09fa1b86fbd44195a5f5176677e9c54d ERROR ServerApp:web.py:1798 Uncaught exception GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:46249', method='GET', uri='/a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 99, in get exporter = get_exporter(format, config=self.config, log=self.log) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 110, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 352, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 536, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 554, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 565, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 652, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'lab' found in the following paths: /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_file_4040/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:46249", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (09fa1b86fbd44195a5f5176677e9c54d@127.0.0.1) 33.99ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ___________________________ test_from_file_download ____________________________ jp_fetch = .client_fetch at 0x7eff026358b0> notebook = None async def test_from_file_download(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "python", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:91: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:40.631 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:39883/a%40b/?token=7cf5479d18c1352c0f1a004f7ac266ef1e0e86a2fdc02e96 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:39883/a%40b/?token=7cf5479d18c1352c0f1a004f7ac266ef1e0e86a2fdc02e96 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:39883/a%40b/?token=7cf5479d18c1352c0f1a004f7ac266ef1e0e86a2fdc02e96 http://127.0.0.1:39883/a%40b/?token=7cf5479d18c1352c0f1a004f7ac266ef1e0e86a2fdc02e96 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 49e0b6b1c75b466c9f9ecb1816b75845 ERROR ServerApp:web.py:1798 Uncaught exception GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:39883', method='GET', uri='/a%40b/nbconvert/python/foo/testnb.ipynb?download=True', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 99, in get exporter = get_exporter(format, config=self.config, log=self.log) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 110, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 352, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 536, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 554, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 565, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 652, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'python' found in the following paths: /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_file_download0/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:39883", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (49e0b6b1c75b466c9f9ecb1816b75845@127.0.0.1) 33.43ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_file_zip ______________________________ jp_fetch = .client_fetch at 0x7eff02b9fc10> notebook = None async def test_from_file_zip(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "latex", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:105: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:40.719 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:40005/a%40b/?token=fe9d7a8ab52d86e27c59c47c1aa8443de672d510045464c0 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:40005/a%40b/?token=fe9d7a8ab52d86e27c59c47c1aa8443de672d510045464c0 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:40005/a%40b/?token=fe9d7a8ab52d86e27c59c47c1aa8443de672d510045464c0 http://127.0.0.1:40005/a%40b/?token=fe9d7a8ab52d86e27c59c47c1aa8443de672d510045464c0 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 407b531a9f0245478cdc911c3b9a07af INFO ServerApp:sign.py:427 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/data/notebook_secret WARNING ServerApp:manager.py:731 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:templateexporter.py:508 Template paths: /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/data/nbconvert/templates/latex /home/tkloczko/.local/share/jupyter/nbconvert/templates/latex /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/data /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/data/nbconvert/templates /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/data/nbconvert/templates/compatibility /home/tkloczko/.local/share/jupyter /home/tkloczko/.local/share/jupyter/nbconvert/templates /home/tkloczko/.local/share/jupyter/nbconvert/templates/compatibility /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/env/share/jupyter/nbconvert/templates /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/env/share/jupyter/nbconvert/templates/compatibility /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/share/jupyter/nbconvert/templates /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/share/jupyter/nbconvert/templates/compatibility /tmp/pytest-of-tkloczko/pytest-42/test_authorized_requests_True_15/data/nbconvert/templates /home/tkloczko/.local/share/jupyter/nbconvert/templates DEBUG ServerApp:base.py:47 Applying preprocessor: TagRemovePreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: RegexRemovePreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: SVG2PDFPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: LatexPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: HighlightMagicsPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: ExtractOutputPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: ExtractAttachmentsPreprocessor DEBUG ServerApp:templateexporter.py:380 Attempting to load template index.tex.j2 DEBUG ServerApp:templateexporter.py:381 template_paths: /tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/data/nbconvert/templates/latex:/home/tkloczko/.local/share/jupyter/nbconvert/templates/latex:/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/data:/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/data/nbconvert/templates:/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/data/nbconvert/templates/compatibility:/home/tkloczko/.local/share/jupyter:/home/tkloczko/.local/share/jupyter/nbconvert/templates:/home/tkloczko/.local/share/jupyter/nbconvert/templates/compatibility:/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/env/share/jupyter:/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/env/share/jupyter/nbconvert/templates:/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/env/share/jupyter/nbconvert/templates/compatibility:/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/share/jupyter:/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/share/jupyter/nbconvert/templates:/tmp/pytest-of-tkloczko/pytest-42/test_from_file_zip0/share/jupyter/nbconvert/templates/compatibility:/tmp/pytest-of-tkloczko/pytest-42/test_authorized_requests_True_15/data/nbconvert/templates:/home/tkloczko/.local/share/jupyter/nbconvert/templates ERROR ServerApp:handlers.py:138 nbconvert failed: TemplateNotFound('index.tex.j2') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 134, in get output, resources = await run_sync( File "/usr/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 135, in lambda: exporter.from_notebook_node(nb, resources=resource_dict) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/latex.py", line 80, in from_notebook_node return super().from_notebook_node(nb, resources, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 426, in from_notebook_node output = self.template.render(nb=nb_copy, resources=resources) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 163, in template self._template_cached = self._load_template() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 382, in _load_template return self.environment.get_template(template_file) File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 1010, in get_template return self._load_template(name, globals) File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 969, in _load_template template = self.loader.load(self, name, self.make_globals(globals)) File "/usr/lib/python3.8/site-packages/jinja2/loaders.py", line 575, in load raise TemplateNotFound(name) jinja2.exceptions.TemplateNotFound: index.tex.j2 WARNING ServerApp:web.py:1796 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (127.0.0.1): nbconvert failed: index.tex.j2 DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:40005", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (407b531a9f0245478cdc911c3b9a07af@127.0.0.1) 416.22ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________________________ test_from_post ________________________________ jp_fetch = .client_fetch at 0x7eff00b895e0> notebook = None async def test_from_post(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "html", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:124: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:41.189 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_from_post0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_post0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_post0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:43181/a%40b/?token=26a9befe74164b3668e535b8ef9568021ab2e82194764197 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:43181/a%40b/?token=26a9befe74164b3668e535b8ef9568021ab2e82194764197 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_from_post0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:43181/a%40b/?token=26a9befe74164b3668e535b8ef9568021ab2e82194764197 http://127.0.0.1:43181/a%40b/?token=26a9befe74164b3668e535b8ef9568021ab2e82194764197 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 1f13da6fbdd64e618f8dec405904cdf0 INFO ServerApp:sign.py:427 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/data/notebook_secret WARNING ServerApp:manager.py:731 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/testnb.ipynb (1f13da6fbdd64e618f8dec405904cdf0@127.0.0.1) 5.01ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 759d849a80f2455db060c9e99ae84fa6 ERROR ServerApp:web.py:1798 Uncaught exception POST /a%40b/nbconvert/html (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:43181', method='POST', uri='/a%40b/nbconvert/html', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 167, in post exporter = get_exporter(format, config=self.config) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 110, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 352, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 536, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 554, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 565, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 652, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'lab' found in the following paths: /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-42/test_from_post0/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:43181", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 POST /a%40b/nbconvert/html (759d849a80f2455db060c9e99ae84fa6@127.0.0.1) 33.33ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_post_zip ______________________________ jp_fetch = .client_fetch at 0x7eff0254aaf0> notebook = None async def test_from_post_zip(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "latex", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:143: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:41.283 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:38757/a%40b/?token=9e2d12e7909ce9232b499da464c537a0b24082c329bc0407 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:38757/a%40b/?token=9e2d12e7909ce9232b499da464c537a0b24082c329bc0407 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:38757/a%40b/?token=9e2d12e7909ce9232b499da464c537a0b24082c329bc0407 http://127.0.0.1:38757/a%40b/?token=9e2d12e7909ce9232b499da464c537a0b24082c329bc0407 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 920574d31a4b4b25826599d1be39d1bf INFO ServerApp:sign.py:427 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-42/test_from_post_zip0/data/notebook_secret WARNING ServerApp:manager.py:731 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/testnb.ipynb (920574d31a4b4b25826599d1be39d1bf@127.0.0.1) 3.58ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 5a36df78886943c79321e1e746afee30 WARNING ServerApp:web.py:1796 500 POST /a%40b/nbconvert/latex (127.0.0.1): nbconvert failed: index.tex.j2 DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:38757", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 POST /a%40b/nbconvert/latex (5a36df78886943c79321e1e746afee30@127.0.0.1) 347.80ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ____________________ test_delete_dirs[FileContentsManager] _____________________ jp_fetch = .client_fetch at 0x7eff022165e0> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'ordering', 'å b', 'foo/bar', 'foo', 'unicodé', ...] async def test_delete_dirs(jp_fetch, contents, folders): # Iterate over folders for name in sorted([*folders, "/"], key=len, reverse=True): r = await jp_fetch("api", "contents", name, method="GET") # Get JSON blobs for each content. listing = json.loads(r.body.decode())["content"] # Delete all content for model in listing: > await jp_fetch("api", "contents", model["path"], method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:679: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:51.756 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:35527/a%40b/?token=dd72b60ce2015f652b4f3a280154fcac6c7068d2bdc2cecf INFO ServerApp:serverapp.py:2801 http://127.0.0.1:35527/a%40b/?token=dd72b60ce2015f652b4f3a280154fcac6c7068d2bdc2cecf INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:35527/a%40b/?token=dd72b60ce2015f652b4f3a280154fcac6c7068d2bdc2cecf http://127.0.0.1:35527/a%40b/?token=dd72b60ce2015f652b4f3a280154fcac6c7068d2bdc2cecf ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 52b982dda80b42c6b92cecf5e566d422 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (52b982dda80b42c6b92cecf5e566d422@127.0.0.1) 1.92ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 97c29849f6d34c3884cf526c3efb3bf8 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (97c29849f6d34c3884cf526c3efb3bf8@127.0.0.1) 2.24ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 886cd27b51424de390661d1defce14d2 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.txt (886cd27b51424de390661d1defce14d2@127.0.0.1) 1.95ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 787526c52604424eacbf865018fb64ff WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.ipynb (787526c52604424eacbf865018fb64ff@127.0.0.1) 2.09ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 66fa4321dc2946809c3c39c09fc9de38 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/ordering (66fa4321dc2946809c3c39c09fc9de38@127.0.0.1) 2.75ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b4f1933dd13343068f7a603805ce24a6 WARNING ServerApp:handlers.py:281 delete /ordering/C.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/ordering/C.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.blob (b4f1933dd13343068f7a603805ce24a6@127.0.0.1) 1.82ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: d3c1600eda24413889b0792573bdf829 WARNING ServerApp:handlers.py:281 delete /ordering/C.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/ordering/C.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.txt (d3c1600eda24413889b0792573bdf829@127.0.0.1) 1.94ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: e968897dcd1f4ef696f6b96434ef76bf WARNING ServerApp:handlers.py:281 delete /ordering/C.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/ordering/C.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.ipynb (e968897dcd1f4ef696f6b96434ef76bf@127.0.0.1) 2.11ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: a3b9e36cb1ac4a5b82708b7c56747601 WARNING ServerApp:handlers.py:281 delete /ordering/b.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/ordering/b.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.blob (a3b9e36cb1ac4a5b82708b7c56747601@127.0.0.1) 1.91ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6c2c859780d84e8082033601dfaca45c WARNING ServerApp:handlers.py:281 delete /ordering/b.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/ordering/b.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.txt (6c2c859780d84e8082033601dfaca45c@127.0.0.1) 1.96ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: adb60d78e2204493ab223a386c3940eb WARNING ServerApp:handlers.py:281 delete /ordering/b.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/ordering/b.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.ipynb (adb60d78e2204493ab223a386c3940eb@127.0.0.1) 2.36ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 72f40ab485204b9c919685000da714ba WARNING ServerApp:handlers.py:281 delete /ordering/A.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/ordering/A.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.blob (72f40ab485204b9c919685000da714ba@127.0.0.1) 1.94ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: d5591059581f42058ec32405c16428b9 WARNING ServerApp:handlers.py:281 delete /ordering/A.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/ordering/A.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.txt (d5591059581f42058ec32405c16428b9@127.0.0.1) 1.84ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 667fe029aaa54a819bcc1c1b9dcd53a5 WARNING ServerApp:handlers.py:281 delete /ordering/A.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/ordering/A.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.ipynb (667fe029aaa54a819bcc1c1b9dcd53a5@127.0.0.1) 1.99ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 66f4a99c5e5c41e18d55b311716df711 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/bar (66f4a99c5e5c41e18d55b311716df711@127.0.0.1) 1.74ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: d7170233e515437f9756bfb35afde21d WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.blob (d7170233e515437f9756bfb35afde21d@127.0.0.1) 1.84ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f3d8384089104757aa5e712434a22dad WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.txt (f3d8384089104757aa5e712434a22dad@127.0.0.1) 1.85ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: ead749a0b1f149c484f8529d6f439b47 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.ipynb (ead749a0b1f149c484f8529d6f439b47@127.0.0.1) 2.06ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 19eb751f319d4fc2bbda136b80a4460f DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/unicod%C3%A9 (19eb751f319d4fc2bbda136b80a4460f@127.0.0.1) 1.64ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f0a99bd29932421e81d2daedd1d14f82 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.blob (f0a99bd29932421e81d2daedd1d14f82@127.0.0.1) 1.86ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 8946b525d58c4becaa571e9b7702f52e WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.txt (8946b525d58c4becaa571e9b7702f52e@127.0.0.1) 1.96ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: d5b0897d5d2c4ebb83832b323c9d9e1e WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.ipynb (d5b0897d5d2c4ebb83832b323c9d9e1e@127.0.0.1) 2.07ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 519c9c46193f4b93b44f4daa23b932a2 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/%C3%A5%20b (519c9c46193f4b93b44f4daa23b932a2@127.0.0.1) 1.64ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: ec1ae417e4ce4cccae2b94ae4ba02d62 WARNING ServerApp:handlers.py:281 delete /å b/ç d.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/å b/ç d.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.blob (ec1ae417e4ce4cccae2b94ae4ba02d62@127.0.0.1) 1.85ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: cb7cced95d73481eb6393095a5eaba88 WARNING ServerApp:handlers.py:281 delete /å b/ç d.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/å b/ç d.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.txt (cb7cced95d73481eb6393095a5eaba88@127.0.0.1) 1.86ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: c4b6390ba49a48c2ac689f2e1c730306 WARNING ServerApp:handlers.py:281 delete /å b/ç d.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/å b/ç d.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.ipynb (c4b6390ba49a48c2ac689f2e1c730306@127.0.0.1) 2.09ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f3bec2fe9f844b859957c576cd38ee10 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo (f3bec2fe9f844b859957c576cd38ee10@127.0.0.1) 3.52ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 7245ac5bcbf84801b9b060d75d4b6ca6 WARNING ServerApp:handlers.py:281 delete /foo/bar DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/foo/bar to trash ERROR ServerApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/foo/bar (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:35527', method='DELETE', uri='/a%40b/api/contents/foo/bar', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 8' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 9' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/filemanager.py", line 549, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 8' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 9' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/filemanager.py", line 549, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:35527", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/foo/bar (7245ac5bcbf84801b9b060d75d4b6ca6@127.0.0.1) 3.84ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped __________________ test_delete_dirs[AsyncFileContentsManager] __________________ jp_fetch = .client_fetch at 0x7eff00c16550> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'ordering', 'å b', 'foo/bar', 'foo', 'unicodé', ...] async def test_delete_dirs(jp_fetch, contents, folders): # Iterate over folders for name in sorted([*folders, "/"], key=len, reverse=True): r = await jp_fetch("api", "contents", name, method="GET") # Get JSON blobs for each content. listing = json.loads(r.body.decode())["content"] # Delete all content for model in listing: > await jp_fetch("api", "contents", model["path"], method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:679: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:51.921 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:34743/a%40b/?token=7183a982a49c1a2595f005f1cb8df331130c6f28dea5f3b1 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:34743/a%40b/?token=7183a982a49c1a2595f005f1cb8df331130c6f28dea5f3b1 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:34743/a%40b/?token=7183a982a49c1a2595f005f1cb8df331130c6f28dea5f3b1 http://127.0.0.1:34743/a%40b/?token=7183a982a49c1a2595f005f1cb8df331130c6f28dea5f3b1 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 2fa4b48b06994ad98e60100ad8ba2a72 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (2fa4b48b06994ad98e60100ad8ba2a72@127.0.0.1) 3.44ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6a97bff4007a47dbbbac8eaadcdaabb6 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (6a97bff4007a47dbbbac8eaadcdaabb6@127.0.0.1) 3.35ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 7f80f026b76448c3b229ee251553b4d6 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.txt (7f80f026b76448c3b229ee251553b4d6@127.0.0.1) 2.78ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 9018b8bdd55b49608bea84005081f8c5 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.ipynb (9018b8bdd55b49608bea84005081f8c5@127.0.0.1) 3.18ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: cf10e38e0c3547ef9b9f049246f4237a DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/ordering (cf10e38e0c3547ef9b9f049246f4237a@127.0.0.1) 5.48ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: e43ea8365d20453bb8676953e6cda657 WARNING ServerApp:handlers.py:281 delete /ordering/C.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.blob (e43ea8365d20453bb8676953e6cda657@127.0.0.1) 2.70ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 0496800fc55a41cbb297f1feb96f59ba WARNING ServerApp:handlers.py:281 delete /ordering/C.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.txt (0496800fc55a41cbb297f1feb96f59ba@127.0.0.1) 2.80ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 0e61619c5c204fb4b8571c62822704ef WARNING ServerApp:handlers.py:281 delete /ordering/C.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.ipynb (0e61619c5c204fb4b8571c62822704ef@127.0.0.1) 2.84ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 3e5b5852e7614a3d98082e2b4666d8d3 WARNING ServerApp:handlers.py:281 delete /ordering/b.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.blob (3e5b5852e7614a3d98082e2b4666d8d3@127.0.0.1) 2.80ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 1af8b8de4afd45b1ab5b6639b673f7c3 WARNING ServerApp:handlers.py:281 delete /ordering/b.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.txt (1af8b8de4afd45b1ab5b6639b673f7c3@127.0.0.1) 2.92ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 7dfec235ffb048f79e10e374b60346f3 WARNING ServerApp:handlers.py:281 delete /ordering/b.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.ipynb (7dfec235ffb048f79e10e374b60346f3@127.0.0.1) 3.15ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b298ed1c7c2f4288a8ca80b9e71ef77e WARNING ServerApp:handlers.py:281 delete /ordering/A.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.blob (b298ed1c7c2f4288a8ca80b9e71ef77e@127.0.0.1) 2.71ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: fe478af8c2e840eb9f7dff5bfa3a00be WARNING ServerApp:handlers.py:281 delete /ordering/A.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.txt (fe478af8c2e840eb9f7dff5bfa3a00be@127.0.0.1) 2.99ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: bec4cd4715a14f4b86592c89a927f037 WARNING ServerApp:handlers.py:281 delete /ordering/A.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.ipynb (bec4cd4715a14f4b86592c89a927f037@127.0.0.1) 3.10ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 68ff95e417ed470dab4aa67aebcf0e2d DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/bar (68ff95e417ed470dab4aa67aebcf0e2d@127.0.0.1) 3.20ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: affd9f6a9e594b848ad33a4185759736 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.blob (affd9f6a9e594b848ad33a4185759736@127.0.0.1) 2.67ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: fdbe78a08a5e4a378c7c23cc6495b724 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.txt (fdbe78a08a5e4a378c7c23cc6495b724@127.0.0.1) 2.84ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b631f00dde8f424998fbdd5e43d2a469 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.ipynb (b631f00dde8f424998fbdd5e43d2a469@127.0.0.1) 2.92ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 5860c93615d84b56bc597a02a8cf87e0 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/unicod%C3%A9 (5860c93615d84b56bc597a02a8cf87e0@127.0.0.1) 2.97ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: ca17dc18abaa4bd4b30f1d3bf3dac752 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.blob (ca17dc18abaa4bd4b30f1d3bf3dac752@127.0.0.1) 2.94ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 0158c49f09234934a7f5b2d4ce9e1879 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.txt (0158c49f09234934a7f5b2d4ce9e1879@127.0.0.1) 2.76ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 5376e12c9df0425eb5fafc193bd0fe75 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.ipynb (5376e12c9df0425eb5fafc193bd0fe75@127.0.0.1) 2.93ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: e905d1e29fff4d79b957e6b7cd7be466 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/%C3%A5%20b (e905d1e29fff4d79b957e6b7cd7be466@127.0.0.1) 3.27ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 371f1ec0893b4aa9ac4326c0024511d8 WARNING ServerApp:handlers.py:281 delete /å b/ç d.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/å b/ç d.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.blob (371f1ec0893b4aa9ac4326c0024511d8@127.0.0.1) 2.83ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 2d1aafb2a3784fa9ab5853be10806d4c WARNING ServerApp:handlers.py:281 delete /å b/ç d.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/å b/ç d.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.txt (2d1aafb2a3784fa9ab5853be10806d4c@127.0.0.1) 3.08ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 1b7631ecef9e4a89b082f773101d493e WARNING ServerApp:handlers.py:281 delete /å b/ç d.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/å b/ç d.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.ipynb (1b7631ecef9e4a89b082f773101d493e@127.0.0.1) 3.19ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6e1323049659496ebd73eeee9f8119e0 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo (6e1323049659496ebd73eeee9f8119e0@127.0.0.1) 7.39ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: fe56da3addb54a5fa24946d380bfcfc3 WARNING ServerApp:handlers.py:281 delete /foo/bar DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar to trash ERROR ServerApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/foo/bar (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:34743', method='DELETE', uri='/a%40b/api/contents/foo/bar', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 10' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 11' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/filemanager.py", line 1008, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 10' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 11' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/filemanager.py", line 1008, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:34743", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/foo/bar (fe56da3addb54a5fa24946d380bfcfc3@127.0.0.1) 3.86ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________ test_delete_non_empty_dir[FileContentsManager] ________________ jp_fetch = .client_fetch at 0x7eff02216940> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} @pytest.mark.xfail(sys.platform == "win32", reason="Deleting non-empty dirs on Windows") async def test_delete_non_empty_dir(jp_fetch, contents): # Delete a folder > await jp_fetch("api", "contents", "å b", method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:689: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:52.122 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:33019/a%40b/?token=2f6d201e7bf5e21068af56d179250da8a621ff87189621fc INFO ServerApp:serverapp.py:2801 http://127.0.0.1:33019/a%40b/?token=2f6d201e7bf5e21068af56d179250da8a621ff87189621fc INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:33019/a%40b/?token=2f6d201e7bf5e21068af56d179250da8a621ff87189621fc http://127.0.0.1:33019/a%40b/?token=2f6d201e7bf5e21068af56d179250da8a621ff87189621fc ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 9b169b6d31924f3eadf579a5786537a6 WARNING ServerApp:handlers.py:281 delete /å b DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/root_dir/å b to trash ERROR ServerApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:33019', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 8' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 9' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/filemanager.py", line 549, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 8' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 9' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/filemanager.py", line 549, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:33019", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/%C3%A5%20b (9b169b6d31924f3eadf579a5786537a6@127.0.0.1) 2.87ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped _____________ test_delete_non_empty_dir[AsyncFileContentsManager] ______________ jp_fetch = .client_fetch at 0x7eff02216430> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} @pytest.mark.xfail(sys.platform == "win32", reason="Deleting non-empty dirs on Windows") async def test_delete_non_empty_dir(jp_fetch, contents): # Delete a folder > await jp_fetch("api", "contents", "å b", method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:689: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-06-09 11:01:52.184 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.6.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:36329/a%40b/?token=9a75a51b62025bb010e22e3106b5b1b0247b2efb888e3310 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:36329/a%40b/?token=9a75a51b62025bb010e22e3106b5b1b0247b2efb888e3310 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/runtime/jpserver-1274733-open.html Or copy and paste one of these URLs: http://localhost:36329/a%40b/?token=9a75a51b62025bb010e22e3106b5b1b0247b2efb888e3310 http://127.0.0.1:36329/a%40b/?token=9a75a51b62025bb010e22e3106b5b1b0247b2efb888e3310 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 12d95862912a49e5bd125dab25fab01d WARNING ServerApp:handlers.py:281 delete /å b DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/root_dir/å b to trash ERROR ServerApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:36329', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 10' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 11' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/filemanager.py", line 1008, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 10' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-42/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 11' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/contents/filemanager.py", line 1008, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:36329", "User-Agent": "Tornado/6.2" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/%C3%A5%20b (12d95862912a49e5bd125dab25fab01d@127.0.0.1) 3.77ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped =============================== warnings summary =============================== jupyter_server/base/handlers.py:22 /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/base/handlers.py:22: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import is_hidden tests/extension/test_app.py: 10 warnings /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/serverapp.py:2379: ResourceWarning: unclosed self._find_http_port() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/kernels/test_api.py::test_connection[jp_server_config2] /usr/lib64/python3.8/site-packages/yaml/constructor.py:49: ResourceWarning: unclosed node = self.get_single_node() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/kernelspecs/test_api.py::test_list_kernelspecs_bad /usr/lib64/python3.8/weakref.py:151: ResourceWarning: unclosed o = self.data[key]() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/kernelspecs/test_api.py::test_list_kernelspecs_bad /usr/lib64/python3.8/site-packages/yaml/constructor.py:49: ResourceWarning: unclosed node = self.get_single_node() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/sessions/test_api.py::test_restart_kernel[jp_server_config2] /usr/lib/python3.8/site-packages/traitlets/traitlets.py:1777: ResourceWarning: unclosed for meta_name, meta_eval in metadata.items(): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/sessions/test_api.py::test_restart_kernel[jp_server_config2] /usr/lib/python3.8/site-packages/traitlets/traitlets.py:1777: ResourceWarning: unclosed for meta_name, meta_eval in metadata.items(): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/sessions/test_api.py::test_restart_kernel[jp_server_config2] /usr/lib/python3.8/site-packages/traitlets/traitlets.py:1777: ResourceWarning: unclosed for meta_name, meta_eval in metadata.items(): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/jinja2/nodes.py:138: ResourceWarning: unclosed for name, arg in zip(self.fields, fields): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/jinja2/nodes.py:138: ResourceWarning: unclosed for name, arg in zip(self.fields, fields): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/jinja2/nodes.py:138: ResourceWarning: unclosed for name, arg in zip(self.fields, fields): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ============================= slowest 10 durations ============================= 12.14s call tests/test_terminal.py::test_culling 7.37s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config1] 7.34s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config0] 5.08s call tests/test_terminal.py::test_terminal_create_with_cwd 3.11s call tests/services/sessions/test_manager.py::test_pending_kernel 1.53s call tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/kernels-None] 1.26s call tests/auth/test_authorizer.py::test_authorized_requests[False-POST-/api/kernels/{kernel_id}/interrupt-None] 1.23s teardown tests/services/kernels/test_connection.py::test_websocket_connection 1.23s call tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/kernels/{kernel_id}-None] 1.21s call tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/kernels/{kernel_id}/interrupt-None] =========================== short test summary info ============================ SKIPPED [1] tests/test_terminal.py:160: Not yet working SKIPPED [1] tests/test_terminal.py:197: Not yet working SKIPPED [7] tests/conftest.py:37: Skipping this test because it's marked 'integration_test'. Run integration tests using the `--integration_tests` flag. FAILED tests/test_gateway.py::test_websocket_connection_closed - Failed: Logs contain an error: exception calling callback for wait_for=()]> cb=[IOLoop.add_future..() at /usr/lib64/python3.8/site-packages/tornado/ioloop.py:687]> Task was destroyed but it is pending! task: wait_for=.finish() at /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.6.0/jupyter_server/services/kernels/connection/channels.py:186, <1 more>, ()]> cb=[_HandlerDelegate.execute..() at /usr/lib64/python3.8/site-packages/tornado/web.py:2361]> ```
kloczek commented 1 year ago

Just FTR 2.7.0 pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.7.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.7.0-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0 configfile: pyproject.toml testpaths: tests/ plugins: console-scripts-1.4.1, timeout-2.1.0, anyio-3.6.2, flaky-3.7.0 timeout: 100.0s timeout method: thread timeout func_only: False collected 912 items tests/test_config_manager.py . [ 0%] tests/test_files.py .................... [ 2%] tests/test_gateway.py .........................F [ 5%] tests/test_paths.py ...... [ 5%] tests/test_serialize.py .. [ 6%] tests/test_serverapp.py ................................................ [ 11%] ..................... [ 13%] tests/test_terminal.py ....ss..... [ 14%] tests/test_traittypes.py ........... [ 16%] tests/test_utils.py ............... [ 17%] tests/test_version.py ........ [ 18%] tests/test_view.py .... [ 18%] tests/auth/test_authorizer.py .......................................... [ 23%] .................... [ 25%] tests/auth/test_identity.py .................... [ 27%] tests/auth/test_legacy_login.py .................. [ 29%] tests/auth/test_login.py .............. [ 31%] tests/auth/test_security.py .... [ 31%] tests/auth/test_utils.py ............ [ 33%] tests/base/test_call_context.py .... [ 33%] tests/base/test_handlers.py ........ [ 34%] tests/base/test_websocket.py .... [ 34%] tests/extension/test_app.py ................ [ 36%] tests/extension/test_config.py . [ 36%] tests/extension/test_entrypoint.py . [ 36%] tests/extension/test_handler.py ..... [ 37%] tests/extension/test_launch.py ... [ 37%] tests/extension/test_manager.py ............... [ 39%] tests/extension/test_serverextension.py ....... [ 40%] tests/extension/test_utils.py ... [ 40%] tests/nbconvert/test_handlers.py FFFFFF [ 41%] tests/services/api/test_api.py .............. [ 42%] tests/services/config/test_api.py ... [ 43%] tests/services/contents/test_api.py .................................... [ 47%] ........................................................................ [ 54%] ........................................................................ [ 62%] ............................FFFF...................... [ 68%] tests/services/contents/test_checkpoints.py ............ [ 70%] tests/services/contents/test_config.py ..... [ 70%] tests/services/contents/test_fileio.py ...... [ 71%] tests/services/contents/test_largefilemanager.py .............. [ 72%] tests/services/contents/test_manager.py ................................ [ 76%] ........................................................................ [ 84%] .. [ 84%] tests/services/events/test_api.py ......... [ 85%] tests/services/events/test_extension.py . [ 85%] tests/services/kernels/test_api.py ..................... [ 87%] tests/services/kernels/test_config.py ... [ 88%] tests/services/kernels/test_connection.py . [ 88%] tests/services/kernels/test_cull.py ... [ 88%] tests/services/kernels/test_events.py ............ [ 89%] tests/services/kernelspecs/test_api.py ...... [ 90%] tests/services/nbconvert/test_api.py . [ 90%] tests/services/sessions/test_api.py .................................... [ 94%] ........................ [ 97%] tests/services/sessions/test_manager.py ................ [ 99%] tests/unix_sockets/test_api.py .. [ 99%] tests/unix_sockets/test_serverapp_integration.py sssssss [100%] =================================== FAILURES =================================== _______________________ test_websocket_connection_closed _______________________ init_gateway = None jp_serverapp = jp_fetch = .client_fetch at 0x7fa486e534c0> caplog = <_pytest.logging.LogCaptureFixture object at 0x7fa486cbcd60> @patch("tornado.websocket.websocket_connect", mock_websocket_connect()) async def test_websocket_connection_closed(init_gateway, jp_serverapp, jp_fetch, caplog): # Create the kernel and get the kernel manager... kernel_id = await create_kernel(jp_fetch, "kspec_foo") km: GatewayKernelManager = jp_serverapp.kernel_manager.get_kernel(kernel_id) # Create the KernelWebsocketHandler... request = HTTPServerRequest("foo", "GET") request.connection = MagicMock() handler = KernelWebsocketHandler(jp_serverapp.web_app, request) # Force the websocket handler to raise a closed error if we try to write a message # to the client. handler.ws_connection = MagicMock() handler.ws_connection.is_closing = lambda: True # Create the GatewayWebSocketConnection and attach it to the handler... conn = GatewayWebSocketConnection(parent=km, websocket_handler=handler) handler.connection = conn await conn.connect() # Processing websocket messages happens in separate coroutines and any # errors in that process will show up in logs, but not bubble up to the # caller. # # To check for these, we wait for the server to stop and then check the # logs for errors. await jp_serverapp._cleanup() for _, level, message in caplog.record_tuples: if level >= logging.ERROR: > pytest.fail(f"Logs contain an error: {message}") E Failed: Logs contain an error: exception calling callback for tests/test_gateway.py:719: Failed ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:16:00.884 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:41939/a%40b/?token=ca559c673573ad26dba1b37d6c6a42b707f5af428356a51d INFO ServerApp:serverapp.py:2801 http://127.0.0.1:41939/a%40b/?token=ca559c673573ad26dba1b37d6c6a42b707f5af428356a51d INFO ServerApp:serverapp.py:2801 Kernels will be managed by the Gateway server running at: INFO ServerApp:serverapp.py:2801 http://mock-gateway-server:8889 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_websocket_connection_clos0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:41939/a%40b/?token=ca559c673573ad26dba1b37d6c6a42b707f5af428356a51d http://127.0.0.1:41939/a%40b/?token=ca559c673573ad26dba1b37d6c6a42b707f5af428356a51d ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: a2b3907a02ca40f0a65d18135c5acafa INFO ServerApp:managers.py:76 Request start kernel: kernel_id=None, path='None' DEBUG ServerApp:managers.py:480 Request new kernel at: http://mock-gateway-server:8889/api/kernels INFO ServerApp:managers.py:511 GatewayKernelManager started kernel: 9b4c343c-82dd-4611-b3c1-54d0c6a05dad, args: {'kernel_id': None, 'kernel_name': 'kspec_foo'} DEBUG ServerApp:log.py:98 201 POST /a%40b/api/kernels (a2b3907a02ca40f0a65d18135c5acafa@127.0.0.1) 4.96ms INFO ServerApp:connections.py:43 Connecting to ws://mock-gateway-server:8889/api/kernels/9b4c343c-82dd-4611-b3c1-54d0c6a05dad/channels INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:connections.py:61 Connection is ready: ws: DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped DEBUG ServerApp:connections.py:133 Notebook client closed websocket connection - message dropped: None INFO ServerApp:serverapp.py:2570 Shutting down 1 kernel DEBUG ServerApp:managers.py:525 Request shutdown kernel at: http://mock-gateway-server:8889/api/kernels/9b4c343c-82dd-4611-b3c1-54d0c6a05dad ERROR concurrent.futures:_base.py:330 exception calling callback for Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib64/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/_base.py", line 328, in _invoke_callbacks callback(self) File "/usr/lib64/python3.8/asyncio/futures.py", line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File "/usr/lib64/python3.8/asyncio/base_events.py", line 764, in call_soon_threadsafe self._check_closed() File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed ERROR concurrent.futures:_base.py:330 exception calling callback for Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib64/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/_base.py", line 328, in _invoke_callbacks callback(self) File "/usr/lib64/python3.8/asyncio/futures.py", line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File "/usr/lib64/python3.8/asyncio/base_events.py", line 764, in call_soon_threadsafe self._check_closed() File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed DEBUG ServerApp:managers.py:531 Shutdown kernel response: kernel not found (ignored) ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________________________ test_from_file ________________________________ jp_fetch = .client_fetch at 0x7fa4870df940> notebook = None async def test_from_file(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "html", "foo", "testnb.ipynb", method="GET", params={"download": False}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:49: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:15.943 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_from_file0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_file0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_file0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:39125/a%40b/?token=39ba19e0195428b44ee3a1c4f17728cfe4b77cc9b808824f INFO ServerApp:serverapp.py:2801 http://127.0.0.1:39125/a%40b/?token=39ba19e0195428b44ee3a1c4f17728cfe4b77cc9b808824f INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_from_file0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:39125/a%40b/?token=39ba19e0195428b44ee3a1c4f17728cfe4b77cc9b808824f http://127.0.0.1:39125/a%40b/?token=39ba19e0195428b44ee3a1c4f17728cfe4b77cc9b808824f ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 55ba30d57d794cfcbf07e4f8da18c951 ERROR ServerApp:web.py:1871 Uncaught exception GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:39125', method='GET', uri='/a%40b/nbconvert/html/foo/testnb.ipynb?download=False', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 99, in get exporter = get_exporter(format, config=self.config, log=self.log) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 110, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 352, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 536, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 554, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 565, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 652, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'lab' found in the following paths: /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_file0/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:39125", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (55ba30d57d794cfcbf07e4f8da18c951@127.0.0.1) 37.40ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_file_404 ______________________________ jp_fetch = .client_fetch at 0x7fa486ac75e0> notebook = None async def test_from_file_404(jp_fetch, notebook): with pytest.raises(HTTPClientError) as e: await jp_fetch( "nbconvert", "html", "foo", "thisdoesntexist.ipynb", method="GET", params={"download": False}, ) > assert expected_http_error(e, 404) E assert False E + where False = expected_http_error(, 404) tests/nbconvert/test_handlers.py:87: AssertionError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:16.037 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:45861/a%40b/?token=10f81ddcd2532edd405d5650124771aad692ffb626baac0a INFO ServerApp:serverapp.py:2801 http://127.0.0.1:45861/a%40b/?token=10f81ddcd2532edd405d5650124771aad692ffb626baac0a INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:45861/a%40b/?token=10f81ddcd2532edd405d5650124771aad692ffb626baac0a http://127.0.0.1:45861/a%40b/?token=10f81ddcd2532edd405d5650124771aad692ffb626baac0a ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 07c8b8185f314a9ea3215b7950c53670 ERROR ServerApp:web.py:1871 Uncaught exception GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:45861', method='GET', uri='/a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 99, in get exporter = get_exporter(format, config=self.config, log=self.log) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 110, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 352, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 536, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 554, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 565, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 652, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'lab' found in the following paths: /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_file_4040/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:45861", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (07c8b8185f314a9ea3215b7950c53670@127.0.0.1) 33.47ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ___________________________ test_from_file_download ____________________________ jp_fetch = .client_fetch at 0x7fa486a95b80> notebook = None async def test_from_file_download(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "python", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:91: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:16.123 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:38895/a%40b/?token=78dedb943e10f37af7987e2cdd9e09def70c8ba6fef61cff INFO ServerApp:serverapp.py:2801 http://127.0.0.1:38895/a%40b/?token=78dedb943e10f37af7987e2cdd9e09def70c8ba6fef61cff INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:38895/a%40b/?token=78dedb943e10f37af7987e2cdd9e09def70c8ba6fef61cff http://127.0.0.1:38895/a%40b/?token=78dedb943e10f37af7987e2cdd9e09def70c8ba6fef61cff ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f7d1d445dfc5468b987c5d0396d45ec2 ERROR ServerApp:web.py:1871 Uncaught exception GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:38895', method='GET', uri='/a%40b/nbconvert/python/foo/testnb.ipynb?download=True', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 99, in get exporter = get_exporter(format, config=self.config, log=self.log) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 110, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 352, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 536, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 554, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 565, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 652, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'python' found in the following paths: /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_file_download0/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:38895", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (f7d1d445dfc5468b987c5d0396d45ec2@127.0.0.1) 32.97ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_file_zip ______________________________ jp_fetch = .client_fetch at 0x7fa4869d40d0> notebook = None async def test_from_file_zip(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "latex", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:105: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:16.208 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:36819/a%40b/?token=9fc3d6dc3bc36f7c6cdb9ae60468cf95efb2fbc5a0b1c9fa INFO ServerApp:serverapp.py:2801 http://127.0.0.1:36819/a%40b/?token=9fc3d6dc3bc36f7c6cdb9ae60468cf95efb2fbc5a0b1c9fa INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:36819/a%40b/?token=9fc3d6dc3bc36f7c6cdb9ae60468cf95efb2fbc5a0b1c9fa http://127.0.0.1:36819/a%40b/?token=9fc3d6dc3bc36f7c6cdb9ae60468cf95efb2fbc5a0b1c9fa ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 7e9e217c044a4ccc8ddd535192267461 INFO ServerApp:sign.py:427 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/data/notebook_secret WARNING ServerApp:manager.py:731 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:templateexporter.py:508 Template paths: /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/data/nbconvert/templates/latex /home/tkloczko/.local/share/jupyter/nbconvert/templates/latex /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/data /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/data/nbconvert/templates /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/data/nbconvert/templates/compatibility /home/tkloczko/.local/share/jupyter /home/tkloczko/.local/share/jupyter/nbconvert/templates /home/tkloczko/.local/share/jupyter/nbconvert/templates/compatibility /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/env/share/jupyter/nbconvert/templates /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/env/share/jupyter/nbconvert/templates/compatibility /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/share/jupyter/nbconvert/templates /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/share/jupyter/nbconvert/templates/compatibility /tmp/pytest-of-tkloczko/pytest-648/test_authorized_requests_True_15/data/nbconvert/templates /home/tkloczko/.local/share/jupyter/nbconvert/templates DEBUG ServerApp:base.py:47 Applying preprocessor: TagRemovePreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: RegexRemovePreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: SVG2PDFPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: LatexPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: HighlightMagicsPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: ExtractOutputPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: ExtractAttachmentsPreprocessor DEBUG ServerApp:templateexporter.py:380 Attempting to load template index.tex.j2 DEBUG ServerApp:templateexporter.py:381 template_paths: /tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/data/nbconvert/templates/latex:/home/tkloczko/.local/share/jupyter/nbconvert/templates/latex:/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/data:/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/data/nbconvert/templates:/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/data/nbconvert/templates/compatibility:/home/tkloczko/.local/share/jupyter:/home/tkloczko/.local/share/jupyter/nbconvert/templates:/home/tkloczko/.local/share/jupyter/nbconvert/templates/compatibility:/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/env/share/jupyter:/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/env/share/jupyter/nbconvert/templates:/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/env/share/jupyter/nbconvert/templates/compatibility:/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/share/jupyter:/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/share/jupyter/nbconvert/templates:/tmp/pytest-of-tkloczko/pytest-648/test_from_file_zip0/share/jupyter/nbconvert/templates/compatibility:/tmp/pytest-of-tkloczko/pytest-648/test_authorized_requests_True_15/data/nbconvert/templates:/home/tkloczko/.local/share/jupyter/nbconvert/templates ERROR ServerApp:handlers.py:138 nbconvert failed: TemplateNotFound('index.tex.j2') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 134, in get output, resources = await run_sync( File "/usr/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 135, in lambda: exporter.from_notebook_node(nb, resources=resource_dict) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/latex.py", line 92, in from_notebook_node return super().from_notebook_node(nb, resources, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 426, in from_notebook_node output = self.template.render(nb=nb_copy, resources=resources) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 163, in template self._template_cached = self._load_template() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 382, in _load_template return self.environment.get_template(template_file) File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 1010, in get_template return self._load_template(name, globals) File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 969, in _load_template template = self.loader.load(self, name, self.make_globals(globals)) File "/usr/lib/python3.8/site-packages/jinja2/loaders.py", line 575, in load raise TemplateNotFound(name) jinja2.exceptions.TemplateNotFound: index.tex.j2 WARNING ServerApp:web.py:1869 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (127.0.0.1): nbconvert failed: index.tex.j2 DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:36819", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (7e9e217c044a4ccc8ddd535192267461@127.0.0.1) 418.79ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________________________ test_from_post ________________________________ jp_fetch = .client_fetch at 0x7fa485161670> notebook = None async def test_from_post(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "html", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:124: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:16.682 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_from_post0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_post0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_post0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:38655/a%40b/?token=b6fd5e218dd901b00a17c9abc563b14a3deea3ec56c46057 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:38655/a%40b/?token=b6fd5e218dd901b00a17c9abc563b14a3deea3ec56c46057 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_from_post0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:38655/a%40b/?token=b6fd5e218dd901b00a17c9abc563b14a3deea3ec56c46057 http://127.0.0.1:38655/a%40b/?token=b6fd5e218dd901b00a17c9abc563b14a3deea3ec56c46057 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 9a8e2e5c5eaa4019a276149f101819c5 INFO ServerApp:sign.py:427 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/data/notebook_secret WARNING ServerApp:manager.py:731 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/testnb.ipynb (9a8e2e5c5eaa4019a276149f101819c5@127.0.0.1) 3.90ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6de0b45b3d6d45ebb8196128609fa4f5 ERROR ServerApp:web.py:1871 Uncaught exception POST /a%40b/nbconvert/html (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:38655', method='POST', uri='/a%40b/nbconvert/html', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 167, in post exporter = get_exporter(format, config=self.config) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 110, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 352, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 536, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 554, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 565, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 652, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'lab' found in the following paths: /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-648/test_from_post0/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:38655", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 POST /a%40b/nbconvert/html (6de0b45b3d6d45ebb8196128609fa4f5@127.0.0.1) 27.62ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_post_zip ______________________________ jp_fetch = .client_fetch at 0x7fa4851635e0> notebook = None async def test_from_post_zip(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "latex", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:143: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:16.765 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:37995/a%40b/?token=255d419c88eed4fffbf4d6c7cfa37c62f073660d48df2702 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:37995/a%40b/?token=255d419c88eed4fffbf4d6c7cfa37c62f073660d48df2702 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:37995/a%40b/?token=255d419c88eed4fffbf4d6c7cfa37c62f073660d48df2702 http://127.0.0.1:37995/a%40b/?token=255d419c88eed4fffbf4d6c7cfa37c62f073660d48df2702 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 0ed5ddf0a8b34f4094d365ec9d8569e9 INFO ServerApp:sign.py:427 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-648/test_from_post_zip0/data/notebook_secret WARNING ServerApp:manager.py:731 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/testnb.ipynb (0ed5ddf0a8b34f4094d365ec9d8569e9@127.0.0.1) 3.37ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 72d7f0315074484db8c213b60bd06860 WARNING ServerApp:web.py:1869 500 POST /a%40b/nbconvert/latex (127.0.0.1): nbconvert failed: index.tex.j2 DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:37995", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 POST /a%40b/nbconvert/latex (72d7f0315074484db8c213b60bd06860@127.0.0.1) 345.95ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ____________________ test_delete_dirs[FileContentsManager] _____________________ jp_fetch = .client_fetch at 0x7fa4869b9430> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'å b', 'ordering', 'Directory with spaces in', 'foo', 'foo/bar', ...] async def test_delete_dirs(jp_fetch, contents, folders): # Iterate over folders for name in sorted([*folders, "/"], key=len, reverse=True): r = await jp_fetch("api", "contents", name, method="GET") # Get JSON blobs for each content. listing = json.loads(r.body.decode())["content"] # Delete all content for model in listing: > await jp_fetch("api", "contents", model["path"], method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:679: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:27.261 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:34473/a%40b/?token=5bbe2a4034ad73e6067f83eb7e30b9fad8ce172f77b6f5c2 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:34473/a%40b/?token=5bbe2a4034ad73e6067f83eb7e30b9fad8ce172f77b6f5c2 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:34473/a%40b/?token=5bbe2a4034ad73e6067f83eb7e30b9fad8ce172f77b6f5c2 http://127.0.0.1:34473/a%40b/?token=5bbe2a4034ad73e6067f83eb7e30b9fad8ce172f77b6f5c2 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6c3bd503d09e422b9a3cadaa001d9616 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (6c3bd503d09e422b9a3cadaa001d9616@127.0.0.1) 1.95ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: d64382e9515e471b8499f4423e306372 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (d64382e9515e471b8499f4423e306372@127.0.0.1) 2.03ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 88c96a035cfb43c39131d19425d4c28e WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.txt (88c96a035cfb43c39131d19425d4c28e@127.0.0.1) 1.73ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 4f3d14d95719477f8c3e19e5dae81335 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.ipynb (4f3d14d95719477f8c3e19e5dae81335@127.0.0.1) 1.84ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 47e0f01bec68491885e68ac719d12b75 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/ordering (47e0f01bec68491885e68ac719d12b75@127.0.0.1) 2.90ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f71614149fda4648b5ef030acec3afca WARNING ServerApp:handlers.py:281 delete /ordering/C.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/ordering/C.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.blob (f71614149fda4648b5ef030acec3afca@127.0.0.1) 1.74ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: c2bb13d2a8e54176a84ec4fb2af74ff6 WARNING ServerApp:handlers.py:281 delete /ordering/C.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/ordering/C.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.txt (c2bb13d2a8e54176a84ec4fb2af74ff6@127.0.0.1) 1.74ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f10b0d972ce5431bae0e7eb2a80d21a9 WARNING ServerApp:handlers.py:281 delete /ordering/C.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/ordering/C.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.ipynb (f10b0d972ce5431bae0e7eb2a80d21a9@127.0.0.1) 1.90ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 78f7c2a6a19c42b3a5ade69127d3b161 WARNING ServerApp:handlers.py:281 delete /ordering/b.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/ordering/b.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.blob (78f7c2a6a19c42b3a5ade69127d3b161@127.0.0.1) 1.75ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: e403bc61c4bb450fae75323880f22001 WARNING ServerApp:handlers.py:281 delete /ordering/b.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/ordering/b.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.txt (e403bc61c4bb450fae75323880f22001@127.0.0.1) 1.75ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 3edb120396624828883d434f0cbf9b52 WARNING ServerApp:handlers.py:281 delete /ordering/b.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/ordering/b.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.ipynb (3edb120396624828883d434f0cbf9b52@127.0.0.1) 2.08ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f6c52611cab54d1d994291884462849a WARNING ServerApp:handlers.py:281 delete /ordering/A.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/ordering/A.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.blob (f6c52611cab54d1d994291884462849a@127.0.0.1) 1.70ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: fe1c20fbc62b4e18ac45ac4456f6ab74 WARNING ServerApp:handlers.py:281 delete /ordering/A.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/ordering/A.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.txt (fe1c20fbc62b4e18ac45ac4456f6ab74@127.0.0.1) 1.67ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6bd941a22e254f0db6e6e021e5c7d162 WARNING ServerApp:handlers.py:281 delete /ordering/A.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/ordering/A.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.ipynb (6bd941a22e254f0db6e6e021e5c7d162@127.0.0.1) 1.82ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 551251e76e8c4f14b3b06f079adc5bb0 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/bar (551251e76e8c4f14b3b06f079adc5bb0@127.0.0.1) 1.77ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 2178e3bbef6849b3acb588b8c6b56e58 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.blob (2178e3bbef6849b3acb588b8c6b56e58@127.0.0.1) 1.70ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b33f07b9914345a392dc64bca41b7362 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.txt (b33f07b9914345a392dc64bca41b7362@127.0.0.1) 1.70ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: bb981211516f4b228290844817f3d6c1 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.ipynb (bb981211516f4b228290844817f3d6c1@127.0.0.1) 1.85ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 4cb2e48d91cd4557ba4375b596abec71 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/unicod%C3%A9 (4cb2e48d91cd4557ba4375b596abec71@127.0.0.1) 1.68ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 782ae9064dd249d39aac4ec17b0d9457 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.blob (782ae9064dd249d39aac4ec17b0d9457@127.0.0.1) 1.69ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 1903a38e58644615abf4f9d4bf534656 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.txt (1903a38e58644615abf4f9d4bf534656@127.0.0.1) 1.71ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 7a011f52ba2a4dee95bbf05c8306ba2c WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.ipynb (7a011f52ba2a4dee95bbf05c8306ba2c@127.0.0.1) 1.83ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: e7c756a624854d188aba084f4fd55514 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/%C3%A5%20b (e7c756a624854d188aba084f4fd55514@127.0.0.1) 1.69ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 168cc4e32d03481fabc64952d00ccbd4 WARNING ServerApp:handlers.py:281 delete /å b/ç d.blob DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/å b/ç d.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.blob (168cc4e32d03481fabc64952d00ccbd4@127.0.0.1) 1.71ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 9ef003a10c014e71a4eab347840af478 WARNING ServerApp:handlers.py:281 delete /å b/ç d.txt DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/å b/ç d.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.txt (9ef003a10c014e71a4eab347840af478@127.0.0.1) 1.72ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 0a32ba97bec042e7b4afc11a1b9839fb WARNING ServerApp:handlers.py:281 delete /å b/ç d.ipynb DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/å b/ç d.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.ipynb (0a32ba97bec042e7b4afc11a1b9839fb@127.0.0.1) 1.87ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 764b4f2e61b4401b9ec0f20b503cec38 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo (764b4f2e61b4401b9ec0f20b503cec38@127.0.0.1) 3.49ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 32b82de75b534a4a96777ec6b38b8b69 WARNING ServerApp:handlers.py:281 delete /foo/bar DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/foo/bar to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/foo/bar (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:34473', method='DELETE', uri='/a%40b/api/contents/foo/bar', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/filemanager.py", line 549, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/filemanager.py", line 549, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:34473", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/foo/bar (32b82de75b534a4a96777ec6b38b8b69@127.0.0.1) 3.20ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped __________________ test_delete_dirs[AsyncFileContentsManager] __________________ jp_fetch = .client_fetch at 0x7fa4851caaf0> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'å b', 'ordering', 'Directory with spaces in', 'foo', 'foo/bar', ...] async def test_delete_dirs(jp_fetch, contents, folders): # Iterate over folders for name in sorted([*folders, "/"], key=len, reverse=True): r = await jp_fetch("api", "contents", name, method="GET") # Get JSON blobs for each content. listing = json.loads(r.body.decode())["content"] # Delete all content for model in listing: > await jp_fetch("api", "contents", model["path"], method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:679: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:27.424 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:37603/a%40b/?token=116e3eaa4c5ead49a6122e3af1066669c3da57f9dea471b0 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:37603/a%40b/?token=116e3eaa4c5ead49a6122e3af1066669c3da57f9dea471b0 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:37603/a%40b/?token=116e3eaa4c5ead49a6122e3af1066669c3da57f9dea471b0 http://127.0.0.1:37603/a%40b/?token=116e3eaa4c5ead49a6122e3af1066669c3da57f9dea471b0 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 669f28b29f0b433490a772c97820e039 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (669f28b29f0b433490a772c97820e039@127.0.0.1) 3.30ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: cbfc025511894a1b940ccdc387fa187f WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (cbfc025511894a1b940ccdc387fa187f@127.0.0.1) 2.87ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 46346ee618074359aaf1510b88511370 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.txt (46346ee618074359aaf1510b88511370@127.0.0.1) 2.49ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 84549b4dacc947c3862a530e22d8b172 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.ipynb (84549b4dacc947c3862a530e22d8b172@127.0.0.1) 2.64ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 63419c42fd924719a4b1cb18c3ae0de0 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/ordering (63419c42fd924719a4b1cb18c3ae0de0@127.0.0.1) 5.42ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 3c5a9408b19547abb4a54959cbfd0ff4 WARNING ServerApp:handlers.py:281 delete /ordering/C.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.blob (3c5a9408b19547abb4a54959cbfd0ff4@127.0.0.1) 2.76ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 179bfa425e214fc2b1c23f443ba71e0c WARNING ServerApp:handlers.py:281 delete /ordering/C.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.txt (179bfa425e214fc2b1c23f443ba71e0c@127.0.0.1) 2.46ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: d6b700e2f94b4b4fa894de0d632efe47 WARNING ServerApp:handlers.py:281 delete /ordering/C.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.ipynb (d6b700e2f94b4b4fa894de0d632efe47@127.0.0.1) 2.80ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 045cf41c19c24e0d90b6df3c6ae78fcc WARNING ServerApp:handlers.py:281 delete /ordering/b.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.blob (045cf41c19c24e0d90b6df3c6ae78fcc@127.0.0.1) 2.64ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: decd463d3ce143d79e312ef926f36350 WARNING ServerApp:handlers.py:281 delete /ordering/b.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.txt (decd463d3ce143d79e312ef926f36350@127.0.0.1) 2.52ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f0ae211072524947942522724697a4e0 WARNING ServerApp:handlers.py:281 delete /ordering/b.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.ipynb (f0ae211072524947942522724697a4e0@127.0.0.1) 2.89ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: cbcd5ba83a0c470f9ceb14a318949767 WARNING ServerApp:handlers.py:281 delete /ordering/A.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.blob (cbcd5ba83a0c470f9ceb14a318949767@127.0.0.1) 2.73ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 12100d3f8f314670870fadf55a0a1e62 WARNING ServerApp:handlers.py:281 delete /ordering/A.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.txt (12100d3f8f314670870fadf55a0a1e62@127.0.0.1) 2.66ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 195d54edd9c04b9cbf3b8db9b9783ae5 WARNING ServerApp:handlers.py:281 delete /ordering/A.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.ipynb (195d54edd9c04b9cbf3b8db9b9783ae5@127.0.0.1) 2.78ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 064c1ec009754c89b1db73ac7199510e DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/bar (064c1ec009754c89b1db73ac7199510e@127.0.0.1) 3.12ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b7a4dbb3e13241269806b7a63dbc0ed4 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.blob (b7a4dbb3e13241269806b7a63dbc0ed4@127.0.0.1) 3.00ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 23351c60dd50451897cc5f19773c0c60 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.txt (23351c60dd50451897cc5f19773c0c60@127.0.0.1) 4.33ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 0f9ad3f9872a4091bc3658a313dea55f WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.ipynb (0f9ad3f9872a4091bc3658a313dea55f@127.0.0.1) 3.55ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: a783649ed7df4423a5729108fda00de4 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/unicod%C3%A9 (a783649ed7df4423a5729108fda00de4@127.0.0.1) 3.45ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: d08d2df2e27d4e549a4a4d9603d7ab9d WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.blob (d08d2df2e27d4e549a4a4d9603d7ab9d@127.0.0.1) 3.48ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 470aab7d59124dbf9e5e312175837b48 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.txt (470aab7d59124dbf9e5e312175837b48@127.0.0.1) 3.05ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 4afdf2de244742a0957d0f63a2dd1fda WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.ipynb (4afdf2de244742a0957d0f63a2dd1fda@127.0.0.1) 3.51ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 4d869bcec751465cb7e60a18f890a59a DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/%C3%A5%20b (4d869bcec751465cb7e60a18f890a59a@127.0.0.1) 3.13ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 9774e5668fb4496cb1029c4cfe7b9f23 WARNING ServerApp:handlers.py:281 delete /å b/ç d.blob DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/å b/ç d.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.blob (9774e5668fb4496cb1029c4cfe7b9f23@127.0.0.1) 2.68ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 9acd1f2cfe8d447ea1e3c055fb3bf00d WARNING ServerApp:handlers.py:281 delete /å b/ç d.txt DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/å b/ç d.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.txt (9acd1f2cfe8d447ea1e3c055fb3bf00d@127.0.0.1) 2.79ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 175de9393dee4c29af0927e7d866b958 WARNING ServerApp:handlers.py:281 delete /å b/ç d.ipynb DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/å b/ç d.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/%C3%A5%20b/%C3%A7%20d.ipynb (175de9393dee4c29af0927e7d866b958@127.0.0.1) 3.05ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 7ab35a82e36b4bab97989ab92dad9ae1 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo (7ab35a82e36b4bab97989ab92dad9ae1@127.0.0.1) 7.39ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 71e12bb608bc4bd28023f8222968f36b WARNING ServerApp:handlers.py:281 delete /foo/bar DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/foo/bar (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:37603', method='DELETE', uri='/a%40b/api/contents/foo/bar', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 3' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/filemanager.py", line 1008, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 3' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/filemanager.py", line 1008, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:37603", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/foo/bar (71e12bb608bc4bd28023f8222968f36b@127.0.0.1) 3.44ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________ test_delete_non_empty_dir[FileContentsManager] ________________ jp_fetch = .client_fetch at 0x7fa4865d0790> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} @pytest.mark.xfail(sys.platform == "win32", reason="Deleting non-empty dirs on Windows") async def test_delete_non_empty_dir(jp_fetch, contents): # Delete a folder > await jp_fetch("api", "contents", "å b", method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:689: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:27.627 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:46459/a%40b/?token=9ba6fa37423eed14686218f6aa673e394f5818dc4cc74780 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:46459/a%40b/?token=9ba6fa37423eed14686218f6aa673e394f5818dc4cc74780 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:46459/a%40b/?token=9ba6fa37423eed14686218f6aa673e394f5818dc4cc74780 http://127.0.0.1:46459/a%40b/?token=9ba6fa37423eed14686218f6aa673e394f5818dc4cc74780 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: e64c469f51c141c4a93c436e038214e0 WARNING ServerApp:handlers.py:281 delete /å b DEBUG ServerApp:filemanager.py:548 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/root_dir/å b to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:46459', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/filemanager.py", line 549, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/filemanager.py", line 549, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:46459", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/%C3%A5%20b (e64c469f51c141c4a93c436e038214e0@127.0.0.1) 2.63ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped _____________ test_delete_non_empty_dir[AsyncFileContentsManager] ______________ jp_fetch = .client_fetch at 0x7fa485086670> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} @pytest.mark.xfail(sys.platform == "win32", reason="Deleting non-empty dirs on Windows") async def test_delete_non_empty_dir(jp_fetch, contents): # Delete a folder > await jp_fetch("api", "contents", "å b", method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:689: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-07-01 22:17:27.689 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.0 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:39929/a%40b/?token=53ae8bc4b54c0e9d25b360250bbe70fcd8fecd6a79fbbf25 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:39929/a%40b/?token=53ae8bc4b54c0e9d25b360250bbe70fcd8fecd6a79fbbf25 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/runtime/jpserver-2541949-open.html Or copy and paste one of these URLs: http://localhost:39929/a%40b/?token=53ae8bc4b54c0e9d25b360250bbe70fcd8fecd6a79fbbf25 http://127.0.0.1:39929/a%40b/?token=53ae8bc4b54c0e9d25b360250bbe70fcd8fecd6a79fbbf25 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b4a62f0d0b554fba95c34f4afa077878 WARNING ServerApp:handlers.py:281 delete /å b DEBUG ServerApp:filemanager.py:1007 Sending /tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/root_dir/å b to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:39929', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 3' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/filemanager.py", line 1008, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-648/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 3' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/services/contents/filemanager.py", line 1008, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:39929", "User-Agent": "Tornado/6.3.2" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/%C3%A5%20b (b4a62f0d0b554fba95c34f4afa077878@127.0.0.1) 3.56ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped =============================== warnings summary =============================== jupyter_server/base/handlers.py:22 /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/base/handlers.py:22: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import is_hidden tests/extension/test_app.py: 10 warnings /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.0/jupyter_server/serverapp.py:2379: ResourceWarning: unclosed self._find_http_port() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/kernels/test_api.py::test_connection[jp_server_config2] /usr/lib64/python3.8/site-packages/yaml/constructor.py:49: ResourceWarning: unclosed node = self.get_single_node() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/kernels/test_events.py::test_kernel_action_failed_event[shutdown] /usr/lib64/python3.8/site-packages/yaml/constructor.py:178: ResourceWarning: unclosed return super().construct_scalar(node) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/nbconvert/test_api.py::test_list_formats /usr/lib64/python3.8/collections/__init__.py:411: ResourceWarning: unclosed result = self._make(_map(kwds.pop, field_names, self)) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/jinja2/nodes.py:138: ResourceWarning: unclosed for name, arg in zip(self.fields, fields): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/jinja2/nodes.py:138: ResourceWarning: unclosed for name, arg in zip(self.fields, fields): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/jinja2/nodes.py:138: ResourceWarning: unclosed for name, arg in zip(self.fields, fields): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/jinja2/nodes.py:138: ResourceWarning: unclosed for name, arg in zip(self.fields, fields): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/jinja2/nodes.py:138: ResourceWarning: unclosed for name, arg in zip(self.fields, fields): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/jinja2/nodes.py:138: ResourceWarning: unclosed for name, arg in zip(self.fields, fields): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_culling_config passed 1 out of the required 1 times. Success! test_culling passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 12.14s call tests/test_terminal.py::test_culling 7.41s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config1] 7.35s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config0] 5.09s call tests/test_terminal.py::test_terminal_create_with_cwd 3.11s call tests/services/sessions/test_manager.py::test_pending_kernel 1.69s call tests/test_gateway.py::test_websocket_connection_closed 1.64s call tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/kernels-None] 1.36s call tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/kernels/{kernel_id}/restart-None] 1.30s call tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/kernels/{kernel_id}-None] 1.24s teardown tests/services/kernels/test_api.py::test_main_kernel_handler[jp_server_config0] =========================== short test summary info ============================ SKIPPED [1] tests/test_terminal.py:161: Not yet working SKIPPED [1] tests/test_terminal.py:198: Not yet working SKIPPED [7] tests/conftest.py:37: Skipping this test because it's marked 'integration_test'. Run integration tests using the `--integration_tests` flag. FAILED tests/test_gateway.py::test_websocket_connection_closed - Failed: Logs contain an error: exception calling callback for
kloczek commented 1 year ago

four new units started failing in 2.7.2 Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.7.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.7.2-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.2.0 rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2 configfile: pyproject.toml testpaths: tests/ plugins: console-scripts-1.4.1, timeout-2.1.0, anyio-3.7.0, flaky-3.7.0 timeout: 100.0s timeout method: thread timeout func_only: False collected 913 items tests/test_config_manager.py . [ 0%] tests/test_files.py .................... [ 2%] tests/test_gateway.py .........................F [ 5%] tests/test_paths.py ...... [ 5%] tests/test_serialize.py .. [ 6%] tests/test_serverapp.py ................................................ [ 11%] ..................... [ 13%] tests/test_terminal.py ....ss..... [ 14%] tests/test_traittypes.py ........... [ 15%] tests/test_utils.py ............... [ 17%] tests/test_version.py ........ [ 18%] tests/test_view.py .... [ 18%] tests/auth/test_authorizer.py .......................................... [ 23%] .................... [ 25%] tests/auth/test_identity.py .................... [ 27%] tests/auth/test_legacy_login.py .................. [ 29%] tests/auth/test_login.py ............... [ 31%] tests/auth/test_security.py .... [ 31%] tests/auth/test_utils.py ............ [ 33%] tests/base/test_call_context.py .... [ 33%] tests/base/test_handlers.py ........ [ 34%] tests/base/test_websocket.py .... [ 35%] tests/extension/test_app.py ................ [ 36%] tests/extension/test_config.py . [ 36%] tests/extension/test_entrypoint.py . [ 37%] tests/extension/test_handler.py ..... [ 37%] tests/extension/test_launch.py ... [ 37%] tests/extension/test_manager.py ............... [ 39%] tests/extension/test_serverextension.py ....... [ 40%] tests/extension/test_utils.py ... [ 40%] tests/nbconvert/test_handlers.py FFFFFF [ 41%] tests/services/api/test_api.py .............. [ 42%] tests/services/config/test_api.py ... [ 43%] tests/services/contents/test_api.py .................................... [ 47%] ........................................................................ [ 54%] ........................................................................ [ 62%] ............................FFFF...................... [ 68%] tests/services/contents/test_checkpoints.py ............ [ 70%] tests/services/contents/test_config.py ..... [ 70%] tests/services/contents/test_fileio.py ...... [ 71%] tests/services/contents/test_largefilemanager.py .............. [ 72%] tests/services/contents/test_manager.py ................................ [ 76%] ...................F...F...F...F........................................ [ 84%] .. [ 84%] tests/services/events/test_api.py ......... [ 85%] tests/services/events/test_extension.py . [ 85%] tests/services/kernels/test_api.py ..................... [ 87%] tests/services/kernels/test_config.py ... [ 88%] tests/services/kernels/test_connection.py . [ 88%] tests/services/kernels/test_cull.py ... [ 88%] tests/services/kernels/test_events.py ............ [ 89%] tests/services/kernelspecs/test_api.py ...... [ 90%] tests/services/nbconvert/test_api.py . [ 90%] tests/services/sessions/test_api.py .................................... [ 94%] ........................ [ 97%] tests/services/sessions/test_manager.py ................ [ 99%] tests/unix_sockets/test_api.py .. [ 99%] tests/unix_sockets/test_serverapp_integration.py sssssss [100%] =================================== FAILURES =================================== _______________________ test_websocket_connection_closed _______________________ init_gateway = None jp_serverapp = jp_fetch = .client_fetch at 0x7f1936d840d0> caplog = <_pytest.logging.LogCaptureFixture object at 0x7f19360ea160> @patch("tornado.websocket.websocket_connect", mock_websocket_connect()) async def test_websocket_connection_closed(init_gateway, jp_serverapp, jp_fetch, caplog): # Create the kernel and get the kernel manager... kernel_id = await create_kernel(jp_fetch, "kspec_foo") km: GatewayKernelManager = jp_serverapp.kernel_manager.get_kernel(kernel_id) # Create the KernelWebsocketHandler... request = HTTPServerRequest("foo", "GET") request.connection = MagicMock() handler = KernelWebsocketHandler(jp_serverapp.web_app, request) # Force the websocket handler to raise a closed error if we try to write a message # to the client. handler.ws_connection = MagicMock() handler.ws_connection.is_closing = lambda: True # Create the GatewayWebSocketConnection and attach it to the handler... conn = GatewayWebSocketConnection(parent=km, websocket_handler=handler) handler.connection = conn await conn.connect() # Processing websocket messages happens in separate coroutines and any # errors in that process will show up in logs, but not bubble up to the # caller. # # To check for these, we wait for the server to stop and then check the # logs for errors. await jp_serverapp._cleanup() for _, level, message in caplog.record_tuples: if level >= logging.ERROR: > pytest.fail(f"Logs contain an error: {message}") E Failed: Logs contain an error: exception calling callback for tests/test_gateway.py:719: Failed ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:21:52.462 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:45275/a%40b/?token=984bcdd5d0e81c1706a446b7631652d326b8fac5064840e2 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:45275/a%40b/?token=984bcdd5d0e81c1706a446b7631652d326b8fac5064840e2 INFO ServerApp:serverapp.py:2801 Kernels will be managed by the Gateway server running at: INFO ServerApp:serverapp.py:2801 http://mock-gateway-server:8889 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_websocket_connection_clos0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:45275/a%40b/?token=984bcdd5d0e81c1706a446b7631652d326b8fac5064840e2 http://127.0.0.1:45275/a%40b/?token=984bcdd5d0e81c1706a446b7631652d326b8fac5064840e2 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 4de0812117b24f6bb7160f11255a5a87 INFO ServerApp:managers.py:76 Request start kernel: kernel_id=None, path='None' DEBUG ServerApp:managers.py:480 Request new kernel at: http://mock-gateway-server:8889/api/kernels INFO ServerApp:managers.py:511 GatewayKernelManager started kernel: 9123094f-05c1-41ad-a82c-3cd7aa3710e8, args: {'kernel_id': None, 'kernel_name': 'kspec_foo'} DEBUG ServerApp:log.py:98 201 POST /a%40b/api/kernels (4de0812117b24f6bb7160f11255a5a87@127.0.0.1) 5.36ms INFO ServerApp:connections.py:43 Connecting to ws://mock-gateway-server:8889/api/kernels/9123094f-05c1-41ad-a82c-3cd7aa3710e8/channels INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:connections.py:61 Connection is ready: ws: DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped DEBUG ServerApp:connections.py:133 Notebook client closed websocket connection - message dropped: None INFO ServerApp:serverapp.py:2570 Shutting down 1 kernel DEBUG ServerApp:managers.py:525 Request shutdown kernel at: http://mock-gateway-server:8889/api/kernels/9123094f-05c1-41ad-a82c-3cd7aa3710e8 ERROR concurrent.futures:_base.py:330 exception calling callback for Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib64/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/_base.py", line 328, in _invoke_callbacks callback(self) File "/usr/lib64/python3.8/asyncio/futures.py", line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File "/usr/lib64/python3.8/asyncio/base_events.py", line 764, in call_soon_threadsafe self._check_closed() File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed ERROR concurrent.futures:_base.py:330 exception calling callback for Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib64/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/concurrent/futures/_base.py", line 328, in _invoke_callbacks callback(self) File "/usr/lib64/python3.8/asyncio/futures.py", line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File "/usr/lib64/python3.8/asyncio/base_events.py", line 764, in call_soon_threadsafe self._check_closed() File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed DEBUG ServerApp:managers.py:531 Shutdown kernel response: kernel not found (ignored) ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________________________ test_from_file ________________________________ jp_fetch = .client_fetch at 0x7f1936ee1ca0> notebook = None async def test_from_file(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "html", "foo", "testnb.ipynb", method="GET", params={"download": False}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:49: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:09.525 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_from_file0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_file0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_file0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:41995/a%40b/?token=17968151b5f03d331fbaf2529ea43e33b39844690edffe5b INFO ServerApp:serverapp.py:2801 http://127.0.0.1:41995/a%40b/?token=17968151b5f03d331fbaf2529ea43e33b39844690edffe5b INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_from_file0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:41995/a%40b/?token=17968151b5f03d331fbaf2529ea43e33b39844690edffe5b http://127.0.0.1:41995/a%40b/?token=17968151b5f03d331fbaf2529ea43e33b39844690edffe5b ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: eabc38f0a9054c29a4524a6ce8418c1e ERROR ServerApp:web.py:1871 Uncaught exception GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:41995', method='GET', uri='/a%40b/nbconvert/html/foo/testnb.ipynb?download=False', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 99, in get exporter = get_exporter(format, config=self.config, log=self.log) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 111, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 353, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 537, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 555, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 566, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 653, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'lab' found in the following paths: /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_file0/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:41995", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (eabc38f0a9054c29a4524a6ce8418c1e@127.0.0.1) 35.82ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_file_404 ______________________________ jp_fetch = .client_fetch at 0x7f1936b12e50> notebook = None async def test_from_file_404(jp_fetch, notebook): with pytest.raises(HTTPClientError) as e: await jp_fetch( "nbconvert", "html", "foo", "thisdoesntexist.ipynb", method="GET", params={"download": False}, ) > assert expected_http_error(e, 404) E assert False E + where False = expected_http_error(, 404) tests/nbconvert/test_handlers.py:87: AssertionError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:09.622 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:41765/a%40b/?token=69655639f04530920feb4fcd91f49d9a1a3a58a1e07165f5 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:41765/a%40b/?token=69655639f04530920feb4fcd91f49d9a1a3a58a1e07165f5 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:41765/a%40b/?token=69655639f04530920feb4fcd91f49d9a1a3a58a1e07165f5 http://127.0.0.1:41765/a%40b/?token=69655639f04530920feb4fcd91f49d9a1a3a58a1e07165f5 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 9240289a772a4ff8874d87e345618bb6 ERROR ServerApp:web.py:1871 Uncaught exception GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:41765', method='GET', uri='/a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 99, in get exporter = get_exporter(format, config=self.config, log=self.log) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 111, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 353, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 537, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 555, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 566, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 653, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'lab' found in the following paths: /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_file_4040/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:41765", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (9240289a772a4ff8874d87e345618bb6@127.0.0.1) 31.74ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ___________________________ test_from_file_download ____________________________ jp_fetch = .client_fetch at 0x7f1936b1ad30> notebook = None async def test_from_file_download(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "python", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:91: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:09.707 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:45265/a%40b/?token=75bcaba3ca15fb795dada97ef682db6e5784e0cf6be4a6f1 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:45265/a%40b/?token=75bcaba3ca15fb795dada97ef682db6e5784e0cf6be4a6f1 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:45265/a%40b/?token=75bcaba3ca15fb795dada97ef682db6e5784e0cf6be4a6f1 http://127.0.0.1:45265/a%40b/?token=75bcaba3ca15fb795dada97ef682db6e5784e0cf6be4a6f1 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 4e37917a06524bc9aa1eba4c0ca5ffab ERROR ServerApp:web.py:1871 Uncaught exception GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:45265', method='GET', uri='/a%40b/nbconvert/python/foo/testnb.ipynb?download=True', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 99, in get exporter = get_exporter(format, config=self.config, log=self.log) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 111, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 353, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 537, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 555, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 566, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 653, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'python' found in the following paths: /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_file_download0/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:45265", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (4e37917a06524bc9aa1eba4c0ca5ffab@127.0.0.1) 30.72ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_file_zip ______________________________ jp_fetch = .client_fetch at 0x7f1936b07af0> notebook = None async def test_from_file_zip(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "latex", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:105: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:09.791 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:38673/a%40b/?token=4a3b6561886c817e95929c3ddb540cd6a7afa88bc86fc220 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:38673/a%40b/?token=4a3b6561886c817e95929c3ddb540cd6a7afa88bc86fc220 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:38673/a%40b/?token=4a3b6561886c817e95929c3ddb540cd6a7afa88bc86fc220 http://127.0.0.1:38673/a%40b/?token=4a3b6561886c817e95929c3ddb540cd6a7afa88bc86fc220 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 63a64a1dd2a74db0a4c0a39272f4f680 INFO ServerApp:sign.py:427 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/data/notebook_secret WARNING ServerApp:manager.py:731 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:templateexporter.py:509 Template paths: /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/data/nbconvert/templates/latex /home/tkloczko/.local/share/jupyter/nbconvert/templates/latex /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/data /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/data/nbconvert/templates /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/data/nbconvert/templates/compatibility /home/tkloczko/.local/share/jupyter /home/tkloczko/.local/share/jupyter/nbconvert/templates /home/tkloczko/.local/share/jupyter/nbconvert/templates/compatibility /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/env/share/jupyter/nbconvert/templates /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/env/share/jupyter/nbconvert/templates/compatibility /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/share/jupyter/nbconvert/templates /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/share/jupyter/nbconvert/templates/compatibility /tmp/pytest-of-tkloczko/pytest-31/test_authorized_requests_True_15/data/nbconvert/templates /home/tkloczko/.local/share/jupyter/nbconvert/templates DEBUG ServerApp:base.py:47 Applying preprocessor: TagRemovePreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: RegexRemovePreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: SVG2PDFPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: LatexPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: HighlightMagicsPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: ExtractOutputPreprocessor DEBUG ServerApp:base.py:47 Applying preprocessor: ExtractAttachmentsPreprocessor DEBUG ServerApp:templateexporter.py:381 Attempting to load template index.tex.j2 DEBUG ServerApp:templateexporter.py:382 template_paths: /tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/data/nbconvert/templates/latex:/home/tkloczko/.local/share/jupyter/nbconvert/templates/latex:/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/data:/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/data/nbconvert/templates:/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/data/nbconvert/templates/compatibility:/home/tkloczko/.local/share/jupyter:/home/tkloczko/.local/share/jupyter/nbconvert/templates:/home/tkloczko/.local/share/jupyter/nbconvert/templates/compatibility:/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/env/share/jupyter:/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/env/share/jupyter/nbconvert/templates:/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/env/share/jupyter/nbconvert/templates/compatibility:/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/share/jupyter:/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/share/jupyter/nbconvert/templates:/tmp/pytest-of-tkloczko/pytest-31/test_from_file_zip0/share/jupyter/nbconvert/templates/compatibility:/tmp/pytest-of-tkloczko/pytest-31/test_authorized_requests_True_15/data/nbconvert/templates:/home/tkloczko/.local/share/jupyter/nbconvert/templates ERROR ServerApp:handlers.py:138 nbconvert failed: TemplateNotFound('index.tex.j2') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 134, in get output, resources = await run_sync( File "/usr/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 135, in lambda: exporter.from_notebook_node(nb, resources=resource_dict) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/latex.py", line 92, in from_notebook_node return super().from_notebook_node(nb, resources, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 427, in from_notebook_node output = self.template.render(nb=nb_copy, resources=resources) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 164, in template self._template_cached = self._load_template() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 383, in _load_template return self.environment.get_template(template_file) File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 1010, in get_template return self._load_template(name, globals) File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 969, in _load_template template = self.loader.load(self, name, self.make_globals(globals)) File "/usr/lib/python3.8/site-packages/jinja2/loaders.py", line 575, in load raise TemplateNotFound(name) jinja2.exceptions.TemplateNotFound: index.tex.j2 WARNING ServerApp:web.py:1869 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (127.0.0.1): nbconvert failed: index.tex.j2 DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:38673", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (63a64a1dd2a74db0a4c0a39272f4f680@127.0.0.1) 442.13ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________________________ test_from_post ________________________________ jp_fetch = .client_fetch at 0x7f1936aaf3a0> notebook = None async def test_from_post(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "html", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:124: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:10.285 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_from_post0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_post0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_post0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:36731/a%40b/?token=5c76c2ce671424b968ba2562aabb1d4ea8c4418abc6f4064 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:36731/a%40b/?token=5c76c2ce671424b968ba2562aabb1d4ea8c4418abc6f4064 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_from_post0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:36731/a%40b/?token=5c76c2ce671424b968ba2562aabb1d4ea8c4418abc6f4064 http://127.0.0.1:36731/a%40b/?token=5c76c2ce671424b968ba2562aabb1d4ea8c4418abc6f4064 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 933b9241d1664783b9d15f446058f6cf INFO ServerApp:sign.py:427 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/data/notebook_secret WARNING ServerApp:manager.py:731 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/testnb.ipynb (933b9241d1664783b9d15f446058f6cf@127.0.0.1) 3.88ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: c06b58c367da45b88f3a4a3eca066b2d ERROR ServerApp:web.py:1871 Uncaught exception POST /a%40b/nbconvert/html (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:36731', method='POST', uri='/a%40b/nbconvert/html', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 656, in get value = obj._trait_values[self.name] KeyError: 'template_paths' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 167, in post exporter = get_exporter(format, config=self.config) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/nbconvert/handlers.py", line 76, in get_exporter Exporter = get_exporter(format) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 111, in get_exporter if getattr(exporter(config=config), "enabled", True): File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 353, in __init__ super().__init__(config=config, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__ self._init_preprocessors() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 537, in _init_preprocessors conf = self._get_conf() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 555, in _get_conf for path in map(Path, self.template_paths): File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 703, in __get__ return self.get(obj, cls) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 659, in get default = obj.trait_defaults(self.name) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults return self._get_trait_default_generator(names[0])(self) File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1233, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 566, in _template_paths template_names = self.get_template_names() File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 653, in get_template_names raise ValueError(msg) ValueError: No template sub-directory with name 'lab' found in the following paths: /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/data /home/tkloczko/.local/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/env/share/jupyter /tmp/pytest-of-tkloczko/pytest-31/test_from_post0/share/jupyter DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:36731", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 POST /a%40b/nbconvert/html (c06b58c367da45b88f3a4a3eca066b2d@127.0.0.1) 25.74ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_post_zip ______________________________ jp_fetch = .client_fetch at 0x7f19352195e0> notebook = None async def test_from_post_zip(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "latex", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/nbconvert/test_handlers.py:143: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:10.360 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:36065/a%40b/?token=3740b3e05543c5e7b42c668d96f7e00e6ae78467d5b856a9 INFO ServerApp:serverapp.py:2801 http://127.0.0.1:36065/a%40b/?token=3740b3e05543c5e7b42c668d96f7e00e6ae78467d5b856a9 INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:36065/a%40b/?token=3740b3e05543c5e7b42c668d96f7e00e6ae78467d5b856a9 http://127.0.0.1:36065/a%40b/?token=3740b3e05543c5e7b42c668d96f7e00e6ae78467d5b856a9 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: a5dc688a9f014f4ebdca13eb9b538dfa INFO ServerApp:sign.py:427 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-31/test_from_post_zip0/data/notebook_secret WARNING ServerApp:manager.py:731 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/testnb.ipynb (a5dc688a9f014f4ebdca13eb9b538dfa@127.0.0.1) 3.95ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b259ae39087f42aca5becaae894b8c8f WARNING ServerApp:web.py:1869 500 POST /a%40b/nbconvert/latex (127.0.0.1): nbconvert failed: index.tex.j2 DEBUG ServerApp:handlers.py:315 Using contents: services/contents DEBUG ServerApp:handlers.py:315 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:36065", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 POST /a%40b/nbconvert/latex (b259ae39087f42aca5becaae894b8c8f@127.0.0.1) 343.95ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ____________________ test_delete_dirs[FileContentsManager] _____________________ jp_fetch = .client_fetch at 0x7f1934d8c280> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'Directory with spaces in', 'foo', 'å b', 'foo/bar', 'unicodé', ...] async def test_delete_dirs(jp_fetch, contents, folders): # Iterate over folders for name in sorted([*folders, "/"], key=len, reverse=True): r = await jp_fetch("api", "contents", name, method="GET") # Get JSON blobs for each content. listing = json.loads(r.body.decode())["content"] # Delete all content for model in listing: > await jp_fetch("api", "contents", model["path"], method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:679: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:21.294 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:43183/a%40b/?token=b97b49aeb1afd2fff9c0bd2242e2d3568bd98cced890ebde INFO ServerApp:serverapp.py:2801 http://127.0.0.1:43183/a%40b/?token=b97b49aeb1afd2fff9c0bd2242e2d3568bd98cced890ebde INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:43183/a%40b/?token=b97b49aeb1afd2fff9c0bd2242e2d3568bd98cced890ebde http://127.0.0.1:43183/a%40b/?token=b97b49aeb1afd2fff9c0bd2242e2d3568bd98cced890ebde ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 1f9adb77692245d2b7bb828c6e6ad5f1 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (1f9adb77692245d2b7bb828c6e6ad5f1@127.0.0.1) 1.92ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 7a84608079464c469fb65183089f4010 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.blob DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (7a84608079464c469fb65183089f4010@127.0.0.1) 1.96ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 54874f467bc04801b555004b82556f1c WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.txt DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.txt (54874f467bc04801b555004b82556f1c@127.0.0.1) 1.70ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: de8e7d954a4f442aad8043df09401de5 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.ipynb DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.ipynb (de8e7d954a4f442aad8043df09401de5@127.0.0.1) 1.82ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: a1e61e5b1f21465882de19d951d27af5 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/ordering (a1e61e5b1f21465882de19d951d27af5@127.0.0.1) 2.78ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 14dda88ac86348fb8e5e9ae4a3dd868d WARNING ServerApp:handlers.py:281 delete /ordering/C.blob DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/ordering/C.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.blob (14dda88ac86348fb8e5e9ae4a3dd868d@127.0.0.1) 1.66ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 1d1dc9ba65cd411682d0635bce478923 WARNING ServerApp:handlers.py:281 delete /ordering/C.txt DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/ordering/C.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.txt (1d1dc9ba65cd411682d0635bce478923@127.0.0.1) 1.69ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 31d9270df82345938e91f081115b792b WARNING ServerApp:handlers.py:281 delete /ordering/C.ipynb DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/ordering/C.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.ipynb (31d9270df82345938e91f081115b792b@127.0.0.1) 1.89ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f748ea408f8c470ab994dd4a297825e9 WARNING ServerApp:handlers.py:281 delete /ordering/b.blob DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/ordering/b.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.blob (f748ea408f8c470ab994dd4a297825e9@127.0.0.1) 1.67ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: cfb1159c459d47979eec4f4ade4f013f WARNING ServerApp:handlers.py:281 delete /ordering/b.txt DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/ordering/b.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.txt (cfb1159c459d47979eec4f4ade4f013f@127.0.0.1) 1.64ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b5875d9a1f5e4b2fa5e86f6ba28b967c WARNING ServerApp:handlers.py:281 delete /ordering/b.ipynb DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/ordering/b.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.ipynb (b5875d9a1f5e4b2fa5e86f6ba28b967c@127.0.0.1) 1.94ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: df2b92fb9719437189d3f94fbc124414 WARNING ServerApp:handlers.py:281 delete /ordering/A.blob DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/ordering/A.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.blob (df2b92fb9719437189d3f94fbc124414@127.0.0.1) 1.66ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b5fa65b58d4e4dda889ec832478b62c6 WARNING ServerApp:handlers.py:281 delete /ordering/A.txt DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/ordering/A.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.txt (b5fa65b58d4e4dda889ec832478b62c6@127.0.0.1) 1.67ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: ef68aa4a66cf4ce69885a04681a25f03 WARNING ServerApp:handlers.py:281 delete /ordering/A.ipynb DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/ordering/A.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.ipynb (ef68aa4a66cf4ce69885a04681a25f03@127.0.0.1) 1.80ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 9b51ab5e2ae0436aac7e4712f5bd083b DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/bar (9b51ab5e2ae0436aac7e4712f5bd083b@127.0.0.1) 1.79ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 9384b9d430124840b9fd3e018cda2152 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.blob DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.blob (9384b9d430124840b9fd3e018cda2152@127.0.0.1) 1.71ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6cba7365f4c74f6ebf56c64334de5451 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.txt DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.txt (6cba7365f4c74f6ebf56c64334de5451@127.0.0.1) 1.81ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: e18101456a814da69e2618f84c56bcfa WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.ipynb DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.ipynb (e18101456a814da69e2618f84c56bcfa@127.0.0.1) 1.95ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 27d0d3089d074676b29c2ca4411c811c DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/unicod%C3%A9 (27d0d3089d074676b29c2ca4411c811c@127.0.0.1) 1.80ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 2a875b80a0b143f4a6a9815562d7b58f WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.blob DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.blob (2a875b80a0b143f4a6a9815562d7b58f@127.0.0.1) 1.72ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: e8747005ecb2462bb546dba3dc239d70 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.txt DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.txt (e8747005ecb2462bb546dba3dc239d70@127.0.0.1) 1.68ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6c8d9a6264bb464084854f5f136e5809 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.ipynb DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.ipynb (6c8d9a6264bb464084854f5f136e5809@127.0.0.1) 1.84ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 39f213ca526e44808300676977eb974c DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo (39f213ca526e44808300676977eb974c@127.0.0.1) 3.59ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6203d526354c4a5aa51abefe4bc7843c WARNING ServerApp:handlers.py:281 delete /foo/bar DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/foo/bar to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/foo/bar (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:43183', method='DELETE', uri='/a%40b/api/contents/foo/bar', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/filemanager.py", line 536, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/filemanager.py", line 536, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:43183", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/foo/bar (6203d526354c4a5aa51abefe4bc7843c@127.0.0.1) 3.30ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped __________________ test_delete_dirs[AsyncFileContentsManager] __________________ jp_fetch = .client_fetch at 0x7f1936434670> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'Directory with spaces in', 'foo', 'å b', 'foo/bar', 'unicodé', ...] async def test_delete_dirs(jp_fetch, contents, folders): # Iterate over folders for name in sorted([*folders, "/"], key=len, reverse=True): r = await jp_fetch("api", "contents", name, method="GET") # Get JSON blobs for each content. listing = json.loads(r.body.decode())["content"] # Delete all content for model in listing: > await jp_fetch("api", "contents", model["path"], method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:679: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:21.443 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:42939/a%40b/?token=de9f317edd25306089b40d386e3a2a93c1c58ee1e92dfeac INFO ServerApp:serverapp.py:2801 http://127.0.0.1:42939/a%40b/?token=de9f317edd25306089b40d386e3a2a93c1c58ee1e92dfeac INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:42939/a%40b/?token=de9f317edd25306089b40d386e3a2a93c1c58ee1e92dfeac http://127.0.0.1:42939/a%40b/?token=de9f317edd25306089b40d386e3a2a93c1c58ee1e92dfeac ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 06e24b835d624901b0ba67c68b973021 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (06e24b835d624901b0ba67c68b973021@127.0.0.1) 3.79ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b9de8d8c09f940fba4a2df6be905fefa WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.blob DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (b9de8d8c09f940fba4a2df6be905fefa@127.0.0.1) 2.21ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 1bb7357da13b45508b27be9c6383da42 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.txt DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.txt (1bb7357da13b45508b27be9c6383da42@127.0.0.1) 1.86ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 049557d1283948a29004762d080a9573 WARNING ServerApp:handlers.py:281 delete /Directory with spaces in/inspace.ipynb DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.ipynb (049557d1283948a29004762d080a9573@127.0.0.1) 1.95ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: ec39dae18efc4553b2d3a5e2a8463f2a DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/ordering (ec39dae18efc4553b2d3a5e2a8463f2a@127.0.0.1) 5.40ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: b92a0d22b0694606acacbb13ff1325d9 WARNING ServerApp:handlers.py:281 delete /ordering/C.blob DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.blob (b92a0d22b0694606acacbb13ff1325d9@127.0.0.1) 1.78ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 1e0de27fc79040fb8180d8f1614a43aa WARNING ServerApp:handlers.py:281 delete /ordering/C.txt DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.txt (1e0de27fc79040fb8180d8f1614a43aa@127.0.0.1) 1.69ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: fefec3a8ac284b41971666ccdfd3fce2 WARNING ServerApp:handlers.py:281 delete /ordering/C.ipynb DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.ipynb (fefec3a8ac284b41971666ccdfd3fce2@127.0.0.1) 1.84ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 42d33ef5617e4fd7b36a38f9711efca0 WARNING ServerApp:handlers.py:281 delete /ordering/b.blob DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.blob (42d33ef5617e4fd7b36a38f9711efca0@127.0.0.1) 1.76ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: ee8e81e52d6046c4b12d99757d5c55dd WARNING ServerApp:handlers.py:281 delete /ordering/b.txt DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.txt (ee8e81e52d6046c4b12d99757d5c55dd@127.0.0.1) 1.76ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 127fa6d910bd4ef580e23c2795c1179e WARNING ServerApp:handlers.py:281 delete /ordering/b.ipynb DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.ipynb (127fa6d910bd4ef580e23c2795c1179e@127.0.0.1) 2.10ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: bfc27fffd51f4b258aba497e2d42ba83 WARNING ServerApp:handlers.py:281 delete /ordering/A.blob DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.blob (bfc27fffd51f4b258aba497e2d42ba83@127.0.0.1) 1.67ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: bf1d3173a7974b11b1c8543560cf6a81 WARNING ServerApp:handlers.py:281 delete /ordering/A.txt DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.txt (bf1d3173a7974b11b1c8543560cf6a81@127.0.0.1) 1.70ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: ca738e9b368f4ba5931e93d3f913ea48 WARNING ServerApp:handlers.py:281 delete /ordering/A.ipynb DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.ipynb (ca738e9b368f4ba5931e93d3f913ea48@127.0.0.1) 1.87ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f758b66234634d45b163f7e5db2050c6 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/bar (f758b66234634d45b163f7e5db2050c6@127.0.0.1) 3.31ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 411f16e1917642dd81a00096bae77e2f WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.blob DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.blob (411f16e1917642dd81a00096bae77e2f@127.0.0.1) 1.74ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 6466d58a2f7140ba86c852f3b6098705 WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.txt DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.txt (6466d58a2f7140ba86c852f3b6098705@127.0.0.1) 1.75ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 3492744c8d4c41629cf31c6265fe56ce WARNING ServerApp:handlers.py:281 delete /foo/bar/baz.ipynb DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.ipynb (3492744c8d4c41629cf31c6265fe56ce@127.0.0.1) 1.97ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 588c49f0a29941779852e19fea8fd2fe DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/unicod%C3%A9 (588c49f0a29941779852e19fea8fd2fe@127.0.0.1) 2.90ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f93b247e52174e578745629fa3d0f4c4 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.blob DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.blob to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.blob (f93b247e52174e578745629fa3d0f4c4@127.0.0.1) 1.75ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f25ab0d827c54c2c8b262c860588f37a WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.txt DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.txt to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.txt (f25ab0d827c54c2c8b262c860588f37a@127.0.0.1) 1.72ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: f4c7695f6a6e470d9e6331a56e5e26c8 WARNING ServerApp:handlers.py:281 delete /unicodé/innonascii.ipynb DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.ipynb to trash DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.ipynb (f4c7695f6a6e470d9e6331a56e5e26c8@127.0.0.1) 1.96ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 226832b2bdc2484e941a0c35b650d752 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo (226832b2bdc2484e941a0c35b650d752@127.0.0.1) 6.78ms DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: 59f6a8e208ce44d1998134669c35ff63 WARNING ServerApp:handlers.py:281 delete /foo/bar DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/foo/bar (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:42939', method='DELETE', uri='/a%40b/api/contents/foo/bar', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 3' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/filemanager.py", line 979, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 3' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/filemanager.py", line 979, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:42939", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/foo/bar (59f6a8e208ce44d1998134669c35ff63@127.0.0.1) 2.64ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________ test_delete_non_empty_dir[FileContentsManager] ________________ jp_fetch = .client_fetch at 0x7f1934d6a9d0> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} @pytest.mark.xfail(sys.platform == "win32", reason="Deleting non-empty dirs on Windows") async def test_delete_non_empty_dir(jp_fetch, contents): # Delete a folder > await jp_fetch("api", "contents", "å b", method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:689: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:21.718 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:38937/a%40b/?token=cc77719680d5297915d9cff1c93898a63fa559a8ad7671cd INFO ServerApp:serverapp.py:2801 http://127.0.0.1:38937/a%40b/?token=cc77719680d5297915d9cff1c93898a63fa559a8ad7671cd INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:38937/a%40b/?token=cc77719680d5297915d9cff1c93898a63fa559a8ad7671cd http://127.0.0.1:38937/a%40b/?token=cc77719680d5297915d9cff1c93898a63fa559a8ad7671cd ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: c3418bd3bca648deb1b35ed716f0ec50 WARNING ServerApp:handlers.py:281 delete /å b DEBUG ServerApp:filemanager.py:534 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/root_dir/å b to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:38937', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/filemanager.py", line 536, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/manager.py", line 477, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/filemanager.py", line 536, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:38937", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/%C3%A5%20b (c3418bd3bca648deb1b35ed716f0ec50@127.0.0.1) 3.04ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped _____________ test_delete_non_empty_dir[AsyncFileContentsManager] ______________ jp_fetch = .client_fetch at 0x7f19369b1790> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} @pytest.mark.xfail(sys.platform == "win32", reason="Deleting non-empty dirs on Windows") async def test_delete_non_empty_dir(jp_fetch, contents): # Delete a folder > await jp_fetch("api", "contents", "å b", method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error tests/services/contents/test_api.py:689: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2023-08-18 11:23:21.785 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:198 Searching ['/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/etc/jupyter'] for config files DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:902 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} INFO ServerApp:serverapp.py:2801 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/root_dir INFO ServerApp:serverapp.py:2801 Jupyter Server 2.7.2 is running at: INFO ServerApp:serverapp.py:2801 http://localhost:33723/a%40b/?token=db5f680cd2b003cc910f195bddf0e8180552d42c494fefcd INFO ServerApp:serverapp.py:2801 http://127.0.0.1:33723/a%40b/?token=db5f680cd2b003cc910f195bddf0e8180552d42c494fefcd INFO ServerApp:serverapp.py:2802 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:2864 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/runtime/jpserver-964828-open.html Or copy and paste one of these URLs: http://localhost:33723/a%40b/?token=db5f680cd2b003cc910f195bddf0e8180552d42c494fefcd http://127.0.0.1:33723/a%40b/?token=db5f680cd2b003cc910f195bddf0e8180552d42c494fefcd ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:447 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:478 Generating new user for token-authenticated request: bf277751229c4a449ee701b4a91f244c WARNING ServerApp:handlers.py:281 delete /å b DEBUG ServerApp:filemanager.py:977 Sending /tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/root_dir/å b to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:33723', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 3' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/filemanager.py", line 979, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:744 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/shutil.py", line 791, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-31/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 3' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/handlers.py", line 282, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py", line 182, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/manager.py", line 882, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/services/contents/filemanager.py", line 979, in delete_file send2trash(os_path) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.8/shutil.py", line 798, in move if _destinsrc(src, dst): File "/usr/lib64/python3.8/shutil.py", line 818, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:33723", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/%C3%A5%20b (bf277751229c4a449ee701b4a91f244c@127.0.0.1) 2.67ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2581 Shutting down 1 extension DEBUG ServerApp:manager.py:369 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:371 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______ test_delete_non_empty_folder[jp_contents_manager0-True-False-None] ______ delete_to_trash = True, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): > await ensure_async(cm.delete_file(dir)) E Failed: DID NOT RAISE tests/services/contents/test_manager.py:757: Failed ______ test_delete_non_empty_folder[jp_contents_manager1-True-False-None] ______ delete_to_trash = True, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): > await ensure_async(cm.delete_file(dir)) E Failed: DID NOT RAISE tests/services/contents/test_manager.py:757: Failed ______ test_delete_non_empty_folder[jp_contents_manager2-True-False-None] ______ delete_to_trash = True, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): > await ensure_async(cm.delete_file(dir)) E Failed: DID NOT RAISE tests/services/contents/test_manager.py:757: Failed ______ test_delete_non_empty_folder[jp_contents_manager3-True-False-None] ______ delete_to_trash = True, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): > await ensure_async(cm.delete_file(dir)) E Failed: DID NOT RAISE tests/services/contents/test_manager.py:757: Failed =============================== warnings summary =============================== jupyter_server/base/handlers.py:22 /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/base/handlers.py:22: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import is_hidden tests/extension/test_app.py: 10 warnings /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.7.2/jupyter_server/serverapp.py:2379: ResourceWarning: unclosed self._find_http_port() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/kernels/test_config.py::test_config /usr/lib/python3.8/site-packages/traitlets/traitlets.py:1777: ResourceWarning: unclosed for meta_name, meta_eval in metadata.items(): Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/kernels/test_events.py::test_kernel_action_http_error_event[start] /usr/lib64/python3.8/site-packages/yaml/constructor.py:49: ResourceWarning: unclosed node = self.get_single_node() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/services/sessions/test_api.py::test_modify_path[jp_server_config0] /usr/lib/python3.8/site-packages/traitlets/traitlets.py:264: ResourceWarning: unclosed self.value = value Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/traitlets/config/application.py:984: ResourceWarning: unclosed for cls in self._classes_inc_parents(classes) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/traitlets/config/application.py:984: ResourceWarning: unclosed for cls in self._classes_inc_parents(classes) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/traitlets/config/application.py:984: ResourceWarning: unclosed for cls in self._classes_inc_parents(classes) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/traitlets/config/application.py:984: ResourceWarning: unclosed for cls in self._classes_inc_parents(classes) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/traitlets/config/application.py:984: ResourceWarning: unclosed for cls in self._classes_inc_parents(classes) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/unix_sockets/test_api.py::test_get_spec /usr/lib/python3.8/site-packages/traitlets/config/application.py:984: ResourceWarning: unclosed for cls in self._classes_inc_parents(classes) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_culling_config passed 1 out of the required 1 times. Success! test_culling passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 12.14s call tests/test_terminal.py::test_culling 7.45s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config1] 7.34s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config0] 5.29s call tests/test_terminal.py::test_terminal_create_with_cwd 3.11s call tests/services/sessions/test_manager.py::test_pending_kernel 1.87s call tests/test_gateway.py::test_websocket_connection_closed 1.63s call tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/kernels-None] 1.35s call tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/kernels/{kernel_id}-None] 1.24s teardown tests/services/kernels/test_api.py::test_main_kernel_handler[jp_server_config0] 1.24s call tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/kernels/{kernel_id}/restart-None] =========================== short test summary info ============================ SKIPPED [1] tests/test_terminal.py:161: Not yet working SKIPPED [1] tests/test_terminal.py:198: Not yet working SKIPPED [7] tests/conftest.py:37: Skipping this test because it's marked 'integration_test'. Run integration tests using the `--integration_tests` flag. FAILED tests/test_gateway.py::test_websocket_connection_closed - Failed: Logs contain an error: exception calling callback for FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager1-True-False-None] - Failed: DID NOT RAISE FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager2-True-False-None] - Failed: DID NOT RAISE FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager3-True-False-None] - Failed: DID NOT RAISE ====== 15 failed, 889 passed, 9 skipped, 20 warnings in 206.36s (0:03:26) ====== ```
Wh1isper commented 1 year ago

I'm getting the same error. I found some info, FYI.

delete_to_trash will cause Invalid cross-device link error, This is because send2trash thinks it's bad to move files across devices: https://github.com/arsenetar/send2trash/issues/26

And we seem to know it exists: https://github.com/jupyter-server/jupyter_server/blob/main/tests/services/contents/test_manager.py#L735

Should we mark those tests as xfail? Or I'm wondering if we should allow cross-device moves to trash while adding a feature like "this file is too large and will be deleted instead of moved to the trash". @blink1073

blink1073 commented 1 year ago

The tests pass in our CI on multiple platforms, we can accept PRs to make it work with downstream repackagers, but we don't have the bandwidth ourselves.

Wh1isper commented 1 year ago

Sounds reasonable. I'm going to put it on hold for now because I haven't come up with anything good. 👀

kloczek commented 1 year ago

The tests pass in our CI on multiple platforms, we can accept PRs to make it work with downstream repackagers, but we don't have the bandwidth ourselves.

To form PR you must know first what is going on in the actual code. I'm only messenger ..

kloczek commented 8 months ago
Here is updated test suite output with 2.13.0, python 3.9.18 and pytest 8.1.1: ```console ==================================== ERRORS ==================================== ____________ ERROR at setup of test_gateway_session_lifecycle[True] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: E E Traceback (most recent call last): E File "/usr/lib64/python3.9/site-packages/tornado/routing.py", line 474, in __init__ E self.target_kwargs = target_kwargs if target_kwargs else {} E ResourceWarning: unclosed ihook = item = kwds = {} /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:146: PytestUnraisableExceptionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:13:01.611 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/config/jupyter_server_config.json ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=.() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685, ()]> cb=[IOLoop.add_future..() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685]> ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=.() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685, ()]> cb=[IOLoop.add_future..() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685]> ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=()]> cb=[IOLoop.add_future..() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685]> ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=.finish() at /home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/kernels/connection/channels.py:189, <1 more>, ()]> cb=[_HandlerDelegate.execute..() at /usr/lib64/python3.9/site-packages/tornado/web.py:2434]> ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=()]> cb=[IOLoop.add_future..() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685]> ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=()]> cb=[IOLoop.add_future..() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685]> ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=.finish() at /home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/kernels/connection/channels.py:189, <1 more>, ()]> cb=[_HandlerDelegate.execute..() at /usr/lib64/python3.9/site-packages/tornado/web.py:2434]> ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=.finish() at /home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/kernels/connection/channels.py:189, <1 more>, ()]> cb=[_HandlerDelegate.execute..() at /usr/lib64/python3.9/site-packages/tornado/web.py:2434]> INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:37247/a%40b/?token=e0558d7797fcfc7231cfe98d732d6ee423443df1012830d6 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:37247/a%40b/?token=e0558d7797fcfc7231cfe98d732d6ee423443df1012830d6 INFO ServerApp:serverapp.py:3003 Kernels will be managed by the Gateway server running at: INFO ServerApp:serverapp.py:3003 http://mock-gateway-server:8889 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_gateway_session_lifecycle1/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:37247/a%40b/?token=e0558d7797fcfc7231cfe98d732d6ee423443df1012830d6 http://127.0.0.1:37247/a%40b/?token=e0558d7797fcfc7231cfe98d732d6ee423443df1012830d6 =================================== FAILURES =================================== ____________ test_authorized_requests[True-GET-/api/nbconvert-None] ____________ request = > io_loop = send_request = ._ at 0x7fdca4bd3160> tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15') jp_serverapp = method = 'GET', url = '/api/nbconvert', body = None, allowed = True @pytest.mark.parametrize("method, url, body", HTTP_REQUESTS_PARAMETRIZED) @pytest.mark.parametrize("allowed", (True, False)) async def test_authorized_requests( request, io_loop, send_request, tmp_path, jp_serverapp, method, url, body, allowed, ): # Setup stuff for the Contents API # Add a notebook on disk contents_dir = tmp_path / jp_serverapp.root_dir p = contents_dir / "dir_for_testing" p.mkdir(parents=True, exist_ok=True) # Create a notebook nb = writes(new_notebook(), version=4) nbname = p.joinpath("nb_for_testing.ipynb") nbname.write_text(nb, encoding="utf-8") # Setup nbpath = "dir_for_testing/nb_for_testing.ipynb" kernelspec = NATIVE_KERNEL_NAME km = jp_serverapp.kernel_manager if "session" in url: session_model = await jp_serverapp.session_manager.create_session(path="foo") session_id = session_model["id"] if "kernel" in url: if os.name == "nt": pytest.skip("Test hangs on Windows") kernel_id = await km.start_kernel() kernel = km.get_kernel(kernel_id) # kernels take a moment to be ready # wait for it to respond kc = kernel.client() kc.start_channels() await kc.wait_for_ready() kc.stop_channels() if "terminal" in url: term_manager = jp_serverapp.web_app.settings["terminal_manager"] term_model = term_manager.create() term_name = term_model["name"] url = url.format(**locals()) if allowed: # Create a server with full permissions permissions = { "actions": ["read", "write", "execute"], "resources": [ "contents", "kernels", "kernelspecs", "nbconvert", "sessions", "api", "config", "csp", "server", "terminals", ], } expected_codes = {200, 201, 204, None} # Websockets don't return a code else: permissions = {"actions": [], "resources": []} expected_codes = {403} jp_serverapp.authorizer.permissions = permissions code = await send_request(url, body=body, method=method) > assert code in expected_codes E assert 500 in {200, 201, 204, None} allowed = True body = None code = 500 contents_dir = PosixPath('/tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/root_dir') expected_codes = {200, 201, 204, None} io_loop = jp_serverapp = kernelspec = 'python3' km = method = 'GET' nb = '{\n "cells": [],\n "metadata": {},\n "nbformat": 4,\n "nbformat_minor": 5\n}' nbname = PosixPath('/tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/root_dir/dir_for_testing/nb_for_testing.ipynb') nbpath = 'dir_for_testing/nb_for_testing.ipynb' p = PosixPath('/tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/root_dir/dir_for_testing') permissions = {'actions': ['read', 'write', 'execute'], 'resources': ['contents', 'kernels', 'kernelspecs', 'nbconvert', 'sessions', 'api', ...]} request = > send_request = ._ at 0x7fdca4bd3160> tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15') url = '/api/nbconvert' tests/auth/test_authorizer.py:225: AssertionError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:09:54.633 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:44051/a%40b/?token=52cb9901085a1e1c1264189c937f98df3318ec991769f93b INFO ServerApp:serverapp.py:3003 http://127.0.0.1:44051/a%40b/?token=52cb9901085a1e1c1264189c937f98df3318ec991769f93b INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_authorized_requests_True_15/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:44051/a%40b/?token=52cb9901085a1e1c1264189c937f98df3318ec991769f93b http://127.0.0.1:44051/a%40b/?token=52cb9901085a1e1c1264189c937f98df3318ec991769f93b ----------------------------- Captured stdout call ----------------------------- HTTPClientError (500): HTTP 500: Internal Server Error ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: b5acd5378d724cd88a7386700ea2b79d WARNING ServerApp:web.py:1869 500 GET /a%40b/api/nbconvert (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' WARNING ServerApp:handlers.py:773 wrote error: "Could not import nbconvert: No module named 'nbconvert'" Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/nbconvert/handlers.py", line 34, in get from nbconvert.exporters import base ModuleNotFoundError: No module named 'nbconvert' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/nbconvert/handlers.py", line 36, in get raise web.HTTPError(500, "Could not import nbconvert: %s" % e) from e tornado.web.HTTPError: HTTP 500: Internal Server Error (Could not import nbconvert: No module named 'nbconvert') ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:44051", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/api/nbconvert (b5acd5378d724cd88a7386700ea2b79d@127.0.0.1) 5.08ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________________________ test_from_file ________________________________ jp_fetch = .client_fetch at 0x7fdca52043a0> notebook = None async def test_from_file(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "html", "foo", "testnb.ipynb", method="GET", params={"download": False}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7fdca52043a0> notebook = None tests/nbconvert/test_handlers.py:49: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:31.712 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:42355/a%40b/?token=58f8d00a955a17923760752662f3a31248423aee7305d87f INFO ServerApp:serverapp.py:3003 http://127.0.0.1:42355/a%40b/?token=58f8d00a955a17923760752662f3a31248423aee7305d87f INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_from_file0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:42355/a%40b/?token=58f8d00a955a17923760752662f3a31248423aee7305d87f http://127.0.0.1:42355/a%40b/?token=58f8d00a955a17923760752662f3a31248423aee7305d87f ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 4cd4e80a9c8c4fab81fff95861401779 WARNING ServerApp:web.py:1869 500 GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:326 Using contents: services/contents DEBUG ServerApp:handlers.py:326 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:42355", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (4cd4e80a9c8c4fab81fff95861401779@127.0.0.1) 20.50ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_file_404 ______________________________ jp_fetch = .client_fetch at 0x7fdca51fd9d0> notebook = None async def test_from_file_404(jp_fetch, notebook): with pytest.raises(HTTPClientError) as e: await jp_fetch( "nbconvert", "html", "foo", "thisdoesntexist.ipynb", method="GET", params={"download": False}, ) > assert expected_http_error(e, 404) E assert False E + where False = expected_http_error(, 404) e = jp_fetch = .client_fetch at 0x7fdca51fd9d0> notebook = None tests/nbconvert/test_handlers.py:87: AssertionError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:31.791 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:35957/a%40b/?token=8f12932ce66f6d4a0c5f4509e44fd109a5ae1a6fc4ac3792 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:35957/a%40b/?token=8f12932ce66f6d4a0c5f4509e44fd109a5ae1a6fc4ac3792 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_from_file_4040/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:35957/a%40b/?token=8f12932ce66f6d4a0c5f4509e44fd109a5ae1a6fc4ac3792 http://127.0.0.1:35957/a%40b/?token=8f12932ce66f6d4a0c5f4509e44fd109a5ae1a6fc4ac3792 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 5599a3fefaa84cdea769db2c41cb1797 WARNING ServerApp:web.py:1869 500 GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:326 Using contents: services/contents DEBUG ServerApp:handlers.py:326 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:35957", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (5599a3fefaa84cdea769db2c41cb1797@127.0.0.1) 19.23ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ___________________________ test_from_file_download ____________________________ jp_fetch = .client_fetch at 0x7fdca51bd1f0> notebook = None async def test_from_file_download(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "python", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7fdca51bd1f0> notebook = None tests/nbconvert/test_handlers.py:91: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:31.867 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:43051/a%40b/?token=d3de4df06f59aa49498c8b487b7aa4622192ebfc5e9b0b86 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:43051/a%40b/?token=d3de4df06f59aa49498c8b487b7aa4622192ebfc5e9b0b86 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_from_file_download0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:43051/a%40b/?token=d3de4df06f59aa49498c8b487b7aa4622192ebfc5e9b0b86 http://127.0.0.1:43051/a%40b/?token=d3de4df06f59aa49498c8b487b7aa4622192ebfc5e9b0b86 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: be61149e90834a46ac2540e152c477d4 WARNING ServerApp:web.py:1869 500 GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:326 Using contents: services/contents DEBUG ServerApp:handlers.py:326 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:43051", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (be61149e90834a46ac2540e152c477d4@127.0.0.1) 19.21ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_file_zip ______________________________ jp_fetch = .client_fetch at 0x7fdca51b8c10> notebook = None async def test_from_file_zip(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "latex", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7fdca51b8c10> notebook = None tests/nbconvert/test_handlers.py:105: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:31.943 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:37685/a%40b/?token=54a27ef3817921c5c22736ea9033120ca3b65678e8928917 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:37685/a%40b/?token=54a27ef3817921c5c22736ea9033120ca3b65678e8928917 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_from_file_zip0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:37685/a%40b/?token=54a27ef3817921c5c22736ea9033120ca3b65678e8928917 http://127.0.0.1:37685/a%40b/?token=54a27ef3817921c5c22736ea9033120ca3b65678e8928917 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 04a8f40eb785498f89ec7547f55e5def WARNING ServerApp:web.py:1869 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:326 Using contents: services/contents DEBUG ServerApp:handlers.py:326 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:37685", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (04a8f40eb785498f89ec7547f55e5def@127.0.0.1) 19.18ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________________________ test_from_post ________________________________ jp_fetch = .client_fetch at 0x7fdca5170700> notebook = None async def test_from_post(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "html", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7fdca5170700> nbmodel = {'content': {'cells': [{'cell_type': 'markdown', 'id': '24ea41f1', 'metadata': {}, 'source': 'Created by test ³'}, {'c...{}, 'nbformat': 4, 'nbformat_minor': 5}, 'created': '2024-03-22T20:10:32.054213Z', 'format': 'json', 'hash': None, ...} notebook = None r = HTTPResponse(_body=b'{"name": "testnb.ipynb", "path": "foo/testnb.ipynb", "last_modified": "2024-03-22T20:10:32.054213...ient.HTTPRequest object at 0x7fdca5161b20>,request_time=0.00960087776184082,start_time=1711138232.0564578,time_info={}) tests/nbconvert/test_handlers.py:124: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:32.018 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:43305/a%40b/?token=92388e0c0e24d443443373f3c0111737c458dc9b597c7715 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:43305/a%40b/?token=92388e0c0e24d443443373f3c0111737c458dc9b597c7715 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:43305/a%40b/?token=92388e0c0e24d443443373f3c0111737c458dc9b597c7715 http://127.0.0.1:43305/a%40b/?token=92388e0c0e24d443443373f3c0111737c458dc9b597c7715 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: ca831a7cc85749839dd646ef00ad7dc4 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb INFO ServerApp:sign.py:430 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-1094/test_from_post0/data/notebook_secret WARNING ServerApp:manager.py:740 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/testnb.ipynb (ca831a7cc85749839dd646ef00ad7dc4@127.0.0.1) 7.26ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: c3cd91d6cf6349c8bdb14ddc9c2ebb05 WARNING ServerApp:web.py:1869 500 POST /a%40b/nbconvert/html (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:326 Using contents: services/contents DEBUG ServerApp:handlers.py:326 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:43305", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 POST /a%40b/nbconvert/html (c3cd91d6cf6349c8bdb14ddc9c2ebb05@127.0.0.1) 19.49ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________ test_from_post_zip ______________________________ jp_fetch = .client_fetch at 0x7fdca5170c10> notebook = None async def test_from_post_zip(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "latex", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7fdca5170c10> nbmodel = {'content': {'cells': [{'cell_type': 'markdown', 'id': '392962c2', 'metadata': {}, 'source': 'Created by test ³'}, {'c...{}, 'nbformat': 4, 'nbformat_minor': 5}, 'created': '2024-03-22T20:10:32.142213Z', 'format': 'json', 'hash': None, ...} notebook = None r = HTTPResponse(_body=b'{"name": "testnb.ipynb", "path": "foo/testnb.ipynb", "last_modified": "2024-03-22T20:10:32.142213...lient.HTTPRequest object at 0x7fdca513ea00>,request_time=0.00832056999206543,start_time=1711138232.143846,time_info={}) tests/nbconvert/test_handlers.py:143: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:32.104 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:37935/a%40b/?token=6126471abd951d7e5ba581535a71423d6fbe9c1ffed71386 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:37935/a%40b/?token=6126471abd951d7e5ba581535a71423d6fbe9c1ffed71386 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:37935/a%40b/?token=6126471abd951d7e5ba581535a71423d6fbe9c1ffed71386 http://127.0.0.1:37935/a%40b/?token=6126471abd951d7e5ba581535a71423d6fbe9c1ffed71386 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: d0d3370778b44785a2a16fb41f87384b DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/testnb.ipynb INFO ServerApp:sign.py:430 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-1094/test_from_post_zip0/data/notebook_secret WARNING ServerApp:manager.py:740 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/testnb.ipynb (d0d3370778b44785a2a16fb41f87384b@127.0.0.1) 5.98ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 6126a4b2483c4f229b6fd51843bbcb5e WARNING ServerApp:web.py:1869 500 POST /a%40b/nbconvert/latex (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:326 Using contents: services/contents DEBUG ServerApp:handlers.py:326 Using contents: services/contents ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:37935", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 POST /a%40b/nbconvert/latex (6126a4b2483c4f229b6fd51843bbcb5e@127.0.0.1) 19.46ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ____________________ test_delete_dirs[FileContentsManager] _____________________ jp_fetch = .client_fetch at 0x7fdca48e5ca0> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'foo', 'unicodé', 'Directory with spaces in', 'å b', 'ordering', ...] async def test_delete_dirs(jp_fetch, contents, folders): # Iterate over folders for name in sorted([*folders, "/"], key=len, reverse=True): r = await jp_fetch("api", "contents", name, method="GET") # Get JSON blobs for each content. listing = json.loads(r.body.decode())["content"] # Delete all content for model in listing: > await jp_fetch("api", "contents", model["path"], method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'foo', 'unicodé', 'Directory with spaces in', 'å b', 'ordering', ...] jp_fetch = .client_fetch at 0x7fdca48e5ca0> listing = [{'content': None, 'created': '2024-03-22T20:10:44.841220Z', 'format': None, 'hash': None, ...}, {'content': None, 'cr...hash': None, ...}, {'content': None, 'created': '2024-03-22T20:10:44.841220Z', 'format': None, 'hash': None, ...}, ...] model = {'content': None, 'created': '2024-03-22T20:10:44.942220Z', 'format': None, 'hash': None, ...} name = 'foo' r = HTTPResponse(_body=b'{"name": "foo", "path": "foo", "last_modified": "2024-03-22T20:10:44.842220Z", "created": "2024-0...ent.HTTPRequest object at 0x7fdca489a550>,request_time=0.011137723922729492,start_time=1711138244.9440281,time_info={}) tests/services/contents/test_api.py:720: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:44.815 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:45329/a%40b/?token=1e35c59e899371f80d761e6ee6aeba6a124729119cda42b6 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:45329/a%40b/?token=1e35c59e899371f80d761e6ee6aeba6a124729119cda42b6 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:45329/a%40b/?token=1e35c59e899371f80d761e6ee6aeba6a124729119cda42b6 http://127.0.0.1:45329/a%40b/?token=1e35c59e899371f80d761e6ee6aeba6a124729119cda42b6 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 68087bcdb23d404e861fcae2ed50e1bf DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (68087bcdb23d404e861fcae2ed50e1bf@127.0.0.1) 3.78ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 2308c411d39b44919f0eb615a5fa6250 DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb WARNING ServerApp:handlers.py:333 delete /Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.ipynb (2308c411d39b44919f0eb615a5fa6250@127.0.0.1) 2.87ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 01c1b8492f71411eba43a2f450f9ea19 DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt WARNING ServerApp:handlers.py:333 delete /Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.txt (01c1b8492f71411eba43a2f450f9ea19@127.0.0.1) 2.31ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 2a8d937a9f6f409d88ac72313e2385f2 DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob WARNING ServerApp:handlers.py:333 delete /Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/Directory with spaces in/inspace.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (2a8d937a9f6f409d88ac72313e2385f2@127.0.0.1) 2.32ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 0a5ab9cf422d43d6bdc0f6bdc2572ca2 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/ordering (0a5ab9cf422d43d6bdc0f6bdc2572ca2@127.0.0.1) 7.15ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 2592bdf2f1a94c88b22a90c308041402 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb WARNING ServerApp:handlers.py:333 delete /ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/ordering/A.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.ipynb (2592bdf2f1a94c88b22a90c308041402@127.0.0.1) 2.42ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 9e2dc6d4e3ad47ff981c3a191c322847 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt WARNING ServerApp:handlers.py:333 delete /ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/ordering/A.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.txt (9e2dc6d4e3ad47ff981c3a191c322847@127.0.0.1) 2.27ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 02d65a87e31c405e961335dd9b3ff3fb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob WARNING ServerApp:handlers.py:333 delete /ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/ordering/A.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.blob (02d65a87e31c405e961335dd9b3ff3fb@127.0.0.1) 2.28ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: c2f0f9b19a454405940a10c59b957cc8 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb WARNING ServerApp:handlers.py:333 delete /ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/ordering/b.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.ipynb (c2f0f9b19a454405940a10c59b957cc8@127.0.0.1) 2.64ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 00b838385b1c47ca9fbe15a513f9b891 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt WARNING ServerApp:handlers.py:333 delete /ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/ordering/b.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.txt (00b838385b1c47ca9fbe15a513f9b891@127.0.0.1) 2.37ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: e4d774d55db948b9af66b49e371a453b DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob WARNING ServerApp:handlers.py:333 delete /ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/ordering/b.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.blob (e4d774d55db948b9af66b49e371a453b@127.0.0.1) 2.45ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 72fdab2a6c72455b8ef3dedb612c1096 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb WARNING ServerApp:handlers.py:333 delete /ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/ordering/C.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.ipynb (72fdab2a6c72455b8ef3dedb612c1096@127.0.0.1) 2.43ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 1f89a3b495b44283a06b7d3258b4233c DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt WARNING ServerApp:handlers.py:333 delete /ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/ordering/C.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.txt (1f89a3b495b44283a06b7d3258b4233c@127.0.0.1) 2.29ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 93f7e98ba6174c9485b0a82ae7883ef0 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob WARNING ServerApp:handlers.py:333 delete /ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/ordering/C.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.blob (93f7e98ba6174c9485b0a82ae7883ef0@127.0.0.1) 2.29ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 3bc2abab74ed43e884e9808ecad641a5 DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/unicod%C3%A9 (3bc2abab74ed43e884e9808ecad641a5@127.0.0.1) 3.63ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: f20809965b984df8be42383fdc5acbbf DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb WARNING ServerApp:handlers.py:333 delete /unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.ipynb (f20809965b984df8be42383fdc5acbbf@127.0.0.1) 2.63ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 8dc127ea3a1c4f2f8d633010b421f744 DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt WARNING ServerApp:handlers.py:333 delete /unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.txt (8dc127ea3a1c4f2f8d633010b421f744@127.0.0.1) 2.33ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: c72ecadabf064cc0ad6367c804aa8fbd DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob WARNING ServerApp:handlers.py:333 delete /unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/unicodé/innonascii.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.blob (c72ecadabf064cc0ad6367c804aa8fbd@127.0.0.1) 2.33ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 48a686b3b3994d1f8f067530d527b13a DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/bar (48a686b3b3994d1f8f067530d527b13a@127.0.0.1) 3.85ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 207e3731917d495689708e9905fc0d1b DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb WARNING ServerApp:handlers.py:333 delete /foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.ipynb (207e3731917d495689708e9905fc0d1b@127.0.0.1) 2.51ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: a82393a4fb2c47469c5c9bba388ea6e8 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt WARNING ServerApp:handlers.py:333 delete /foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.txt (a82393a4fb2c47469c5c9bba388ea6e8@127.0.0.1) 2.34ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 41bab9ddeb5c4cfd9552ab1458d58266 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob WARNING ServerApp:handlers.py:333 delete /foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/bar/baz.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.blob (41bab9ddeb5c4cfd9552ab1458d58266@127.0.0.1) 2.34ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 1eb952fff9cd4b0bb7d06fab2820e0f5 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo (1eb952fff9cd4b0bb7d06fab2820e0f5@127.0.0.1) 9.59ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: e1702a1f469044878aa3a0f3f36cb8ab DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb WARNING ServerApp:handlers.py:333 delete /foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/a.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/a.ipynb (e1702a1f469044878aa3a0f3f36cb8ab@127.0.0.1) 2.48ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 196dd331c0274c1ba10365f36ad08690 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt WARNING ServerApp:handlers.py:333 delete /foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/a.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/a.txt (196dd331c0274c1ba10365f36ad08690@127.0.0.1) 2.26ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 14e316929d234a9888d2d83379f10d0f DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob WARNING ServerApp:handlers.py:333 delete /foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/a.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/a.blob (14e316929d234a9888d2d83379f10d0f@127.0.0.1) 2.28ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 0b877567a4cf4187940991b0aac6d45b DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb WARNING ServerApp:handlers.py:333 delete /foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/b.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/b.ipynb (0b877567a4cf4187940991b0aac6d45b@127.0.0.1) 2.64ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: c63ed03ec4f644b7b59faba49b7acccf DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt WARNING ServerApp:handlers.py:333 delete /foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/b.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/b.txt (c63ed03ec4f644b7b59faba49b7acccf@127.0.0.1) 2.37ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: e951a52ce73240479205b2ccfc146d19 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob WARNING ServerApp:handlers.py:333 delete /foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/b.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/b.blob (e951a52ce73240479205b2ccfc146d19@127.0.0.1) 2.35ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 7b4a78a8974a445286358dff69a285ca DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb WARNING ServerApp:handlers.py:333 delete /foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/name with spaces.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/name%20with%20spaces.ipynb (7b4a78a8974a445286358dff69a285ca@127.0.0.1) 2.45ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 316d380746c24c579e1ec44c83f85d26 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt WARNING ServerApp:handlers.py:333 delete /foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/name with spaces.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/name%20with%20spaces.txt (316d380746c24c579e1ec44c83f85d26@127.0.0.1) 2.28ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: f29c76530f4a4593b0a56a188b8b8741 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob WARNING ServerApp:handlers.py:333 delete /foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/name with spaces.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/name%20with%20spaces.blob (f29c76530f4a4593b0a56a188b8b8741@127.0.0.1) 2.29ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 1ea387c101764efc837f99908c8e0a6c DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb WARNING ServerApp:handlers.py:333 delete /foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/unicodé.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/unicod%C3%A9.ipynb (1ea387c101764efc837f99908c8e0a6c@127.0.0.1) 2.47ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 2e0c3b6aed024c51ba8894d8ad0c31bb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt WARNING ServerApp:handlers.py:333 delete /foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/unicodé.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/unicod%C3%A9.txt (2e0c3b6aed024c51ba8894d8ad0c31bb@127.0.0.1) 2.29ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: b962a4edaaa94205b77626dbb38932a0 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob WARNING ServerApp:handlers.py:333 delete /foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/unicodé.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/unicod%C3%A9.blob (b962a4edaaa94205b77626dbb38932a0@127.0.0.1) 2.47ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: eb717c3a205e4448a794712e529691fd DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar WARNING ServerApp:handlers.py:333 delete /foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/bar to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/foo/bar (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:45329', method='DELETE', uri='/a%40b/api/contents/foo/bar', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 4' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/shutil.py", line 825, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 5' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/handlers.py", line 334, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/manager.py", line 488, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/filemanager.py", line 561, in delete_file send2trash(os_path) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.9/shutil.py", line 832, in move if _destinsrc(src, dst): File "/usr/lib64/python3.9/shutil.py", line 852, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:773 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 4' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/shutil.py", line 825, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_FileContentsM0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 5' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/handlers.py", line 334, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/manager.py", line 488, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/filemanager.py", line 561, in delete_file send2trash(os_path) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.9/shutil.py", line 832, in move if _destinsrc(src, dst): File "/usr/lib64/python3.9/shutil.py", line 852, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:45329", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/foo/bar (eb717c3a205e4448a794712e529691fd@127.0.0.1) 3.56ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped __________________ test_delete_dirs[AsyncFileContentsManager] __________________ jp_fetch = .client_fetch at 0x7fdca47aa700> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'foo', 'unicodé', 'Directory with spaces in', 'å b', 'ordering', ...] async def test_delete_dirs(jp_fetch, contents, folders): # Iterate over folders for name in sorted([*folders, "/"], key=len, reverse=True): r = await jp_fetch("api", "contents", name, method="GET") # Get JSON blobs for each content. listing = json.loads(r.body.decode())["content"] # Delete all content for model in listing: > await jp_fetch("api", "contents", model["path"], method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} folders = ['', 'foo', 'unicodé', 'Directory with spaces in', 'å b', 'ordering', ...] jp_fetch = .client_fetch at 0x7fdca47aa700> listing = [{'content': None, 'created': '2024-03-22T20:10:45.071220Z', 'format': None, 'hash': None, ...}, {'content': None, 'cr...hash': None, ...}, {'content': None, 'created': '2024-03-22T20:10:45.071220Z', 'format': None, 'hash': None, ...}, ...] model = {'content': None, 'created': '2024-03-22T20:10:45.177220Z', 'format': None, 'hash': None, ...} name = 'foo' r = HTTPResponse(_body=b'{"name": "foo", "path": "foo", "last_modified": "2024-03-22T20:10:45.072220Z", "created": "2024-0...ent.HTTPRequest object at 0x7fdca4e63c70>,request_time=0.014470815658569336,start_time=1711138245.1788623,time_info={}) tests/services/contents/test_api.py:720: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:45.043 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:42229/a%40b/?token=307b69dc9396050dd01d38424fddabaa5a8ef29785ff0cbb INFO ServerApp:serverapp.py:3003 http://127.0.0.1:42229/a%40b/?token=307b69dc9396050dd01d38424fddabaa5a8ef29785ff0cbb INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:42229/a%40b/?token=307b69dc9396050dd01d38424fddabaa5a8ef29785ff0cbb http://127.0.0.1:42229/a%40b/?token=307b69dc9396050dd01d38424fddabaa5a8ef29785ff0cbb ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 954c92f251244acdb101e3a985d8b2ff DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (954c92f251244acdb101e3a985d8b2ff@127.0.0.1) 5.35ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 9d57a609ebe048ee8cf1b8950a0d9d08 DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb WARNING ServerApp:handlers.py:333 delete /Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.ipynb (9d57a609ebe048ee8cf1b8950a0d9d08@127.0.0.1) 2.80ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 7c24dc64ef5a40ce93dc23fb63a47873 DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt WARNING ServerApp:handlers.py:333 delete /Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.txt (7c24dc64ef5a40ce93dc23fb63a47873@127.0.0.1) 2.28ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: d4c35f5a48224cfabd739731ed39f699 DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob WARNING ServerApp:handlers.py:333 delete /Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in/inspace.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/Directory with spaces in/inspace.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: Directory with spaces in DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (d4c35f5a48224cfabd739731ed39f699@127.0.0.1) 2.25ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: aaef9d0a88744e1f8e365e391ed339fb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/ordering (aaef9d0a88744e1f8e365e391ed339fb@127.0.0.1) 9.04ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 2ce5ddadcbdb43b9bc143e3c5bec5480 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb WARNING ServerApp:handlers.py:333 delete /ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.ipynb (2ce5ddadcbdb43b9bc143e3c5bec5480@127.0.0.1) 2.39ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 189ea44ade764662922b9997c9b001ec DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt WARNING ServerApp:handlers.py:333 delete /ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.txt (189ea44ade764662922b9997c9b001ec@127.0.0.1) 2.71ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: f07cccf8ea924b1fb634b142f722f715 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob WARNING ServerApp:handlers.py:333 delete /ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/A.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/ordering/A.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/A.blob (f07cccf8ea924b1fb634b142f722f715@127.0.0.1) 2.23ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 06143e7fc28442f1a7612c18db233504 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb WARNING ServerApp:handlers.py:333 delete /ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.ipynb (06143e7fc28442f1a7612c18db233504@127.0.0.1) 2.62ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: b447aef3f213452daa540e88d5f97d07 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt WARNING ServerApp:handlers.py:333 delete /ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.txt (b447aef3f213452daa540e88d5f97d07@127.0.0.1) 2.35ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: fc6a72448e904f86a5ea126e98d77008 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob WARNING ServerApp:handlers.py:333 delete /ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/b.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/ordering/b.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/b.blob (fc6a72448e904f86a5ea126e98d77008@127.0.0.1) 2.31ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: ca9dbacccf534e6bb52c73af1b51ccd8 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb WARNING ServerApp:handlers.py:333 delete /ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.ipynb (ca9dbacccf534e6bb52c73af1b51ccd8@127.0.0.1) 2.35ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 4a61eae0a12d42caacf3e61364d8e7f1 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt WARNING ServerApp:handlers.py:333 delete /ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.txt (4a61eae0a12d42caacf3e61364d8e7f1@127.0.0.1) 2.22ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: bce7a54624c648b7a1f956cfc1d052a6 DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob WARNING ServerApp:handlers.py:333 delete /ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering/C.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/ordering/C.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: ordering DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/ordering/C.blob (bce7a54624c648b7a1f956cfc1d052a6@127.0.0.1) 2.22ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: f8085f080a004cdd99cbb9056f78743c DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/unicod%C3%A9 (f8085f080a004cdd99cbb9056f78743c@127.0.0.1) 4.64ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: a1557cb22ece418eb63354c8d0ccc67f DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb WARNING ServerApp:handlers.py:333 delete /unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.ipynb (a1557cb22ece418eb63354c8d0ccc67f@127.0.0.1) 2.42ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 23b37bb96a584dcdab7c54856bb957fa DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt WARNING ServerApp:handlers.py:333 delete /unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.txt (23b37bb96a584dcdab7c54856bb957fa@127.0.0.1) 2.26ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: ac4fa5993e1545e4a5c9b1171befe83d DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob WARNING ServerApp:handlers.py:333 delete /unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé/innonascii.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/unicodé/innonascii.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: unicodé DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/unicod%C3%A9/innonascii.blob (ac4fa5993e1545e4a5c9b1171befe83d@127.0.0.1) 2.27ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 3d4161bc18ef4f4d8d0853781cbfec72 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo/bar (3d4161bc18ef4f4d8d0853781cbfec72@127.0.0.1) 5.04ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: dcafe3b40d2e455183ed4fb79b70b9d3 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb WARNING ServerApp:handlers.py:333 delete /foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.ipynb (dcafe3b40d2e455183ed4fb79b70b9d3@127.0.0.1) 2.43ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 742d1b1fb23341bebf5d6125e7a05b57 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt WARNING ServerApp:handlers.py:333 delete /foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.txt (742d1b1fb23341bebf5d6125e7a05b57@127.0.0.1) 2.27ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: e94d214b5fe749d0bc95360737cf41fe DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob WARNING ServerApp:handlers.py:333 delete /foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar/baz.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar/baz.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/bar/baz.blob (e94d214b5fe749d0bc95360737cf41fe@127.0.0.1) 2.29ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: afb4382010d54546b73053a919ab2c10 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:log.py:98 200 GET /a%40b/api/contents/foo (afb4382010d54546b73053a919ab2c10@127.0.0.1) 12.95ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 8f418ec9f9344ac98b69454ab8ea6e08 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb WARNING ServerApp:handlers.py:333 delete /foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/a.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/a.ipynb (8f418ec9f9344ac98b69454ab8ea6e08@127.0.0.1) 2.37ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 186f5391f1d540f7806a9386b66688f6 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt WARNING ServerApp:handlers.py:333 delete /foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/a.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/a.txt (186f5391f1d540f7806a9386b66688f6@127.0.0.1) 2.21ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 973d992df90e4511989a8ba0e2860909 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob WARNING ServerApp:handlers.py:333 delete /foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/a.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/a.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/a.blob (973d992df90e4511989a8ba0e2860909@127.0.0.1) 2.20ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 495603e409ba42caa0e164e232082619 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb WARNING ServerApp:handlers.py:333 delete /foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/b.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/b.ipynb (495603e409ba42caa0e164e232082619@127.0.0.1) 2.62ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: c8c7fbf8bf6a43029b37df427a2c26cc DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt WARNING ServerApp:handlers.py:333 delete /foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/b.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/b.txt (c8c7fbf8bf6a43029b37df427a2c26cc@127.0.0.1) 2.53ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 3f84576dae6047bab0cd142542dc9c70 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob WARNING ServerApp:handlers.py:333 delete /foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/b.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/b.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/b.blob (3f84576dae6047bab0cd142542dc9c70@127.0.0.1) 2.38ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 9aa392fce2e54ef99597e4ea09960e5e DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb WARNING ServerApp:handlers.py:333 delete /foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/name with spaces.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/name%20with%20spaces.ipynb (9aa392fce2e54ef99597e4ea09960e5e@127.0.0.1) 2.38ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: e30dad2c8cb64acf88de3c510483e67d DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt WARNING ServerApp:handlers.py:333 delete /foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/name with spaces.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/name%20with%20spaces.txt (e30dad2c8cb64acf88de3c510483e67d@127.0.0.1) 2.24ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 3af15c817f974c6ca7314199a7227a19 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob WARNING ServerApp:handlers.py:333 delete /foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/name with spaces.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/name with spaces.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/name%20with%20spaces.blob (3af15c817f974c6ca7314199a7227a19@127.0.0.1) 2.24ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: eacf4ac4cf1c452eb98d6c298a2bdeb8 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb WARNING ServerApp:handlers.py:333 delete /foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.ipynb DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/unicodé.ipynb to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/unicod%C3%A9.ipynb (eacf4ac4cf1c452eb98d6c298a2bdeb8@127.0.0.1) 2.41ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 25fb1478c5d44daa98513f0573ef2c10 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt WARNING ServerApp:handlers.py:333 delete /foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.txt DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/unicodé.txt to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/unicod%C3%A9.txt (25fb1478c5d44daa98513f0573ef2c10@127.0.0.1) 2.26ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 6934a100387b454199473dd5de6aac83 DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob WARNING ServerApp:handlers.py:333 delete /foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/unicodé.blob DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/unicodé.blob to trash DEBUG ServerApp:fileio.py:267 Reading path from disk: foo DEBUG ServerApp:log.py:98 204 DELETE /a%40b/api/contents/foo/unicod%C3%A9.blob (6934a100387b454199473dd5de6aac83@127.0.0.1) 2.30ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 2a672f4c83f243288ca70b087cb42dbb DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar WARNING ServerApp:handlers.py:333 delete /foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:fileio.py:267 Reading path from disk: foo/bar DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/foo/bar (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:42229', method='DELETE', uri='/a%40b/api/contents/foo/bar', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 6' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/shutil.py", line 825, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 7' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/handlers.py", line 334, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.9/site-packages/jupyter_core/utils/__init__.py", line 198, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/manager.py", line 899, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/filemanager.py", line 1026, in delete_file send2trash(os_path) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.9/shutil.py", line 832, in move if _destinsrc(src, dst): File "/usr/lib64/python3.9/shutil.py", line 852, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:773 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 6' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/shutil.py", line 825, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_dirs_AsyncFileCont0/root_dir/foo/bar' -> b'/home/tkloczko/.local/share/Trash/files/bar 7' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/handlers.py", line 334, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.9/site-packages/jupyter_core/utils/__init__.py", line 198, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/manager.py", line 899, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/filemanager.py", line 1026, in delete_file send2trash(os_path) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.9/shutil.py", line 832, in move if _destinsrc(src, dst): File "/usr/lib64/python3.9/shutil.py", line 852, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:42229", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/foo/bar (2a672f4c83f243288ca70b087cb42dbb@127.0.0.1) 2.82ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ________________ test_delete_non_empty_dir[FileContentsManager] ________________ jp_fetch = .client_fetch at 0x7fdca4773160> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} @pytest.mark.xfail(sys.platform == "win32", reason="Deleting non-empty dirs on Windows") async def test_delete_non_empty_dir(jp_fetch, contents): # Delete a folder > await jp_fetch("api", "contents", "å b", method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} jp_fetch = .client_fetch at 0x7fdca4773160> tests/services/contents/test_api.py:730: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:45.278 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:36969/a%40b/?token=68b045e6a82d5180559cc0ebdff5eede138039fae251b955 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:36969/a%40b/?token=68b045e6a82d5180559cc0ebdff5eede138039fae251b955 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:36969/a%40b/?token=68b045e6a82d5180559cc0ebdff5eede138039fae251b955 http://127.0.0.1:36969/a%40b/?token=68b045e6a82d5180559cc0ebdff5eede138039fae251b955 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: f0aac6e5d12941108b0b20e4dc49e65a DEBUG ServerApp:fileio.py:267 Reading path from disk: å b WARNING ServerApp:handlers.py:333 delete /å b DEBUG ServerApp:fileio.py:267 Reading path from disk: å b DEBUG ServerApp:fileio.py:267 Reading path from disk: å b DEBUG ServerApp:fileio.py:267 Reading path from disk: å b DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/root_dir/å b to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:36969', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 4' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/shutil.py", line 825, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 5' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/handlers.py", line 334, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/manager.py", line 488, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/filemanager.py", line 561, in delete_file send2trash(os_path) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.9/shutil.py", line 832, in move if _destinsrc(src, dst): File "/usr/lib64/python3.9/shutil.py", line 852, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:773 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 4' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/shutil.py", line 825, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_File0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 5' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/handlers.py", line 334, in delete await ensure_async(cm.delete(path)) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/manager.py", line 488, in delete self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/filemanager.py", line 561, in delete_file send2trash(os_path) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.9/shutil.py", line 832, in move if _destinsrc(src, dst): File "/usr/lib64/python3.9/shutil.py", line 852, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:36969", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/%C3%A5%20b (f0aac6e5d12941108b0b20e4dc49e65a@127.0.0.1) 3.03ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped _____________ test_delete_non_empty_dir[AsyncFileContentsManager] ______________ jp_fetch = .client_fetch at 0x7fdca47e4550> contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} @pytest.mark.xfail(sys.platform == "win32", reason="Deleting non-empty dirs on Windows") async def test_delete_non_empty_dir(jp_fetch, contents): # Delete a folder > await jp_fetch("api", "contents", "å b", method="DELETE") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error contents = {'all': [[PosixPath('inroot.ipynb'), PosixPath('Directory with spaces in/inspace.ipynb'), PosixPath('unicodé/innonasci...nascii.ipynb'), PosixPath('foo/a.ipynb'), PosixPath('foo/b.ipynb'), PosixPath('foo/name with spaces.ipynb'), ...], ...} jp_fetch = .client_fetch at 0x7fdca47e4550> tests/services/contents/test_api.py:730: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:10:45.451 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:36265/a%40b/?token=2c0c2a371dd3501f2800ae9bb14e4caba268a15171e9fe04 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:36265/a%40b/?token=2c0c2a371dd3501f2800ae9bb14e4caba268a15171e9fe04 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:36265/a%40b/?token=2c0c2a371dd3501f2800ae9bb14e4caba268a15171e9fe04 http://127.0.0.1:36265/a%40b/?token=2c0c2a371dd3501f2800ae9bb14e4caba268a15171e9fe04 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: a308e2e5a65c46b2b448f2003e8ee8e2 DEBUG ServerApp:fileio.py:267 Reading path from disk: å b WARNING ServerApp:handlers.py:333 delete /å b DEBUG ServerApp:fileio.py:267 Reading path from disk: å b DEBUG ServerApp:fileio.py:267 Reading path from disk: å b DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/root_dir/å b to trash ERROR ServerApp:web.py:1871 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:36265', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 6' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/shutil.py", line 825, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 7' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/handlers.py", line 334, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.9/site-packages/jupyter_core/utils/__init__.py", line 198, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/manager.py", line 899, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/filemanager.py", line 1026, in delete_file send2trash(os_path) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.9/shutil.py", line 832, in move if _destinsrc(src, dst): File "/usr/lib64/python3.9/shutil.py", line 852, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str WARNING ServerApp:handlers.py:773 wrote error: 'Unhandled error' Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 212, in send2trash trash_move(path_b, dest_trash, topdir) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 120, in trash_move os.rename(src, destpath) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 6' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/shutil.py", line 825, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: b'/tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_dir_Asyn0/root_dir/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 7' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/handlers.py", line 334, in delete await ensure_async(cm.delete(path)) File "/usr/lib/python3.9/site-packages/jupyter_core/utils/__init__.py", line 198, in ensure_async result = await obj File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/manager.py", line 899, in delete await self.delete_file(path) File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/contents/filemanager.py", line 1026, in delete_file send2trash(os_path) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 216, in send2trash trash_move(path_b, HOMETRASH_B, XDG_DATA_HOME, cross_dev=True) File "/usr/lib/python3.9/site-packages/send2trash/plat_other.py", line 118, in trash_move shutil.move(src, destpath) File "/usr/lib64/python3.9/shutil.py", line 832, in move if _destinsrc(src, dst): File "/usr/lib64/python3.9/shutil.py", line 852, in _destinsrc if not src.endswith(os.path.sep): TypeError: endswith first arg must be bytes or a tuple of bytes, not str ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:36265", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 DELETE /a%40b/api/contents/%C3%A5%20b (a308e2e5a65c46b2b448f2003e8ee8e2@127.0.0.1) 3.24ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______ test_delete_non_empty_folder[jp_contents_manager0-True-False-None] ______ delete_to_trash = True, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): > await ensure_async(cm.delete_file(dir)) E Failed: DID NOT RAISE always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = True file_dev = 81 home_dev = 242 jp_contents_manager = tests/services/contents/test_manager.py:799: Failed ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:filemanager.py:491 Saving /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j1/to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:filemanager.py:491 Saving /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j1/to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j1/to_delete to trash ______ test_delete_non_empty_folder[jp_contents_manager1-True-False-None] ______ delete_to_trash = True, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): > await ensure_async(cm.delete_file(dir)) E Failed: DID NOT RAISE always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = True file_dev = 81 home_dev = 242 jp_contents_manager = tests/services/contents/test_manager.py:799: Failed ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:filemanager.py:491 Saving /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j5/to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:filemanager.py:491 Saving /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j5/to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:filemanager.py:559 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j5/to_delete to trash ______ test_delete_non_empty_folder[jp_contents_manager2-True-False-None] ______ delete_to_trash = True, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): > await ensure_async(cm.delete_file(dir)) E Failed: DID NOT RAISE always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = True file_dev = 81 home_dev = 242 jp_contents_manager = tests/services/contents/test_manager.py:799: Failed ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:filemanager.py:952 Saving /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j9/to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:filemanager.py:952 Saving /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j9/to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j9/to_delete to trash ______ test_delete_non_empty_folder[jp_contents_manager3-True-False-None] ______ delete_to_trash = True, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): > await ensure_async(cm.delete_file(dir)) E Failed: DID NOT RAISE always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = True file_dev = 81 home_dev = 242 jp_contents_manager = tests/services/contents/test_manager.py:799: Failed ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:filemanager.py:952 Saving /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j13/to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:filemanager.py:952 Saving /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j13/to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/nb.ipynb DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete/file.txt DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:fileio.py:267 Reading path from disk: to_delete DEBUG ServerApp:filemanager.py:1024 Sending /tmp/pytest-of-tkloczko/pytest-1094/test_delete_non_empty_folder_j13/to_delete to trash ____________________________ test_cull_idle_disable ____________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: E E Traceback (most recent call last): E File "/usr/lib/python3.9/site-packages/traitlets/traitlets.py", line 632, in get E value = obj._trait_values[self.name] E KeyError: 'event_logger' E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/usr/lib64/python3.9/site-packages/yaml/constructor.py", line 48, in get_single_data E node = self.get_single_node() E ResourceWarning: unclosed ihook = item = kwds = {} /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:146: PytestUnraisableExceptionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:11:31.711 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:34267/a%40b/?token=f1c35fac809b50f3e66f9a1d1f183dfcc72f9bb67c8cea84 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:34267/a%40b/?token=f1c35fac809b50f3e66f9a1d1f183dfcc72f9bb67c8cea84 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:34267/a%40b/?token=f1c35fac809b50f3e66f9a1d1f183dfcc72f9bb67c8cea84 http://127.0.0.1:34267/a%40b/?token=f1c35fac809b50f3e66f9a1d1f183dfcc72f9bb67c8cea84 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 6d6e997275dd46f38448e043684e8ce7 DEBUG ServerApp:factory.py:95 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner DEBUG ServerApp:manager.py:438 Starting kernel: ['/usr/bin/python3', '-m', 'ipykernel_launcher', '-f', '/tmp/pytest-of-tkloczko/pytest-1094/test_cull_idle_disable0/runtime/kernel-9e1c4e9a-87d3-48d4-b128-0522ea548ca4.json'] DEBUG ServerApp:connect.py:653 Connecting to: tcp://127.0.0.1:53781 ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=.() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685, ()]> cb=[IOLoop.add_future..() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685]> ERROR asyncio:base_events.py:1753 Task was destroyed but it is pending! task: wait_for=.() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685, ()]> cb=[IOLoop.add_future..() at /usr/lib64/python3.9/site-packages/tornado/ioloop.py:685]> DEBUG ServerApp:connect.py:653 Connecting to: tcp://127.0.0.1:37617 INFO ServerApp:kernelmanager.py:244 Kernel started: 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:kernelmanager.py:245 Kernel args: {'kernel_name': 'python3'} DEBUG ServerApp:log.py:98 201 POST /a%40b/api/kernels (6d6e997275dd46f38448e043684e8ce7@127.0.0.1) 46.08ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: dbf7c9713f544a2b84047e53164f4c4a WARNING ServerApp:websocket.py:55 No session ID specified DEBUG ServerApp:channels.py:580 Requesting kernel info from 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:connect.py:653 Connecting to: tcp://127.0.0.1:41079 DEBUG ServerApp:channels.py:610 Received kernel info: {'status': 'ok', 'protocol_version': '5.3', 'implementation': 'ipython', 'implementation_version': '8.13.1', 'language_info': {'name': 'python', 'version': '3.9.18', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': "Python 3.9.18 (main, Mar 8 2024, 09:04:18) \nType 'copyright', 'credits' or 'license' for more information\nIPython 8.13.1 -- An enhanced Interactive Python. Type '?' for help.\n", 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.9'}, {'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/'}]} DEBUG ServerApp:log.py:98 101 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4/channels (dbf7c9713f544a2b84047e53164f4c4a@127.0.0.1) 550.69ms DEBUG ServerApp:websocket.py:126 Opening websocket /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4/channels INFO ServerApp:websocket.py:74 Connecting to kernel 9e1c4e9a-87d3-48d4-b128-0522ea548ca4. DEBUG ServerApp:kernelmanager.py:374 Getting buffer for 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:connect.py:653 Connecting to: tcp://127.0.0.1:37617 DEBUG ServerApp:connect.py:653 Connecting to: tcp://127.0.0.1:41079 DEBUG ServerApp:connect.py:653 Connecting to: tcp://127.0.0.1:53781 DEBUG ServerApp:connect.py:653 Connecting to: tcp://127.0.0.1:56165 DEBUG ServerApp:connect.py:653 Connecting to: tcp://127.0.0.1:41079 DEBUG ServerApp:connect.py:653 Connecting to: tcp://127.0.0.1:53781 DEBUG ServerApp:channels.py:260 Nudge: attempt 1 on kernel 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: d553fabeb3634678b85839a4edcbf5b0 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (d553fabeb3634678b85839a4edcbf5b0@127.0.0.1) 2.04ms DEBUG ServerApp:channels.py:225 Nudge: IOPub received: 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:channels.py:228 Nudge: resolving iopub future: 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:kernelmanager.py:563 activity on 9e1c4e9a-87d3-48d4-b128-0522ea548ca4: status (busy) DEBUG ServerApp:kernelmanager.py:563 activity on 9e1c4e9a-87d3-48d4-b128-0522ea548ca4: status (busy) DEBUG ServerApp:kernelmanager.py:563 activity on 9e1c4e9a-87d3-48d4-b128-0522ea548ca4: status (idle) DEBUG ServerApp:channels.py:211 Nudge: shell info reply received: 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:channels.py:213 Nudge: resolving shell future: 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:channels.py:218 Nudge: control info reply received: 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:kernelmanager.py:563 activity on 9e1c4e9a-87d3-48d4-b128-0522ea548ca4: status (idle) DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 4fae18c30e104a5e8346468a1a6a68a5 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (4fae18c30e104a5e8346468a1a6a68a5@127.0.0.1) 1.16ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 006364bdeecd420da9037e11872a0915 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (006364bdeecd420da9037e11872a0915@127.0.0.1) 1.41ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 6e080fcb20724cbc812296ddce6274f0 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (6e080fcb20724cbc812296ddce6274f0@127.0.0.1) 2.54ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 68ae2034588a4162a5264412ca30adc1 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (68ae2034588a4162a5264412ca30adc1@127.0.0.1) 2.83ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 6ce944e29fe247cf9af36f7bc94f2b7a DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (6ce944e29fe247cf9af36f7bc94f2b7a@127.0.0.1) 2.82ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: e0643c78163f475babda6c6cf918b4d5 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (e0643c78163f475babda6c6cf918b4d5@127.0.0.1) 2.85ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 8da6e4cef82a470b9377f3f063693099 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (8da6e4cef82a470b9377f3f063693099@127.0.0.1) 2.81ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 05c3e9e4c3954fbebee6a612e660e04e DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (05c3e9e4c3954fbebee6a612e660e04e@127.0.0.1) 2.82ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 94fa59297ab94dcb8de24b70b7b9738d DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (94fa59297ab94dcb8de24b70b7b9738d@127.0.0.1) 2.84ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: b4b9b73ebf54458ca2f28db09432ecf2 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (b4b9b73ebf54458ca2f28db09432ecf2@127.0.0.1) 2.79ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: a2bbfce192c749a7b6736cd087f4cd8c DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (a2bbfce192c749a7b6736cd087f4cd8c@127.0.0.1) 2.82ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: f8fdea844dde4dc5a3865e570a048a99 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (f8fdea844dde4dc5a3865e570a048a99@127.0.0.1) 2.83ms DEBUG ServerApp:channels.py:400 Websocket closed 9e1c4e9a-87d3-48d4-b128-0522ea548ca4:88cdd652-2c2f404a2674393f895a870f INFO ServerApp:kernelmanager.py:343 Starting buffering for 9e1c4e9a-87d3-48d4-b128-0522ea548ca4:88cdd652-2c2f404a2674393f895a870f DEBUG ServerApp:kernelmanager.py:395 Clearing buffer for 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: b07cca996983443db08fac4a2966db6e DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (b07cca996983443db08fac4a2966db6e@127.0.0.1) 2.77ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 8217e1efb97e458fbb9936a18d6d0698 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (8217e1efb97e458fbb9936a18d6d0698@127.0.0.1) 2.83ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: e5555b1bf530415bab372737cc48e2c0 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (e5555b1bf530415bab372737cc48e2c0@127.0.0.1) 2.79ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 911d449dc77f4ab6a5dac48a127d80ca DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (911d449dc77f4ab6a5dac48a127d80ca@127.0.0.1) 2.80ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 144a0d689685429c8ec494434186cb61 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (144a0d689685429c8ec494434186cb61@127.0.0.1) 2.83ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: e26a4df19669476a84b0a2c6f3d63d7b DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (e26a4df19669476a84b0a2c6f3d63d7b@127.0.0.1) 2.79ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: ef54aa74936a41728a0c8d9bcf33ee3f DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (ef54aa74936a41728a0c8d9bcf33ee3f@127.0.0.1) 2.78ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 76b8d9812ebd4b38893f38118770bc85 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (76b8d9812ebd4b38893f38118770bc85@127.0.0.1) 2.83ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: bc277440c2dd4f898398898f0cadf333 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (bc277440c2dd4f898398898f0cadf333@127.0.0.1) 2.79ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 9244fbbc49f04e4e9ece0982ae850795 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (9244fbbc49f04e4e9ece0982ae850795@127.0.0.1) 2.79ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 9fb06b2f0e0c467c895f0486b87c854f DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (9fb06b2f0e0c467c895f0486b87c854f@127.0.0.1) 2.80ms DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: cf96f14f0eea4beba59bb76725c10539 DEBUG ServerApp:log.py:98 200 GET /a%40b/api/kernels/9e1c4e9a-87d3-48d4-b128-0522ea548ca4 (cf96f14f0eea4beba59bb76725c10539@127.0.0.1) 2.84ms ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped INFO ServerApp:serverapp.py:2775 Shutting down 1 kernel DEBUG ServerApp:kernelmanager.py:395 Clearing buffer for 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 INFO ServerApp:multikernelmanager.py:306 Kernel shutdown: 9e1c4e9a-87d3-48d4-b128-0522ea548ca4 ______________________________ test_list_formats _______________________________ jp_fetch = .client_fetch at 0x7fdc9fb733a0> async def test_list_formats(jp_fetch): > r = await jp_fetch("api", "nbconvert", method="GET") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7fdc9fb733a0> tests/services/nbconvert/test_api.py:5: HTTPClientError ---------------------------- Captured stderr setup ----------------------------- [D 2024-03-22 20:11:46.774 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:97 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3003 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/root_dir INFO ServerApp:serverapp.py:3003 Jupyter Server 2.13.0 is running at: INFO ServerApp:serverapp.py:3003 http://localhost:36679/a%40b/?token=34737ca4833f0940e459bc56bce1cb7a310f52346ce0bf98 INFO ServerApp:serverapp.py:3003 http://127.0.0.1:36679/a%40b/?token=34737ca4833f0940e459bc56bce1cb7a310f52346ce0bf98 INFO ServerApp:serverapp.py:3004 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3066 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-1094/test_list_formats0/runtime/jpserver-2341788-open.html Or copy and paste one of these URLs: http://localhost:36679/a%40b/?token=34737ca4833f0940e459bc56bce1cb7a310f52346ce0bf98 http://127.0.0.1:36679/a%40b/?token=34737ca4833f0940e459bc56bce1cb7a310f52346ce0bf98 ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:identity.py:444 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:475 Generating new user for token-authenticated request: 5336f97257d64d44bed0ddc168c0c0dd WARNING ServerApp:web.py:1869 500 GET /a%40b/api/nbconvert (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' WARNING ServerApp:handlers.py:773 wrote error: "Could not import nbconvert: No module named 'nbconvert'" Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/nbconvert/handlers.py", line 34, in get from nbconvert.exporters import base ModuleNotFoundError: No module named 'nbconvert' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.13.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/jupyter_server/services/nbconvert/handlers.py", line 36, in get raise web.HTTPError(500, "Could not import nbconvert: %s" % e) from e tornado.web.HTTPError: HTTP 500: Internal Server Error (Could not import nbconvert: No module named 'nbconvert') ERROR ServerApp:log.py:97 { "Host": "127.0.0.1:36679", "User-Agent": "Tornado/6.3.3" } ERROR ServerApp:log.py:98 500 GET /a%40b/api/nbconvert (5336f97257d64d44bed0ddc168c0c0dd@127.0.0.1) 2.24ms referer=None ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2786 Shutting down 1 extension DEBUG ServerApp:manager.py:372 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:374 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ===Flaky Test Report=== test_connection[jp_server_config0] failed (1 runs remaining out of 2). assert 1 == 0 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_connection[jp_server_config0] passed 1 out of the required 1 times. Success! test_connection[jp_server_config1] passed 1 out of the required 1 times. Success! test_connection[jp_server_config2] passed 1 out of the required 1 times. Success! test_restart_kernel[jp_server_config0] passed 1 out of the required 1 times. Success! test_restart_kernel[jp_server_config1] passed 1 out of the required 1 times. Success! test_restart_kernel[jp_server_config2] failed (1 runs remaining out of 2). Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.9/site-packages/tornado/simple_httpclient.py", line 167, in fetch_impl assert request.connect_timeout is not None ResourceWarning: unclosed [, , , , , , , , , , , ] test_restart_kernel[jp_server_config2] passed 1 out of the required 1 times. Success! test_restart_kernel[jp_server_config3] failed (1 runs remaining out of 2). Exception ignored in: Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/traitlets/traitlets.py", line 1241, in __call__ return self.func(*args, **kwargs) ResourceWarning: unclosed [, , , , , , , , , , , ] test_restart_kernel[jp_server_config3] passed 1 out of the required 1 times. Success! test_culling_config passed 1 out of the required 1 times. Success! test_culling passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ```
kloczek commented 5 months ago

Any pdate? 🤔

Just tested 2.14.1

Here is pytest output: ```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.14.1-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.14.1-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.10.14, pytest-8.2.2, pluggy-1.5.0 rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_server-2.14.1 configfile: pyproject.toml testpaths: tests/ plugins: anyio-4.4.0, timeout-2.3.1, console-scripts-1.4.1, flaky-3.8.1 timeout: 100.0s timeout method: thread timeout func_only: False collected 1000 items tests/auth/test_authorizer.py ...............F............................................... [ 6%] tests/auth/test_identity.py .................... [ 8%] tests/auth/test_legacy_login.py .................. [ 10%] tests/auth/test_login.py ............... [ 11%] tests/auth/test_security.py .... [ 12%] tests/auth/test_utils.py ............ [ 13%] tests/base/test_call_context.py .... [ 13%] tests/base/test_handlers.py ............ [ 14%] tests/base/test_websocket.py ........ [ 15%] tests/extension/test_app.py ................ [ 17%] tests/extension/test_config.py . [ 17%] tests/extension/test_entrypoint.py . [ 17%] tests/extension/test_handler.py ....... [ 18%] tests/extension/test_launch.py ... [ 18%] tests/extension/test_manager.py ............... [ 19%] tests/extension/test_serverextension.py ....... [ 20%] tests/extension/test_utils.py ... [ 20%] tests/nbconvert/test_handlers.py FFFFFF [ 21%] tests/services/api/test_api.py .............. [ 22%] tests/services/config/test_api.py ... [ 23%] tests/services/contents/test_api.py ................................................................................................................................................. [ 37%] ......................................................................................................................................... [ 51%] tests/services/contents/test_checkpoints.py ............ [ 52%] tests/services/contents/test_config.py ..... [ 53%] tests/services/contents/test_fileio.py ........ [ 53%] tests/services/contents/test_largefilemanager.py .............. [ 55%] tests/services/contents/test_manager.py ...................................................F...F...F...F.......................................... [ 65%] tests/services/contents/test_manager_no_hash.py . [ 66%] tests/services/events/test_api.py ......... [ 66%] tests/services/events/test_extension.py . [ 67%] tests/services/kernels/test_api.py ..................... [ 69%] tests/services/kernels/test_config.py ... [ 69%] tests/services/kernels/test_connection.py . [ 69%] tests/services/kernels/test_cull.py .... [ 69%] tests/services/kernels/test_events.py ............ [ 71%] tests/services/kernelspecs/test_api.py ...... [ 71%] tests/services/nbconvert/test_api.py F [ 71%] tests/services/sessions/test_api.py ............................................................ [ 77%] tests/services/sessions/test_manager.py ................ [ 79%] tests/test_config_manager.py . [ 79%] tests/test_files.py .................... [ 81%] tests/test_gateway.py ........................... [ 84%] tests/test_paths.py ...... [ 84%] tests/test_serialize.py .. [ 85%] tests/test_serverapp.py ..................................................................................... [ 93%] tests/test_terminal.py ....ss..... [ 94%] tests/test_traittypes.py ........... [ 95%] tests/test_utils.py ...................... [ 97%] tests/test_version.py ........ [ 98%] tests/test_view.py .... [ 99%] tests/unix_sockets/test_api.py .. [ 99%] tests/unix_sockets/test_serverapp_integration.py sssssss [100%] ========================================================================================= FAILURES ========================================================================================== __________________________________________________________________ test_authorized_requests[True-GET-/api/nbconvert-None] ___________________________________________________________________ request = >, io_loop = send_request = ._ at 0x7f74f540c5e0>, tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15') jp_serverapp = , method = 'GET', url = '/api/nbconvert', body = None, allowed = True @pytest.mark.parametrize("method, url, body", HTTP_REQUESTS_PARAMETRIZED) @pytest.mark.parametrize("allowed", (True, False)) async def test_authorized_requests( request, io_loop, send_request, tmp_path, jp_serverapp, method, url, body, allowed, ): # Setup stuff for the Contents API # Add a notebook on disk contents_dir = tmp_path / jp_serverapp.root_dir p = contents_dir / "dir_for_testing" p.mkdir(parents=True, exist_ok=True) # Create a notebook nb = writes(new_notebook(), version=4) nbname = p.joinpath("nb_for_testing.ipynb") nbname.write_text(nb, encoding="utf-8") # Setup nbpath = "dir_for_testing/nb_for_testing.ipynb" kernelspec = NATIVE_KERNEL_NAME km = jp_serverapp.kernel_manager if "session" in url: session_model = await jp_serverapp.session_manager.create_session(path="foo") session_id = session_model["id"] if "kernel" in url: if os.name == "nt": pytest.skip("Test hangs on Windows") kernel_id = await km.start_kernel() kernel = km.get_kernel(kernel_id) # kernels take a moment to be ready # wait for it to respond kc = kernel.client() kc.start_channels() await kc.wait_for_ready() kc.stop_channels() if "terminal" in url: term_manager = jp_serverapp.web_app.settings["terminal_manager"] term_model = term_manager.create() term_name = term_model["name"] url = url.format(**locals()) if allowed: # Create a server with full permissions permissions = { "actions": ["read", "write", "execute"], "resources": [ "contents", "kernels", "kernelspecs", "nbconvert", "sessions", "api", "config", "csp", "server", "terminals", ], } expected_codes = {200, 201, 204, None} # Websockets don't return a code else: permissions = {"actions": [], "resources": []} expected_codes = {403} jp_serverapp.authorizer.permissions = permissions code = await send_request(url, body=body, method=method) > assert code in expected_codes E assert 500 in {200, 201, None, 204} allowed = True body = None code = 500 contents_dir = PosixPath('/tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/root_dir') expected_codes = {200, 201, None, 204} io_loop = jp_serverapp = kernelspec = 'python3' km = method = 'GET' nb = '{\n "cells": [],\n "metadata": {},\n "nbformat": 4,\n "nbformat_minor": 5\n}' nbname = PosixPath('/tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/root_dir/dir_for_testing/nb_for_testing.ipynb') nbpath = 'dir_for_testing/nb_for_testing.ipynb' p = PosixPath('/tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/root_dir/dir_for_testing') permissions = {'actions': ['read', 'write', 'execute'], 'resources': ['contents', 'kernels', 'kernelspecs', 'nbconvert', 'sessions', 'api', ...]} request = > send_request = ._ at 0x7f74f540c5e0> tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15') url = '/api/nbconvert' tests/auth/test_authorizer.py:226: AssertionError ----------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------- [D 2024-06-12 21:44:33.567 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------------------------------------------------------------ Captured log setup ------------------------------------------------------------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3004 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/root_dir INFO ServerApp:serverapp.py:3004 Jupyter Server 2.14.1 is running at: INFO ServerApp:serverapp.py:3004 http://localhost:44365/a%40b/?token=94ceccebe25b32abddb644c056ab1577357446a619287128 INFO ServerApp:serverapp.py:3004 http://127.0.0.1:44365/a%40b/?token=94ceccebe25b32abddb644c056ab1577357446a619287128 INFO ServerApp:serverapp.py:3005 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3067 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-351/test_authorized_requests_True_15/runtime/jpserver-3943990-open.html Or copy and paste one of these URLs: http://localhost:44365/a%40b/?token=94ceccebe25b32abddb644c056ab1577357446a619287128 http://127.0.0.1:44365/a%40b/?token=94ceccebe25b32abddb644c056ab1577357446a619287128 ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ HTTPClientError (500): HTTP 500: Internal Server Error ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: ffdb21fb52ba44c0b4f733f2e9d95e0e WARNING ServerApp:web.py:1868 500 GET /a%40b/api/nbconvert (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' WARNING ServerApp:handlers.py:774 wrote error: "Could not import nbconvert: No module named 'nbconvert'" Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.14.1-2.fc37.x86_64/usr/lib/python3.10/site-packages/jupyter_server/services/nbconvert/handlers.py", line 35, in get from nbconvert.exporters import base ModuleNotFoundError: No module named 'nbconvert' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib64/python3.10/site-packages/tornado/web.py", line 1785, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.14.1-2.fc37.x86_64/usr/lib/python3.10/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.14.1-2.fc37.x86_64/usr/lib/python3.10/site-packages/jupyter_server/services/nbconvert/handlers.py", line 37, in get raise web.HTTPError(500, "Could not import nbconvert: %s" % e) from e tornado.web.HTTPError: HTTP 500: Internal Server Error (Could not import nbconvert: No module named 'nbconvert') ERROR ServerApp:log.py:98 { "Host": "127.0.0.1:44365", "User-Agent": "Tornado/6.4.1" } ERROR ServerApp:log.py:99 500 GET /a%40b/api/nbconvert (ffdb21fb52ba44c0b4f733f2e9d95e0e@127.0.0.1) 4.61ms referer=None ----------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------- INFO ServerApp:serverapp.py:2787 Shutting down 1 extension DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________________________________________________________________ test_from_file _______________________________________________________________________________________ jp_fetch = .client_fetch at 0x7f74f5a48e50>, notebook = None async def test_from_file(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "html", "foo", "testnb.ipynb", method="GET", params={"download": False}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7f74f5a48e50> notebook = None tests/nbconvert/test_handlers.py:49: HTTPClientError ----------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------- [D 2024-06-12 21:45:09.509 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------------------------------------------------------------ Captured log setup ------------------------------------------------------------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-351/test_from_file0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_file0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_file0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3004 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-351/test_from_file0/root_dir INFO ServerApp:serverapp.py:3004 Jupyter Server 2.14.1 is running at: INFO ServerApp:serverapp.py:3004 http://localhost:40615/a%40b/?token=5928a8e5f6999aac51926604c464c9d4086aa3108b289068 INFO ServerApp:serverapp.py:3004 http://127.0.0.1:40615/a%40b/?token=5928a8e5f6999aac51926604c464c9d4086aa3108b289068 INFO ServerApp:serverapp.py:3005 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3067 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-351/test_from_file0/runtime/jpserver-3943990-open.html Or copy and paste one of these URLs: http://localhost:40615/a%40b/?token=5928a8e5f6999aac51926604c464c9d4086aa3108b289068 http://127.0.0.1:40615/a%40b/?token=5928a8e5f6999aac51926604c464c9d4086aa3108b289068 ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: e46c57dcb1ea402783833f651ed32e63 WARNING ServerApp:web.py:1868 500 GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:327 Using contents: services/contents DEBUG ServerApp:handlers.py:327 Using contents: services/contents ERROR ServerApp:log.py:98 { "Host": "127.0.0.1:40615", "User-Agent": "Tornado/6.4.1" } ERROR ServerApp:log.py:99 500 GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (e46c57dcb1ea402783833f651ed32e63@127.0.0.1) 18.64ms referer=None ----------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------- INFO ServerApp:serverapp.py:2787 Shutting down 1 extension DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ____________________________________________________________________________________ test_from_file_404 _____________________________________________________________________________________ jp_fetch = .client_fetch at 0x7f74f5a4b400>, notebook = None async def test_from_file_404(jp_fetch, notebook): with pytest.raises(HTTPClientError) as e: await jp_fetch( "nbconvert", "html", "foo", "thisdoesntexist.ipynb", method="GET", params={"download": False}, ) > assert expected_http_error(e, 404) E assert False E + where False = expected_http_error(, 404) e = jp_fetch = .client_fetch at 0x7f74f5a4b400> notebook = None tests/nbconvert/test_handlers.py:87: AssertionError ----------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------- [D 2024-06-12 21:45:09.584 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------------------------------------------------------------ Captured log setup ------------------------------------------------------------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3004 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/root_dir INFO ServerApp:serverapp.py:3004 Jupyter Server 2.14.1 is running at: INFO ServerApp:serverapp.py:3004 http://localhost:45287/a%40b/?token=da5d9e61a17acf087722939bba2293cb52cc99ac8d1d3fa7 INFO ServerApp:serverapp.py:3004 http://127.0.0.1:45287/a%40b/?token=da5d9e61a17acf087722939bba2293cb52cc99ac8d1d3fa7 INFO ServerApp:serverapp.py:3005 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3067 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-351/test_from_file_4040/runtime/jpserver-3943990-open.html Or copy and paste one of these URLs: http://localhost:45287/a%40b/?token=da5d9e61a17acf087722939bba2293cb52cc99ac8d1d3fa7 http://127.0.0.1:45287/a%40b/?token=da5d9e61a17acf087722939bba2293cb52cc99ac8d1d3fa7 ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: 46ba411957044a589b62c87584474df7 WARNING ServerApp:web.py:1868 500 GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:327 Using contents: services/contents DEBUG ServerApp:handlers.py:327 Using contents: services/contents ERROR ServerApp:log.py:98 { "Host": "127.0.0.1:45287", "User-Agent": "Tornado/6.4.1" } ERROR ServerApp:log.py:99 500 GET /a%40b/nbconvert/html/foo/thisdoesntexist.ipynb?download=False (46ba411957044a589b62c87584474df7@127.0.0.1) 18.17ms referer=None ----------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------- INFO ServerApp:serverapp.py:2787 Shutting down 1 extension DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped __________________________________________________________________________________ test_from_file_download __________________________________________________________________________________ jp_fetch = .client_fetch at 0x7f74f5a749d0>, notebook = None async def test_from_file_download(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "python", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7f74f5a749d0> notebook = None tests/nbconvert/test_handlers.py:91: HTTPClientError ----------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------- [D 2024-06-12 21:45:09.657 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------------------------------------------------------------ Captured log setup ------------------------------------------------------------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3004 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/root_dir INFO ServerApp:serverapp.py:3004 Jupyter Server 2.14.1 is running at: INFO ServerApp:serverapp.py:3004 http://localhost:43399/a%40b/?token=afdb6508bde67f82b6cc8706653f1fd0a084e9bfc3563a8d INFO ServerApp:serverapp.py:3004 http://127.0.0.1:43399/a%40b/?token=afdb6508bde67f82b6cc8706653f1fd0a084e9bfc3563a8d INFO ServerApp:serverapp.py:3005 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3067 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-351/test_from_file_download0/runtime/jpserver-3943990-open.html Or copy and paste one of these URLs: http://localhost:43399/a%40b/?token=afdb6508bde67f82b6cc8706653f1fd0a084e9bfc3563a8d http://127.0.0.1:43399/a%40b/?token=afdb6508bde67f82b6cc8706653f1fd0a084e9bfc3563a8d ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: c1b4acd8e80640fc96e3a8f689510c7f WARNING ServerApp:web.py:1868 500 GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:327 Using contents: services/contents DEBUG ServerApp:handlers.py:327 Using contents: services/contents ERROR ServerApp:log.py:98 { "Host": "127.0.0.1:43399", "User-Agent": "Tornado/6.4.1" } ERROR ServerApp:log.py:99 500 GET /a%40b/nbconvert/python/foo/testnb.ipynb?download=True (c1b4acd8e80640fc96e3a8f689510c7f@127.0.0.1) 18.12ms referer=None ----------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------- INFO ServerApp:serverapp.py:2787 Shutting down 1 extension DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ____________________________________________________________________________________ test_from_file_zip _____________________________________________________________________________________ jp_fetch = .client_fetch at 0x7f74f5a76200>, notebook = None async def test_from_file_zip(jp_fetch, notebook): > r = await jp_fetch( "nbconvert", "latex", "foo", "testnb.ipynb", method="GET", params={"download": True}, ) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7f74f5a76200> notebook = None tests/nbconvert/test_handlers.py:105: HTTPClientError ----------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------- [D 2024-06-12 21:45:09.731 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------------------------------------------------------------ Captured log setup ------------------------------------------------------------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3004 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/root_dir INFO ServerApp:serverapp.py:3004 Jupyter Server 2.14.1 is running at: INFO ServerApp:serverapp.py:3004 http://localhost:36803/a%40b/?token=4674c19e9cded1ad7c3fc9e17828db73f7f7a88e20184eec INFO ServerApp:serverapp.py:3004 http://127.0.0.1:36803/a%40b/?token=4674c19e9cded1ad7c3fc9e17828db73f7f7a88e20184eec INFO ServerApp:serverapp.py:3005 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3067 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-351/test_from_file_zip0/runtime/jpserver-3943990-open.html Or copy and paste one of these URLs: http://localhost:36803/a%40b/?token=4674c19e9cded1ad7c3fc9e17828db73f7f7a88e20184eec http://127.0.0.1:36803/a%40b/?token=4674c19e9cded1ad7c3fc9e17828db73f7f7a88e20184eec ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: 131a26fa017e425bb43221bdac503de6 WARNING ServerApp:web.py:1868 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:327 Using contents: services/contents DEBUG ServerApp:handlers.py:327 Using contents: services/contents ERROR ServerApp:log.py:98 { "Host": "127.0.0.1:36803", "User-Agent": "Tornado/6.4.1" } ERROR ServerApp:log.py:99 500 GET /a%40b/nbconvert/latex/foo/testnb.ipynb?download=True (131a26fa017e425bb43221bdac503de6@127.0.0.1) 18.05ms referer=None ----------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------- INFO ServerApp:serverapp.py:2787 Shutting down 1 extension DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ______________________________________________________________________________________ test_from_post _______________________________________________________________________________________ jp_fetch = .client_fetch at 0x7f74f5a77ac0>, notebook = None async def test_from_post(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "html", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7f74f5a77ac0> nbmodel = {'content': {'cells': [{'cell_type': 'markdown', 'id': 'beb85319', 'metadata': {}, 'source': 'Created by test ³'}, {'c...{}, 'nbformat': 4, 'nbformat_minor': 5}, 'created': '2024-06-12T21:45:09.838315Z', 'format': 'json', 'hash': None, ...} notebook = None r = HTTPResponse(_body=b'{"name": "testnb.ipynb", "path": "foo/testnb.ipynb", "last_modified": "2024-06-12T21:45:09.838315...ent.HTTPRequest object at 0x7f74f5c797b0>,request_time=0.008157014846801758,start_time=1718228709.8399491,time_info={}) tests/nbconvert/test_handlers.py:124: HTTPClientError ----------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------- [D 2024-06-12 21:45:09.803 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------------------------------------------------------------ Captured log setup ------------------------------------------------------------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-351/test_from_post0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_post0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_post0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3004 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/root_dir INFO ServerApp:serverapp.py:3004 Jupyter Server 2.14.1 is running at: INFO ServerApp:serverapp.py:3004 http://localhost:34065/a%40b/?token=da24d09745a91a17f01ea732e30bb7f78fbecd7a52fea38b INFO ServerApp:serverapp.py:3004 http://127.0.0.1:34065/a%40b/?token=da24d09745a91a17f01ea732e30bb7f78fbecd7a52fea38b INFO ServerApp:serverapp.py:3005 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3067 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-351/test_from_post0/runtime/jpserver-3943990-open.html Or copy and paste one of these URLs: http://localhost:34065/a%40b/?token=da24d09745a91a17f01ea732e30bb7f78fbecd7a52fea38b http://127.0.0.1:34065/a%40b/?token=da24d09745a91a17f01ea732e30bb7f78fbecd7a52fea38b ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: dfbb178e93c44b20ab0c536fc8f7e545 INFO ServerApp:sign.py:430 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-351/test_from_post0/data/notebook_secret WARNING ServerApp:manager.py:741 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:99 200 GET /a%40b/api/contents/foo/testnb.ipynb (dfbb178e93c44b20ab0c536fc8f7e545@127.0.0.1) 5.59ms DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: 8b6bbbcb35104856be13c2922d7ed508 WARNING ServerApp:web.py:1868 500 POST /a%40b/nbconvert/html (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:327 Using contents: services/contents DEBUG ServerApp:handlers.py:327 Using contents: services/contents ERROR ServerApp:log.py:98 { "Host": "127.0.0.1:34065", "User-Agent": "Tornado/6.4.1" } ERROR ServerApp:log.py:99 500 POST /a%40b/nbconvert/html (8b6bbbcb35104856be13c2922d7ed508@127.0.0.1) 18.10ms referer=None ----------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------- INFO ServerApp:serverapp.py:2787 Shutting down 1 extension DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ____________________________________________________________________________________ test_from_post_zip _____________________________________________________________________________________ jp_fetch = .client_fetch at 0x7f74f5aa0160>, notebook = None async def test_from_post_zip(jp_fetch, notebook): r = await jp_fetch( "api/contents/foo/testnb.ipynb", method="GET", ) nbmodel = json.loads(r.body.decode()) > r = await jp_fetch("nbconvert", "latex", method="POST", body=json.dumps(nbmodel)) E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7f74f5aa0160> nbmodel = {'content': {'cells': [{'cell_type': 'markdown', 'id': '4b56a726', 'metadata': {}, 'source': 'Created by test ³'}, {'c...{}, 'nbformat': 4, 'nbformat_minor': 5}, 'created': '2024-06-12T21:45:09.920316Z', 'format': 'json', 'hash': None, ...} notebook = None r = HTTPResponse(_body=b'{"name": "testnb.ipynb", "path": "foo/testnb.ipynb", "last_modified": "2024-06-12T21:45:09.920316...ent.HTTPRequest object at 0x7f74f5a8b280>,request_time=0.007751941680908203,start_time=1718228709.9218702,time_info={}) tests/nbconvert/test_handlers.py:143: HTTPClientError ----------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------- [D 2024-06-12 21:45:09.884 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------------------------------------------------------------ Captured log setup ------------------------------------------------------------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3004 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/root_dir INFO ServerApp:serverapp.py:3004 Jupyter Server 2.14.1 is running at: INFO ServerApp:serverapp.py:3004 http://localhost:43751/a%40b/?token=e142455be52f493981f510b054b41ecc3e8317eaa412d4d3 INFO ServerApp:serverapp.py:3004 http://127.0.0.1:43751/a%40b/?token=e142455be52f493981f510b054b41ecc3e8317eaa412d4d3 INFO ServerApp:serverapp.py:3005 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3067 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/runtime/jpserver-3943990-open.html Or copy and paste one of these URLs: http://localhost:43751/a%40b/?token=e142455be52f493981f510b054b41ecc3e8317eaa412d4d3 http://127.0.0.1:43751/a%40b/?token=e142455be52f493981f510b054b41ecc3e8317eaa412d4d3 ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: 7aa0232ec32342718224115e76395f96 INFO ServerApp:sign.py:430 Writing notebook-signing key to /tmp/pytest-of-tkloczko/pytest-351/test_from_post_zip0/data/notebook_secret WARNING ServerApp:manager.py:741 Notebook foo/testnb.ipynb is not trusted DEBUG ServerApp:log.py:99 200 GET /a%40b/api/contents/foo/testnb.ipynb (7aa0232ec32342718224115e76395f96@127.0.0.1) 5.22ms DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: 9446d829ba8c4377a96bc850a843341f WARNING ServerApp:web.py:1868 500 POST /a%40b/nbconvert/latex (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' DEBUG ServerApp:handlers.py:327 Using contents: services/contents DEBUG ServerApp:handlers.py:327 Using contents: services/contents ERROR ServerApp:log.py:98 { "Host": "127.0.0.1:43751", "User-Agent": "Tornado/6.4.1" } ERROR ServerApp:log.py:99 500 POST /a%40b/nbconvert/latex (9446d829ba8c4377a96bc850a843341f@127.0.0.1) 17.78ms referer=None ----------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------- INFO ServerApp:serverapp.py:2787 Shutting down 1 extension DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ____________________________________________________________ test_delete_non_empty_folder[jp_contents_manager0-True-False-None] _____________________________________________________________ delete_to_trash = True, always_delete = False, error = True, jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: > with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): E Failed: DID NOT RAISE always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = True file_dev = 211 home_dev = 102 jp_contents_manager = tests/services/contents/test_manager.py:795: Failed ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:filemanager.py:493 Saving /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j1/to_delete/nb.ipynb DEBUG ServerApp:filemanager.py:493 Saving /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j1/to_delete/file.txt DEBUG ServerApp:filemanager.py:561 Sending /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j1/to_delete to trash ____________________________________________________________ test_delete_non_empty_folder[jp_contents_manager1-True-False-None] _____________________________________________________________ delete_to_trash = True, always_delete = False, error = True, jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: > with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): E Failed: DID NOT RAISE always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = True file_dev = 211 home_dev = 102 jp_contents_manager = tests/services/contents/test_manager.py:795: Failed ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:filemanager.py:493 Saving /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j5/to_delete/nb.ipynb DEBUG ServerApp:filemanager.py:493 Saving /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j5/to_delete/file.txt DEBUG ServerApp:filemanager.py:561 Sending /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j5/to_delete to trash ____________________________________________________________ test_delete_non_empty_folder[jp_contents_manager2-True-False-None] _____________________________________________________________ delete_to_trash = True, always_delete = False, error = True, jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: > with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): E Failed: DID NOT RAISE always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = True file_dev = 211 home_dev = 102 jp_contents_manager = tests/services/contents/test_manager.py:795: Failed ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:filemanager.py:956 Saving /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j9/to_delete/nb.ipynb DEBUG ServerApp:filemanager.py:956 Saving /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j9/to_delete/file.txt DEBUG ServerApp:filemanager.py:1028 Sending /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j9/to_delete to trash ____________________________________________________________ test_delete_non_empty_folder[jp_contents_manager3-True-False-None] _____________________________________________________________ delete_to_trash = True, always_delete = False, error = True, jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" await make_populated_dir(cm, dir) await check_populated_dir_files(cm, dir) if error is None: error = False if sys.platform == "win32": error = True elif sys.platform == "linux": file_dev = os.stat(cm.root_dir).st_dev home_dev = os.stat(os.path.expanduser("~")).st_dev error = file_dev != home_dev if error: > with pytest.raises( HTTPError, match=r"HTTP 400: Bad Request \(Directory .*?to_delete not empty\)", ): E Failed: DID NOT RAISE always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = True file_dev = 211 home_dev = 102 jp_contents_manager = tests/services/contents/test_manager.py:795: Failed ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:filemanager.py:956 Saving /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j13/to_delete/nb.ipynb DEBUG ServerApp:filemanager.py:956 Saving /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j13/to_delete/file.txt DEBUG ServerApp:filemanager.py:1028 Sending /tmp/pytest-of-tkloczko/pytest-351/test_delete_non_empty_folder_j13/to_delete to trash _____________________________________________________________________________________ test_list_formats _____________________________________________________________________________________ jp_fetch = .client_fetch at 0x7f74f4c8eb00> async def test_list_formats(jp_fetch): > r = await jp_fetch("api", "nbconvert", method="GET") E tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error jp_fetch = .client_fetch at 0x7f74f4c8eb00> tests/services/nbconvert/test_api.py:5: HTTPClientError ----------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------- [D 2024-06-12 21:46:17.501 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------------------------------------------------------------ Captured log setup ------------------------------------------------------------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /home/tkloczko/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3004 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/root_dir INFO ServerApp:serverapp.py:3004 Jupyter Server 2.14.1 is running at: INFO ServerApp:serverapp.py:3004 http://localhost:42411/a%40b/?token=a1bddfd318a9a7a3d905b8f22dc24b87164369ee83f52628 INFO ServerApp:serverapp.py:3004 http://127.0.0.1:42411/a%40b/?token=a1bddfd318a9a7a3d905b8f22dc24b87164369ee83f52628 INFO ServerApp:serverapp.py:3005 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3067 To access the server, open this file in a browser: file:///tmp/pytest-of-tkloczko/pytest-351/test_list_formats0/runtime/jpserver-3943990-open.html Or copy and paste one of these URLs: http://localhost:42411/a%40b/?token=a1bddfd318a9a7a3d905b8f22dc24b87164369ee83f52628 http://127.0.0.1:42411/a%40b/?token=a1bddfd318a9a7a3d905b8f22dc24b87164369ee83f52628 ------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------- DEBUG ServerApp:identity.py:445 Accepting token-authenticated request from 127.0.0.1 DEBUG ServerApp:identity.py:476 Generating new user for token-authenticated request: a7ac678164e44d7c92ad476899f329c6 WARNING ServerApp:web.py:1868 500 GET /a%40b/api/nbconvert (127.0.0.1): Could not import nbconvert: No module named 'nbconvert' WARNING ServerApp:handlers.py:774 wrote error: "Could not import nbconvert: No module named 'nbconvert'" Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.14.1-2.fc37.x86_64/usr/lib/python3.10/site-packages/jupyter_server/services/nbconvert/handlers.py", line 35, in get from nbconvert.exporters import base ModuleNotFoundError: No module named 'nbconvert' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib64/python3.10/site-packages/tornado/web.py", line 1785, in _execute result = await result File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.14.1-2.fc37.x86_64/usr/lib/python3.10/site-packages/jupyter_server/auth/decorator.py", line 73, in inner return await out File "/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-server-2.14.1-2.fc37.x86_64/usr/lib/python3.10/site-packages/jupyter_server/services/nbconvert/handlers.py", line 37, in get raise web.HTTPError(500, "Could not import nbconvert: %s" % e) from e tornado.web.HTTPError: HTTP 500: Internal Server Error (Could not import nbconvert: No module named 'nbconvert') ERROR ServerApp:log.py:98 { "Host": "127.0.0.1:42411", "User-Agent": "Tornado/6.4.1" } ERROR ServerApp:log.py:99 500 GET /a%40b/api/nbconvert (a7ac678164e44d7c92ad476899f329c6@127.0.0.1) 2.11ms referer=None ----------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------- INFO ServerApp:serverapp.py:2787 Shutting down 1 extension DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ===================================================================================== warnings summary ====================================================================================== tests/test_serverapp.py::test_signals /usr/lib64/python3.10/site-packages/tornado/platform/asyncio.py:247: DeprecationWarning: add_callback_from_signal is deprecated warnings.warn("add_callback_from_signal is deprecated", DeprecationWarning) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_connection[jp_server_config0] passed 1 out of the required 1 times. Success! test_connection[jp_server_config1] passed 1 out of the required 1 times. Success! test_connection[jp_server_config2] passed 1 out of the required 1 times. Success! test_restart_kernel[jp_server_config0] passed 1 out of the required 1 times. Success! test_restart_kernel[jp_server_config1] passed 1 out of the required 1 times. Success! test_restart_kernel[jp_server_config2] passed 1 out of the required 1 times. Success! test_restart_kernel[jp_server_config3] passed 1 out of the required 1 times. Success! test_culling_config passed 1 out of the required 1 times. Success! test_culling passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== =================================================================================== slowest 10 durations ==================================================================================== 12.94s call tests/services/kernels/test_cull.py::test_cull_idle_disable 12.18s call tests/test_terminal.py::test_culling 7.31s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config0] 7.28s call tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config1] 5.11s call tests/test_terminal.py::test_terminal_create_with_cwd 3.11s call tests/services/sessions/test_manager.py::test_pending_kernel 1.24s teardown tests/services/kernels/test_api.py::test_main_kernel_handler[jp_server_config0] 1.23s call tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/kernels/{kernel_id}/restart-None] 1.22s teardown tests/services/kernels/test_connection.py::test_websocket_connection 1.19s call tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/kernels/{kernel_id}-None] ================================================================================== short test summary info ================================================================================== SKIPPED [1] tests/test_terminal.py:161: Not yet working SKIPPED [1] tests/test_terminal.py:198: Not yet working SKIPPED [7] tests/conftest.py:42: Skipping this test because it's marked 'integration_test'. Run integration tests using the `--integration_tests` flag. FAILED tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/nbconvert-None] - assert 500 in {200, 201, None, 204} FAILED tests/nbconvert/test_handlers.py::test_from_file - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/nbconvert/test_handlers.py::test_from_file_404 - assert False FAILED tests/nbconvert/test_handlers.py::test_from_file_download - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/nbconvert/test_handlers.py::test_from_file_zip - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/nbconvert/test_handlers.py::test_from_post - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/nbconvert/test_handlers.py::test_from_post_zip - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager0-True-False-None] - Failed: DID NOT RAISE FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager1-True-False-None] - Failed: DID NOT RAISE FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager2-True-False-None] - Failed: DID NOT RAISE FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager3-True-False-None] - Failed: DID NOT RAISE FAILED tests/services/nbconvert/test_api.py::test_list_formats - tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error ============================================================= 12 failed, 979 passed, 9 skipped, 1 warning in 211.71s (0:03:31) ============================================================== ```
kloczek commented 5 months ago

After add to --deselect all above failing units pytest with every next iteration still fails with growing list of failing units.