notebook icon indicating copy to clipboard operation
notebook copied to clipboard

6.4.0: pytest warnings

Open kloczek opened this issue 4 years ago • 4 comments
trafficstars

Just normal build, install and test cycle used on building package from non-root account:

  • "setup.py build"
  • "setup.py install --root </install/prefix>"
  • "pytest with PYTHONPATH pointing to setearch and sitelib inside </install/prefix>
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-notebook-6.4.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-notebook-6.4.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ PYTHONDONTWRITEBYTECODE=1
+ /usr/bin/pytest -ra -k '      not test_buffered_cells_execute_in_order and    not test_cancel_restart_or_shutdown and         not test_checkpoints_follow_file and    not test_clipboard_multiselect and  not test_delete and     not test_delete_cells and       not test_delete_dirs and        not test_delete_non_empty_dir and       not test_display_image and  not test_display_isolation and  not test_dualmode_arrows and    not test_dualmode_cellmode and  not test_dualmode_clipboard and         not test_dualmode_execute and       not test_dualmode_markdown and  not test_execute_code and       not test_find_and_replace and   not test_from_file_404 and      not test_from_file and  not test_from_file_download and     not test_from_file_zip and      not test_from_post and  not test_from_post_zip and      not test_insert_cell and        not test_interrupt and      not test_items and      not test_kernels_buffer_without_conn and        not test_list_formats and       not test_markdown_cell and      not test_markdown_headings and      not test_menu_items and         not test_merge_cells and        not test_move_multiselection and        not test_multiselect and        not test_multiselect_toggle and     not test_notification and       not test_prompt_numbers and     not test_save and       not test_save_notebook_as and   not test_save_readonly_notebook_as and  not test_shutdown and       not test_undelete_cells'
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=3842334870
rootdir: /home/tkloczko/rpmbuild/BUILD/notebook-6.4.0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, cases-3.6.1, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, Faker-8.8.1, pylama-7.7.1, randomly-3.8.0
collected 348 items / 63 deselected / 285 selected

notebook/services/contents/tests/test_contents_api.py .............................................................                                                  [ 21%]
notebook/tests/test_log.py .                                                                                                                                         [ 21%]
notebook/tests/test_serialize.py ..                                                                                                                                  [ 22%]
. .                                                                                                                                                                  [ 22%]
notebook/auth/tests/test_login.py ..                                                                                                                                 [ 23%]
notebook/tests/test_nbextensions.py ...................................                                                                                              [ 36%]
notebook/tests/test_i18n.py .                                                                                                                                        [ 36%]
notebook/terminal/tests/test_terminals_api.py ........                                                                                                               [ 39%]
notebook/tests/test_paths.py ...                                                                                                                                     [ 40%]
notebook/tests/test_gateway.py ......                                                                                                                                [ 42%]
notebook/tests/test_config_manager.py .                                                                                                                              [ 42%]
notebook/tests/test_notebookapp.py ..........................                                                                                                        [ 51%]
notebook/services/sessions/tests/test_sessions_api.py ....................                                                                                           [ 59%]
notebook/services/sessions/tests/test_sessionmanager.py ........                                                                                                     [ 61%]
notebook/services/api/tests/test_api.py ...                                                                                                                          [ 62%]
notebook/tests/test_files.py .....                                                                                                                                   [ 64%]
notebook/services/contents/tests/test_manager.py ............................                                                                                        [ 74%]
notebook/services/kernels/tests/test_kernels_api.py ............                                                                                                     [ 78%]
notebook/bundler/tests/test_bundler_tools.py .............                                                                                                           [ 83%]
notebook/tests/test_utils.py ...s.                                                                                                                                   [ 85%]
notebook/tests/test_traittypes.py ...........                                                                                                                        [ 89%]
notebook/tests/test_serverextensions.py .....                                                                                                                        [ 90%]
notebook/bundler/tests/test_bundler_api.py .....                                                                                                                     [ 92%]
notebook/services/contents/tests/test_fileio.py ...                                                                                                                  [ 93%]
notebook/auth/tests/test_security.py ....                                                                                                                            [ 95%]
notebook/tree/tests/test_tree_handler.py .                                                                                                                           [ 95%]
notebook/bundler/tests/test_bundlerextension.py ...                                                                                                                  [ 96%]
notebook/services/config/tests/test_config_api.py ...                                                                                                                [ 97%]
notebook/services/kernelspecs/tests/test_kernelspecs_api.py .......                                                                                                  [100%]

============================================================================= warnings summary =============================================================================
notebook/auth/login.py:115
  /home/tkloczko/rpmbuild/BUILD/notebook-6.4.0/notebook/auth/login.py:115: DeprecationWarning: invalid escape sequence \s
    auth_header_pat = re.compile('token\s+(.+)', re.IGNORECASE)

notebook/tests/test_notebookapp_integration.py:15
  /home/tkloczko/rpmbuild/BUILD/notebook-6.4.0/notebook/tests/test_notebookapp_integration.py:15: PytestUnknownMarkWarning: Unknown pytest.mark.integration_tests - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
    pytestmark = pytest.mark.integration_tests

notebook/services/contents/tests/test_manager.py::TestContentsManagerNoAtomic::test_get
notebook/services/contents/tests/test_manager.py::TestContentsManager::test_get
  /usr/lib64/python3.8/unittest/case.py:1215: DeprecationWarning: assertDictContainsSubset is deprecated
    warnings.warn('assertDictContainsSubset is deprecated',

notebook/services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs
notebook/services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs_bad
  /usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py:267: UserWarning: Invalid kernelspec directory name (Kernel names can only contain ASCII letters and numbers and these separators: - . _ (hyphen, period, and underscore).): /tmp/tmpm29wouuv/data/kernels/sample 2
    d = self.find_kernel_specs()

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] notebook/tests/test_utils.py:83: run on windows only
=================================================== 282 passed, 1 skipped, 63 deselected, 6 warnings in 77.79s (0:01:17) ===================================================

I've deselected all units which requires geckodriver because I cannot find that. Where is source code of the geckodriver?

Summary without deselecting failing/error units:

========================================================================= short test summary info ==========================================================================
SKIPPED [1] notebook/tests/test_utils.py:83: run on windows only
SKIPPED [2] notebook/services/contents/tests/test_contents_api.py:535: Dir can't be sent to trash
ERROR notebook/tests/selenium/test_deletecell.py::test_delete_cells - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_save.py::test_save - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_dualmode_markdown.py::test_dualmode_markdown - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs ...
ERROR notebook/tests/selenium/test_dualmode_cellmode.py::test_dualmode_cellmode - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs ...
ERROR notebook/tests/selenium/test_notifications.py::test_notification - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in ...
ERROR notebook/tests/selenium/test_undelete.py::test_undelete_cells - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_dualmode_insertcell.py::test_insert_cell - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to b...
ERROR notebook/tests/selenium/test_find_and_replace.py::test_find_and_replace - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to...
ERROR notebook/tests/selenium/test_move_multiselection.py::test_move_multiselection - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable ne...
ERROR notebook/tests/selenium/test_save_as_notebook.py::test_save_notebook_as - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to...
ERROR notebook/tests/selenium/test_shutdown.py::test_shutdown - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_display_image.py::test_display_image - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in...
ERROR notebook/tests/selenium/test_execute_code.py::test_execute_code - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in P...
ERROR notebook/tests/selenium/test_dashboard_nav.py::test_items - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_dualmode_arrows.py::test_dualmode_arrows - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to b...
ERROR notebook/tests/selenium/test_prompt_numbers.py::test_prompt_numbers - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be ...
ERROR notebook/tests/selenium/test_buffering.py::test_kernels_buffer_without_conn - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable need...
ERROR notebook/tests/selenium/test_buffering.py::test_buffered_cells_execute_in_order - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable ...
ERROR notebook/tests/selenium/test_save_readonly_as.py::test_save_readonly_notebook_as - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable...
ERROR notebook/tests/selenium/test_multiselect.py::test_multiselect - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_interrupt.py::test_interrupt - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_merge_cells.py::test_merge_cells - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_kernel_menu.py::test_menu_items - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_kernel_menu.py::test_cancel_restart_or_shutdown - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable nee...
ERROR notebook/tests/selenium/test_dualmode_execute.py::test_dualmode_execute - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to...
ERROR notebook/tests/selenium/test_dualmode_clipboard.py::test_dualmode_clipboard - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable need...
ERROR notebook/tests/selenium/test_clipboard_multiselect.py::test_clipboard_multiselect - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executabl...
ERROR notebook/tests/selenium/test_display_isolation.py::test_display_isolation - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs ...
ERROR notebook/tests/selenium/test_markdown.py::test_markdown_cell - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
ERROR notebook/tests/selenium/test_markdown.py::test_markdown_headings - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in ...
ERROR notebook/tests/selenium/test_multiselect_toggle.py::test_multiselect_toggle - selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable need...
FAILED notebook/nbconvert/tests/test_nbconvert_handlers.py::APITest::test_from_file_404 - AssertionError: Expected status 404, got 500
FAILED notebook/nbconvert/tests/test_nbconvert_handlers.py::APITest::test_from_post - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: htt...
FAILED notebook/nbconvert/tests/test_nbconvert_handlers.py::APITest::test_from_file_zip - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url:...
FAILED notebook/nbconvert/tests/test_nbconvert_handlers.py::APITest::test_from_file - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: htt...
FAILED notebook/nbconvert/tests/test_nbconvert_handlers.py::APITest::test_from_post_zip - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url:...
FAILED notebook/nbconvert/tests/test_nbconvert_handlers.py::APITest::test_from_file_download - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for...
FAILED notebook/services/nbconvert/tests/test_nbconvert_api.py::APITest::test_list_formats - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for u...
======================================== 7 failed, 300 passed, 3 skipped, 5 deselected, 122 warnings, 31 errors in 85.66s (0:01:25) ========================================

If you provide details what needs to be provides for other failing units I'll b appreciated.

kloczek avatar Jun 24 '21 12:06 kloczek

If you have homebrew available you can just run brew install geckodriver. Otherwise you have to download a release of geckodriver from https://github.com/mozilla/geckodriver/releases and ensure the bin file is on your PATH.

dleen avatar Nov 03 '21 21:11 dleen

geckodriver

I've skipped for now all units which requires geckodriver because it looks like it is not so easy to package. What about other issues?

kloczek avatar May 13 '22 08:05 kloczek

Updated pytest output with deselected all units which requires geckodriver

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-notebook-6.4.11-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-notebook-6.4.11-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --deselect notebook/tests/selenium/test_buffering.py::test_buffered_cells_execute_in_order --deselect notebook/tests/selenium/test_buffering.py::test_kernels_buffer_without_conn --deselect notebook/tests/selenium/test_clipboard_multiselect.py::test_clipboard_multiselect --deselect notebook/tests/selenium/test_dashboard_nav.py::test_items --deselect notebook/tests/selenium/test_deletecell.py::test_delete_cells --deselect notebook/tests/selenium/test_display_image.py::test_display_image --deselect notebook/tests/selenium/test_display_isolation.py::test_display_isolation --deselect notebook/tests/selenium/test_dualmode_arrows.py::test_dualmode_arrows --deselect notebook/tests/selenium/test_dualmode_cellmode.py::test_dualmode_cellmode --deselect notebook/tests/selenium/test_dualmode_clipboard.py::test_dualmode_clipboard --deselect notebook/tests/selenium/test_dualmode_execute.py::test_dualmode_execute --deselect notebook/tests/selenium/test_dualmode_insertcell.py::test_insert_cell --deselect notebook/tests/selenium/test_dualmode_markdown.py::test_dualmode_markdown --deselect notebook/tests/selenium/test_execute_code.py::test_execute_code --deselect notebook/tests/selenium/test_find_and_replace.py::test_find_and_replace --deselect notebook/tests/selenium/test_interrupt.py::test_interrupt --deselect notebook/tests/selenium/test_kernel_menu.py::test_cancel_restart_or_shutdown --deselect notebook/tests/selenium/test_kernel_menu.py::test_menu_items --deselect notebook/tests/selenium/test_markdown.py::test_markdown_cell --deselect notebook/tests/selenium/test_markdown.py::test_markdown_headings --deselect notebook/tests/selenium/test_merge_cells.py::test_merge_cells --deselect notebook/tests/selenium/test_move_multiselection.py::test_move_multiselection --deselect notebook/tests/selenium/test_multiselect.py::test_multiselect --deselect notebook/tests/selenium/test_multiselect_toggle.py::test_multiselect_toggle --deselect notebook/tests/selenium/test_notifications.py::test_notification --deselect notebook/tests/selenium/test_prompt_numbers.py::test_prompt_numbers --deselect notebook/tests/selenium/test_save_as_notebook.py::test_save_notebook_as --deselect notebook/tests/selenium/test_save.py::test_save --deselect notebook/tests/selenium/test_save_readonly_as.py::test_save_readonly_notebook_as --deselect notebook/tests/selenium/test_shutdown.py::test_shutdown --deselect notebook/tests/selenium/test_undelete.py::test_undelete_cells
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/notebook-6.4.11
collected 345 items / 36 deselected / 309 selected

notebook/auth/tests/test_login.py ..                                                                                                                                 [  0%]
notebook/auth/tests/test_security.py ....                                                                                                                            [  1%]
notebook/bundler/tests/test_bundler_api.py .....                                                                                                                     [  3%]
notebook/bundler/tests/test_bundler_tools.py .............                                                                                                           [  7%]
notebook/bundler/tests/test_bundlerextension.py F..                                                                                                                  [  8%]
notebook/nbconvert/tests/test_nbconvert_handlers.py F...F.                                                                                                           [ 10%]
notebook/services/api/tests/test_api.py ...                                                                                                                          [ 11%]
notebook/services/config/tests/test_config_api.py ...                                                                                                                [ 12%]
notebook/services/contents/tests/test_contents_api.py ....................................F.........FFF......................                                        [ 35%]
notebook/services/contents/tests/test_fileio.py ...                                                                                                                  [ 36%]
notebook/services/contents/tests/test_largefilemanager.py .                                                                                                          [ 36%]
notebook/services/contents/tests/test_manager.py ............F...........F.........                                                                                  [ 47%]
notebook/services/kernels/tests/test_kernels_api.py ............                                                                                                     [ 51%]
notebook/services/kernelspecs/tests/test_kernelspecs_api.py .......                                                                                                  [ 54%]
notebook/services/nbconvert/tests/test_nbconvert_api.py .                                                                                                            [ 54%]
notebook/services/sessions/tests/test_sessionmanager.py .........                                                                                                    [ 57%]
notebook/services/sessions/tests/test_sessions_api.py ......................                                                                                         [ 64%]
notebook/terminal/tests/test_terminals_api.py ........                                                                                                               [ 66%]
notebook/tests/test_config_manager.py .                                                                                                                              [ 67%]
notebook/tests/test_files.py .....                                                                                                                                   [ 68%]
notebook/tests/test_gateway.py ......                                                                                                                                [ 70%]
notebook/tests/test_i18n.py .                                                                                                                                        [ 71%]
notebook/tests/test_log.py .                                                                                                                                         [ 71%]
notebook/tests/test_nbextensions.py F..................................                                                                                              [ 82%]
notebook/tests/test_notebookapp.py ..........................                                                                                                        [ 91%]
notebook/tests/test_paths.py ...                                                                                                                                     [ 92%]
notebook/tests/test_serialize.py ..                                                                                                                                  [ 92%]
notebook/tests/test_serverextensions.py F....                                                                                                                        [ 94%]
notebook/tests/test_traittypes.py ...........                                                                                                                        [ 98%]
notebook/tests/test_utils.py ....s                                                                                                                                   [ 99%]
notebook/tree/tests/test_tree_handler.py .                                                                                                                           [100%]

================================================================================= FAILURES =================================================================================
_____________________________________________________________________________ test_help_output _____________________________________________________________________________

    def test_help_output():
        check_help_all_output('notebook.bundler.bundlerextensions')
>       check_help_all_output('notebook.bundler.bundlerextensions', ['enable'])

notebook/bundler/tests/test_bundlerextension.py:23:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

pkg = 'notebook.bundler.bundlerextensions', subcommand = ['enable']

    def check_help_all_output(pkg, subcommand=None):
        """test that `python -m PKG --help-all` works"""
        cmd = [sys.executable, "-m", pkg]
        if subcommand:
            cmd.extend(subcommand)
        cmd.append("--help-all")
        out, err, rc = get_output_error_code(cmd)
        assert rc == 0, err
>       assert "Traceback" not in err
E       AssertionError

/usr/lib/python3.8/site-packages/traitlets/tests/utils.py:36: AssertionError
__________________________________________________________________________ APITest.test_from_file __________________________________________________________________________

self = <notebook.nbconvert.tests.test_nbconvert_handlers.APITest testMethod=test_from_file>

    @pytest.mark.skipif(
        not cmd_exists('pandoc'),
        reason="Pandoc wasn't found. Skipping this test."
    )
    def test_from_file(self):
>       r = self.nbconvert_api.from_file('html', 'foo', 'testnb.ipynb')

notebook/nbconvert/tests/test_nbconvert_handlers.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/nbconvert/tests/test_nbconvert_handlers.py:38: in from_file
    return self._req('GET', url_path_join(format, path, name),
notebook/nbconvert/tests/test_nbconvert_handlers.py:34: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ''
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode('utf-8')
            except UnicodeDecodeError:
                reason = self.reason.decode('iso-8859-1')
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)

        elif 500 <= self.status_code < 600:
            http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/nbconvert/html/foo/testnb.ipynb?download=False

/usr/lib/python3.8/site-packages/requests/models.py:960: HTTPError
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG    NotebookApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11', '/tmp/tmpssao8q1m/config', '/tmp/jupyter-clean-cfg-4r8hwg13'] for config files
DEBUG    NotebookApp:application.py:831 Looking for jupyter_config in /tmp/jupyter-clean-cfg-4r8hwg13
DEBUG    NotebookApp:application.py:831 Looking for jupyter_config in /tmp/tmpssao8q1m/config
DEBUG    NotebookApp:application.py:831 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook-6.4.11
DEBUG    NotebookApp:application.py:831 Looking for jupyter_notebook_config in /tmp/jupyter-clean-cfg-4r8hwg13
DEBUG    NotebookApp:application.py:831 Looking for jupyter_notebook_config in /tmp/tmpssao8q1m/config
DEBUG    NotebookApp:application.py:831 Looking for jupyter_notebook_config in /home/tkloczko/rpmbuild/BUILD/notebook-6.4.11
INFO     NotebookApp:notebookapp.py:2327 Serving notebooks from local directory: /tmp/tmpssao8q1m/notebooks
INFO     NotebookApp:notebookapp.py:2327 Jupyter Notebook 6.4.11 is running at:
INFO     NotebookApp:notebookapp.py:2327 http://localhost:12341/a%40b/?token=...
INFO     NotebookApp:notebookapp.py:2327  or http://127.0.0.1:12341/a%40b/?token=...
INFO     NotebookApp:notebookapp.py:2328 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
WARNING  NotebookApp:handlers.py:612 Forbidden
WARNING  NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 0.840000ms referer=None
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
INFO     NotebookApp:sign.py:412 Writing notebook-signing key to /tmp/tmpssao8q1m/data/notebook_secret
WARNING  NotebookApp:manager.py:508 Notebook foo/testnb.ipynb is not trusted
DEBUG    NotebookApp:templateexporter.py:480 Template paths:
        /usr/share/jupyter/nbconvert/templates/lab
        /usr/share/jupyter/nbconvert/templates/base
        /tmp/tmpssao8q1m/data
        /tmp/tmpssao8q1m/data/nbconvert/templates
        /tmp/tmpssao8q1m/data/nbconvert/templates/compatibility
        /home/tkloczko/.local/share/jupyter
        /home/tkloczko/.local/share/jupyter/nbconvert/templates
        /home/tkloczko/.local/share/jupyter/nbconvert/templates/compatibility
        /usr/share/jupyter
        /usr/share/jupyter/nbconvert/templates
        /usr/share/jupyter/nbconvert/templates/compatibility
        /tmp/tmpssao8q1m/share/jupyter
        /tmp/tmpssao8q1m/share/jupyter/nbconvert/templates
        /tmp/tmpssao8q1m/share/jupyter/nbconvert/templates/compatibility
        /home/tkloczko/.local/share/jupyter/nbconvert/templates
        /usr/share/jupyter/nbconvert/templates
DEBUG    NotebookApp:base.py:46 Applying preprocessor: TagRemovePreprocessor
DEBUG    NotebookApp:base.py:46 Applying preprocessor: RegexRemovePreprocessor
DEBUG    NotebookApp:base.py:46 Applying preprocessor: HighlightMagicsPreprocessor
DEBUG    NotebookApp:templateexporter.py:368 Attempting to load template index.html.j2
DEBUG    NotebookApp:templateexporter.py:369     template_paths: /usr/share/jupyter/nbconvert/templates/lab:/usr/share/jupyter/nbconvert/templates/base:/tmp/tmpssao8q1m/data:/tmp/tmpssao8q1m/data/nbconvert/templates:/tmp/tmpssao8q1m/data/nbconvert/templates/compatibility:/home/tkloczko/.local/share/jupyter:/home/tkloczko/.local/share/jupyter/nbconvert/templates:/home/tkloczko/.local/share/jupyter/nbconvert/templates/compatibility:/usr/share/jupyter:/usr/share/jupyter/nbconvert/templates:/usr/share/jupyter/nbconvert/templates/compatibility:/tmp/tmpssao8q1m/share/jupyter:/tmp/tmpssao8q1m/share/jupyter/nbconvert/templates:/tmp/tmpssao8q1m/share/jupyter/nbconvert/templates/compatibility:/home/tkloczko/.local/share/jupyter/nbconvert/templates:/usr/share/jupyter/nbconvert/templates
ERROR    NotebookApp:handlers.py:134 nbconvert failed: static/index.css
Traceback (most recent call last):
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/nbconvert/handlers.py", line 129, in get
    output, resources = exporter.from_notebook_node(
  File "/usr/lib/python3.8/site-packages/nbconvert/exporters/html.py", line 215, in from_notebook_node
    return super().from_notebook_node(nb, resources, **kw)
  File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 400, in from_notebook_node
    output = self.template.render(nb=nb_copy, resources=resources)
  File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 926, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/usr/share/jupyter/nbconvert/templates/lab/index.html.j2", line 3, in top-level template code
    {% from 'jupyter_widgets.html.j2' import jupyter_widgets %}
  File "/usr/share/jupyter/nbconvert/templates/lab/base.html.j2", line 260, in top-level template code
    {% set div_id = uuid4() %}
  File "/usr/share/jupyter/nbconvert/templates/base/display_priority.j2", line 1, in top-level template code
    {%- extends 'base/null.j2' -%}
  File "/usr/share/jupyter/nbconvert/templates/base/null.j2", line 24, in top-level template code
    {%- block header -%}
  File "/usr/share/jupyter/nbconvert/templates/lab/index.html.j2", line 9, in block 'header'
    {%- block html_head -%}
  File "/usr/share/jupyter/nbconvert/templates/lab/index.html.j2", line 36, in block 'html_head'
    {% block notebook_css %}
  File "/usr/share/jupyter/nbconvert/templates/lab/index.html.j2", line 37, in block 'notebook_css'
    {{ resources.include_css("static/index.css") }}
  File "/usr/lib/python3.8/site-packages/nbconvert/exporters/html.py", line 220, in resources_include_css
    code = """<style type="text/css">\n%s</style>""" % (env.loader.get_source(env, name)[0])
  File "/usr/lib/python3.8/site-packages/jinja2/loaders.py", line 561, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: static/index.css
WARNING  NotebookApp:web.py:1787 500 GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (::1): nbconvert failed: static/index.css
DEBUG    NotebookApp:handlers.py:249 Using contents: services/contents
DEBUG    NotebookApp:handlers.py:249 Using contents: services/contents
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.27.1"
}
ERROR    NotebookApp:log.py:59 500 GET /a%40b/nbconvert/html/foo/testnb.ipynb?download=False (::1) 468.320000ms referer=None
__________________________________________________________________________ APITest.test_from_post __________________________________________________________________________

self = <notebook.nbconvert.tests.test_nbconvert_handlers.APITest testMethod=test_from_post>

    @pytest.mark.skipif(
        not cmd_exists('pandoc'),
        reason="Pandoc wasn't found. Skipping this test."
    )
    def test_from_post(self):
        nbmodel = self.request('GET', 'api/contents/foo/testnb.ipynb').json()

>       r = self.nbconvert_api.from_post(format='html', nbmodel=nbmodel)

notebook/nbconvert/tests/test_nbconvert_handlers.py:135:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/nbconvert/tests/test_nbconvert_handlers.py:43: in from_post
    return self._req('POST', format, body)
notebook/nbconvert/tests/test_nbconvert_handlers.py:34: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ''
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode('utf-8')
            except UnicodeDecodeError:
                reason = self.reason.decode('iso-8859-1')
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)

        elif 500 <= self.status_code < 600:
            http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/nbconvert/html

/usr/lib/python3.8/site-packages/requests/models.py:960: HTTPError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:manager.py:508 Notebook foo/testnb.ipynb is not trusted
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/testnb.ipynb (::1) 5.280000ms
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:web.py:1787 500 POST /a%40b/nbconvert/html (::1): nbconvert failed: static/index.css
DEBUG    NotebookApp:handlers.py:249 Using contents: services/contents
DEBUG    NotebookApp:handlers.py:249 Using contents: services/contents
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.27.1"
}
ERROR    NotebookApp:log.py:59 500 POST /a%40b/nbconvert/html (::1) 307.630000ms referer=None
________________________________________________________ GenericFileCheckpointsAPITest.test_checkpoints_follow_file ________________________________________________________

self = <notebook.services.contents.tests.test_contents_api.GenericFileCheckpointsAPITest testMethod=test_checkpoints_follow_file>

    def test_checkpoints_follow_file(self):

        # Read initial file state
        orig = self.api.read('foo/a.ipynb')

        # Create a checkpoint of initial state
        r = self.api.new_checkpoint('foo/a.ipynb')
        cp1 = r.json()

        # Modify file and save
        nbcontent = json.loads(orig.text)['content']
        nb = from_dict(nbcontent)
        hcell = new_markdown_cell('Created by test')
        nb.cells.append(hcell)
        nbmodel = {'content': nb, 'type': 'notebook'}
        self.api.save('foo/a.ipynb', body=json.dumps(nbmodel))

        # Rename the file.
        self.api.rename('foo/a.ipynb', 'foo/z.ipynb')

        # Looking for checkpoints in the old location should yield no results.
        self.assertEqual(self.api.get_checkpoints('foo/a.ipynb').json(), [])

        # Looking for checkpoints in the new location should work.
        cps = self.api.get_checkpoints('foo/z.ipynb').json()
        self.assertEqual(cps, [cp1])

        # Delete the file.  The checkpoint should be deleted as well.
>       self.api.delete('foo/z.ipynb')

notebook/services/contents/tests/test_contents_api.py:586:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ''
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode('utf-8')
            except UnicodeDecodeError:
                reason = self.reason.decode('iso-8859-1')
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)

        elif 500 <= self.status_code < 600:
            http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/foo/z.ipynb

/usr/lib/python3.8/site-packages/requests/models.py:960: HTTPError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/a.ipynb (::1) 3.900000ms
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:filecheckpoints.py:160 creating checkpoint for foo/a.ipynb
DEBUG    NotebookApp:log.py:59 201 POST /a%40b/api/contents/foo/a.ipynb/checkpoints (::1) 5.040000ms
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
INFO     NotebookApp:handlers.py:166 Saving file at /foo/a.ipynb
DEBUG    NotebookApp:filemanager.py:468 Saving /tmp/tmpt6apmv10/notebooks/foo/a.ipynb
DEBUG    NotebookApp:log.py:59 200 PUT /a%40b/api/contents/foo/a.ipynb (::1) 6.190000ms
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:filecheckpoints.py:71 Renaming checkpoint /tmp/tmpt6apmv10/notebooks/foo/.ipynb_checkpoints/a-checkpoint.ipynb -> /tmp/tmpt6apmv10/notebooks/foo/.ipynb_checkpoints/z-checkpoint.ipynb
DEBUG    NotebookApp:log.py:59 200 PATCH /a%40b/api/contents/foo/a.ipynb (::1) 6.370000ms
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/a.ipynb/checkpoints (::1) 4.610000ms
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/z.ipynb/checkpoints (::1) 4.320000ms
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:238 delete /foo/z.ipynb
DEBUG    NotebookApp:filemanager.py:530 Sending /tmp/tmpt6apmv10/notebooks/foo/z.ipynb to trash
ERROR    NotebookApp:web.py:1789 Uncaught exception DELETE /a%40b/api/contents/foo/z.ipynb (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/foo/z.ipynb', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 17, in send2trash
    f.trash(cancellable=None)
gi.repository.GLib.GError: g-io-error-quark: Error trashing file /tmp/tmpt6apmv10/notebooks/foo/z.ipynb: No such file or directory (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 1704, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/handlers.py", line 239, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/filemanager.py", line 531, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 23, in send2trash
    raise OSError(e.message)
OSError: Error trashing file /tmp/tmpt6apmv10/notebooks/foo/z.ipynb: No such file or directory
WARNING  NotebookApp:handlers.py:612 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.27.1"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/foo/z.ipynb (::1) 10.250000ms referer=None
________________________________________________________________ GenericFileCheckpointsAPITest.test_delete _________________________________________________________________

self = <notebook.services.contents.tests.test_contents_api.GenericFileCheckpointsAPITest testMethod=test_delete>

    def test_delete(self):
        for d, name in self.dirs_nbs:
            print(f'{d!r}, {name!r}')
>           resp = self.api.delete(url_path_join(d, name + '.ipynb'))

notebook/services/contents/tests/test_contents_api.py:512:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ''
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode('utf-8')
            except UnicodeDecodeError:
                reason = self.reason.decode('iso-8859-1')
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)

        elif 500 <= self.status_code < 600:
            http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/inroot.ipynb

/usr/lib/python3.8/site-packages/requests/models.py:960: HTTPError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
'', 'inroot'
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:238 delete /inroot.ipynb
DEBUG    NotebookApp:filemanager.py:530 Sending /tmp/tmpt6apmv10/notebooks/inroot.ipynb to trash
ERROR    NotebookApp:web.py:1789 Uncaught exception DELETE /a%40b/api/contents/inroot.ipynb (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/inroot.ipynb', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 17, in send2trash
    f.trash(cancellable=None)
gi.repository.GLib.GError: g-io-error-quark: Error trashing file /tmp/tmpt6apmv10/notebooks/inroot.ipynb: No such file or directory (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 1704, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/handlers.py", line 239, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/filemanager.py", line 531, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 23, in send2trash
    raise OSError(e.message)
OSError: Error trashing file /tmp/tmpt6apmv10/notebooks/inroot.ipynb: No such file or directory
WARNING  NotebookApp:handlers.py:612 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.27.1"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/inroot.ipynb (::1) 5.920000ms referer=None
______________________________________________________________ GenericFileCheckpointsAPITest.test_delete_dirs ______________________________________________________________

self = <notebook.services.contents.tests.test_contents_api.GenericFileCheckpointsAPITest testMethod=test_delete_dirs>

    def test_delete_dirs(self):
        # depth-first delete everything, so we don't try to delete empty directories
        for name in sorted(self.dirs + ['/'], key=len, reverse=True):
            listing = self.api.list(name).json()['content']
            for model in listing:
>               self.api.delete(model['path'])

notebook/services/contents/tests/test_contents_api.py:527:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ''
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode('utf-8')
            except UnicodeDecodeError:
                reason = self.reason.decode('iso-8859-1')
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)

        elif 500 <= self.status_code < 600:
            http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob

/usr/lib/python3.8/site-packages/requests/models.py:960: HTTPError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (::1) 8.220000ms
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:238 delete /Directory with spaces in/inspace.blob
DEBUG    NotebookApp:filemanager.py:530 Sending /tmp/tmpt6apmv10/notebooks/Directory with spaces in/inspace.blob to trash
ERROR    NotebookApp:web.py:1789 Uncaught exception DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 17, in send2trash
    f.trash(cancellable=None)
gi.repository.GLib.GError: g-io-error-quark: Error trashing file /tmp/tmpt6apmv10/notebooks/Directory with spaces in/inspace.blob: No such file or directory (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 1704, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/handlers.py", line 239, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/filemanager.py", line 531, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 23, in send2trash
    raise OSError(e.message)
OSError: Error trashing file /tmp/tmpt6apmv10/notebooks/Directory with spaces in/inspace.blob: No such file or directory
WARNING  NotebookApp:handlers.py:612 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.27.1"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (::1) 5.690000ms referer=None
_________________________________________________________ GenericFileCheckpointsAPITest.test_delete_non_empty_dir __________________________________________________________

self = <notebook.services.contents.tests.test_contents_api.GenericFileCheckpointsAPITest testMethod=test_delete_non_empty_dir>

    def test_delete_non_empty_dir(self):
        if sys.platform == 'win32':
            self.skipTest("Disabled deleting non-empty dirs on Windows")
        # Test that non empty directory can be deleted
        try:
>           self.api.delete('å b')

notebook/services/contents/tests/test_contents_api.py:536:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ''
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode('utf-8')
            except UnicodeDecodeError:
                reason = self.reason.decode('iso-8859-1')
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)

        elif 500 <= self.status_code < 600:
            http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/%C3%A5%20b

/usr/lib/python3.8/site-packages/requests/models.py:960: HTTPError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:238 delete /å b
DEBUG    NotebookApp:filemanager.py:530 Sending /tmp/tmpt6apmv10/notebooks/å b to trash
ERROR    NotebookApp:web.py:1789 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 17, in send2trash
    f.trash(cancellable=None)
gi.repository.GLib.GError: g-io-error-quark: Error trashing file /tmp/tmpt6apmv10/notebooks/å b: No such file or directory (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 1704, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/handlers.py", line 239, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/services/contents/filemanager.py", line 531, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 23, in send2trash
    raise OSError(e.message)
OSError: Error trashing file /tmp/tmpt6apmv10/notebooks/å b: No such file or directory
WARNING  NotebookApp:handlers.py:612 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.27.1"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/%C3%A5%20b (::1) 5.540000ms referer=None
_____________________________________________________________________ TestContentsManager.test_delete ______________________________________________________________________

paths = ['/tmp/tmpve438vtf/Untitled.ipynb']

    def send2trash(paths):
        paths = preprocess_paths(paths)
        for path in paths:
            try:
                f = Gio.File.new_for_path(path)
>               f.trash(cancellable=None)
E               gi.repository.GLib.GError: g-io-error-quark: Error trashing file /tmp/tmpve438vtf/Untitled.ipynb: No such file or directory (1)

/usr/lib/python3.8/site-packages/send2trash/plat_gio.py:17: Error

During handling of the above exception, another exception occurred:

self = <notebook.services.contents.tests.test_manager.TestContentsManager testMethod=test_delete>

    def test_delete(self):
        cm = self.contents_manager
        # Create a notebook
        nb, name, path = self.new_notebook()

        # Delete the notebook
>       cm.delete(path)

notebook/services/contents/tests/test_manager.py:515:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/manager.py:279: in delete
    self.delete_file(path)
notebook/services/contents/filemanager.py:531: in delete_file
    send2trash(os_path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

paths = ['/tmp/tmpve438vtf/Untitled.ipynb']

    def send2trash(paths):
        paths = preprocess_paths(paths)
        for path in paths:
            try:
                f = Gio.File.new_for_path(path)
                f.trash(cancellable=None)
            except GObject.GError as e:
                if e.code == Gio.IOErrorEnum.NOT_SUPPORTED:
                    # We get here if we can't create a trash directory on the same
                    # device. I don't know if other errors can result in NOT_SUPPORTED.
                    raise TrashPermissionError("")
>               raise OSError(e.message)
E               OSError: Error trashing file /tmp/tmpve438vtf/Untitled.ipynb: No such file or directory

/usr/lib/python3.8/site-packages/send2trash/plat_gio.py:23: OSError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  traitlets:manager.py:492 Notebook Untitled.ipynb is not trusted
_________________________________________________________________ TestContentsManagerNoAtomic.test_delete __________________________________________________________________

paths = ['/tmp/tmp83utj59a/Untitled.ipynb']

    def send2trash(paths):
        paths = preprocess_paths(paths)
        for path in paths:
            try:
                f = Gio.File.new_for_path(path)
>               f.trash(cancellable=None)
E               gi.repository.GLib.GError: g-io-error-quark: Error trashing file /tmp/tmp83utj59a/Untitled.ipynb: No such file or directory (1)

/usr/lib/python3.8/site-packages/send2trash/plat_gio.py:17: Error

During handling of the above exception, another exception occurred:

self = <notebook.services.contents.tests.test_manager.TestContentsManagerNoAtomic testMethod=test_delete>

    def test_delete(self):
        cm = self.contents_manager
        # Create a notebook
        nb, name, path = self.new_notebook()

        # Delete the notebook
>       cm.delete(path)

notebook/services/contents/tests/test_manager.py:515:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/manager.py:279: in delete
    self.delete_file(path)
notebook/services/contents/filemanager.py:531: in delete_file
    send2trash(os_path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

paths = ['/tmp/tmp83utj59a/Untitled.ipynb']

    def send2trash(paths):
        paths = preprocess_paths(paths)
        for path in paths:
            try:
                f = Gio.File.new_for_path(path)
                f.trash(cancellable=None)
            except GObject.GError as e:
                if e.code == Gio.IOErrorEnum.NOT_SUPPORTED:
                    # We get here if we can't create a trash directory on the same
                    # device. I don't know if other errors can result in NOT_SUPPORTED.
                    raise TrashPermissionError("")
>               raise OSError(e.message)
E               OSError: Error trashing file /tmp/tmp83utj59a/Untitled.ipynb: No such file or directory

/usr/lib/python3.8/site-packages/send2trash/plat_gio.py:23: OSError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  traitlets:manager.py:492 Notebook Untitled.ipynb is not trusted
_____________________________________________________________________________ test_help_output _____________________________________________________________________________

    def test_help_output():
        check_help_all_output('notebook.nbextensions')
>       check_help_all_output('notebook.nbextensions', ['enable'])

notebook/tests/test_nbextensions.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

pkg = 'notebook.nbextensions', subcommand = ['enable']

    def check_help_all_output(pkg, subcommand=None):
        """test that `python -m PKG --help-all` works"""
        cmd = [sys.executable, "-m", pkg]
        if subcommand:
            cmd.extend(subcommand)
        cmd.append("--help-all")
        out, err, rc = get_output_error_code(cmd)
        assert rc == 0, err
>       assert "Traceback" not in err
E       AssertionError

/usr/lib/python3.8/site-packages/traitlets/tests/utils.py:36: AssertionError
_____________________________________________________________________________ test_help_output _____________________________________________________________________________

    def test_help_output():
        check_help_all_output('notebook.serverextensions')
>       check_help_all_output('notebook.serverextensions', ['enable'])

notebook/tests/test_serverextensions.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

pkg = 'notebook.serverextensions', subcommand = ['enable']

    def check_help_all_output(pkg, subcommand=None):
        """test that `python -m PKG --help-all` works"""
        cmd = [sys.executable, "-m", pkg]
        if subcommand:
            cmd.extend(subcommand)
        cmd.append("--help-all")
        out, err, rc = get_output_error_code(cmd)
        assert rc == 0, err
>       assert "Traceback" not in err
E       AssertionError

/usr/lib/python3.8/site-packages/traitlets/tests/utils.py:36: AssertionError
============================================================================= warnings summary =============================================================================
notebook/utils.py:280
notebook/utils.py:280
  /home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    return LooseVersion(v) >= LooseVersion(check)

notebook/tests/test_notebookapp_integration.py:14
  /home/tkloczko/rpmbuild/BUILD/notebook-6.4.11/notebook/tests/test_notebookapp_integration.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.integration_tests - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    pytestmark = pytest.mark.integration_tests

notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_checkpoints_follow_file
notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_delete
notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_delete_dirs
notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_delete_non_empty_dir
notebook/services/contents/tests/test_manager.py::TestContentsManager::test_delete
notebook/services/contents/tests/test_manager.py::TestContentsManagerNoAtomic::test_delete
  /usr/lib/python3.8/site-packages/send2trash/plat_gio.py:18: PyGIDeprecationWarning: GObject.GError is deprecated; use GLib.GError instead
    except GObject.GError as e:

notebook/services/contents/tests/test_manager.py::TestContentsManager::test_get
notebook/services/contents/tests/test_manager.py::TestContentsManagerNoAtomic::test_get
  /usr/lib64/python3.8/unittest/case.py:1215: DeprecationWarning: assertDictContainsSubset is deprecated
    warnings.warn('assertDictContainsSubset is deprecated',

notebook/services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs
notebook/services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs_bad
  /usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py:311: UserWarning: Invalid kernelspec directory name (Kernel names can only contain ASCII letters and numbers and these separators: - . _ (hyphen, period, and underscore).): /tmp/tmptr84_poy/data/kernels/sample 2
    d = self.find_kernel_specs()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] notebook/tests/test_utils.py:83: run on windows only
FAILED notebook/bundler/tests/test_bundlerextension.py::test_help_output - AssertionError
FAILED notebook/nbconvert/tests/test_nbconvert_handlers.py::APITest::test_from_file - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: htt...
FAILED notebook/nbconvert/tests/test_nbconvert_handlers.py::APITest::test_from_post - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: htt...
FAILED notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_checkpoints_follow_file - requests.exceptions.HTTPError: 500 Server Err...
FAILED notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_delete - requests.exceptions.HTTPError: 500 Server Error: Internal Serv...
FAILED notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_delete_dirs - requests.exceptions.HTTPError: 500 Server Error: Internal...
FAILED notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_delete_non_empty_dir - requests.exceptions.HTTPError: 500 Server Error:...
FAILED notebook/services/contents/tests/test_manager.py::TestContentsManager::test_delete - OSError: Error trashing file /tmp/tmpve438vtf/Untitled.ipynb: No such file or...
FAILED notebook/services/contents/tests/test_manager.py::TestContentsManagerNoAtomic::test_delete - OSError: Error trashing file /tmp/tmp83utj59a/Untitled.ipynb: No such...
FAILED notebook/tests/test_nbextensions.py::test_help_output - AssertionError
FAILED notebook/tests/test_serverextensions.py::test_help_output - AssertionError
================================================== 11 failed, 297 passed, 1 skipped, 36 deselected, 13 warnings in 42.84s ==================================================

kloczek avatar May 13 '22 08:05 kloczek

I see the same AssertionErrors in test_help_output in Fedora 37 with trait lets updated from 5.1.1 to 5.2.0 -- should I open a separate issue?

Edit: Reported as https://github.com/jupyter/notebook/issues/6424

hroncok avatar May 13 '22 14:05 hroncok

Just started updating my package to 6.5.4. Looks like now are failing 2 units less. Here is list of installed modules in build env

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-notebook-6.5.4-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-notebook-6.5.4-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' --deselect notebook/tests/selenium/test_buffering.py::test_buffered_cells_execute_in_order --deselect notebook/tests/selenium/test_buffering.py::test_kernels_buffer_without_conn --deselect notebook/tests/selenium/test_clipboard_multiselect.py::test_clipboard_multiselect --deselect notebook/tests/selenium/test_dashboard_nav.py::test_items --deselect notebook/tests/selenium/test_deletecell.py::test_delete_cells --deselect notebook/tests/selenium/test_display_image.py::test_display_image --deselect notebook/tests/selenium/test_display_isolation.py::test_display_isolation --deselect notebook/tests/selenium/test_dualmode_arrows.py::test_dualmode_arrows --deselect notebook/tests/selenium/test_dualmode_cellmode.py::test_dualmode_cellmode --deselect notebook/tests/selenium/test_dualmode_clipboard.py::test_dualmode_clipboard --deselect notebook/tests/selenium/test_dualmode_execute.py::test_dualmode_execute --deselect notebook/tests/selenium/test_dualmode_insertcell.py::test_insert_cell --deselect notebook/tests/selenium/test_dualmode_markdown.py::test_dualmode_markdown --deselect notebook/tests/selenium/test_execute_code.py::test_execute_code --deselect notebook/tests/selenium/test_find_and_replace.py::test_find_and_replace --deselect notebook/tests/selenium/test_interrupt.py::test_interrupt --deselect notebook/tests/selenium/test_kernel_menu.py::test_cancel_restart_or_shutdown --deselect notebook/tests/selenium/test_kernel_menu.py::test_menu_items --deselect notebook/tests/selenium/test_markdown.py::test_markdown_cell --deselect notebook/tests/selenium/test_markdown.py::test_markdown_headings --deselect notebook/tests/selenium/test_merge_cells.py::test_merge_cells --deselect notebook/tests/selenium/test_move_multiselection.py::test_move_multiselection --deselect notebook/tests/selenium/test_multiselect.py::test_multiselect --deselect notebook/tests/selenium/test_multiselect_toggle.py::test_multiselect_toggle --deselect notebook/tests/selenium/test_notifications.py::test_notification --deselect notebook/tests/selenium/test_prompt_numbers.py::test_prompt_numbers --deselect notebook/tests/selenium/test_save.py::test_save --deselect notebook/tests/selenium/test_save_as_notebook.py::test_save_notebook_as --deselect notebook/tests/selenium/test_shutdown.py::test_shutdown --deselect notebook/tests/selenium/test_undelete.py::test_undelete_cells
============================= test session starts ==============================
platform linux -- Python 3.8.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/notebook-6.5.4
plugins: anyio-3.6.2
collected 360 items / 35 deselected / 325 selected

notebook/auth/tests/test_login.py ..                                     [  0%]
notebook/auth/tests/test_security.py ....                                [  1%]
notebook/bundler/tests/test_bundler_api.py .....                         [  3%]
notebook/bundler/tests/test_bundler_tools.py .............               [  7%]
notebook/bundler/tests/test_bundlerextension.py ...                      [  8%]
notebook/nbconvert/tests/test_nbconvert_handlers.py ......               [ 10%]
notebook/services/api/tests/test_api.py ...                              [ 11%]
notebook/services/config/tests/test_config_api.py ...                    [ 12%]
notebook/services/contents/tests/test_contents_api.py .F..........FF..F. [ 17%]
.........................F...........FF..F.........................      [ 38%]
notebook/services/contents/tests/test_fileio.py ...                      [ 39%]
notebook/services/contents/tests/test_largefilemanager.py .              [ 39%]
notebook/services/contents/tests/test_manager.py ....................... [ 46%]
.............                                                            [ 50%]
notebook/services/kernels/tests/test_kernels_api.py F...........         [ 54%]
notebook/services/kernelspecs/tests/test_kernelspecs_api.py .......      [ 56%]
notebook/services/nbconvert/tests/test_nbconvert_api.py .                [ 56%]
notebook/services/sessions/tests/test_sessionmanager.py .........        [ 59%]
notebook/services/sessions/tests/test_sessions_api.py .................. [ 64%]
....                                                                     [ 66%]
notebook/terminal/tests/test_terminals_api.py ........                   [ 68%]
notebook/tests/test_config_manager.py .                                  [ 68%]
notebook/tests/test_files.py .....                                       [ 70%]
notebook/tests/test_gateway.py ......                                    [ 72%]
notebook/tests/test_i18n.py .                                            [ 72%]
notebook/tests/test_log.py .                                             [ 72%]
notebook/tests/test_nbextensions.py ...................................  [ 83%]
notebook/tests/test_notebookapp.py ..........................            [ 91%]
notebook/tests/test_paths.py ...                                         [ 92%]
notebook/tests/test_serialize.py ..                                      [ 93%]
notebook/tests/test_serverextensions.py .....                            [ 94%]
notebook/tests/test_traittypes.py ...........                            [ 98%]
notebook/tests/test_utils.py ....s                                       [ 99%]
notebook/tree/tests/test_tree_handler.py .                               [100%]

=================================== FAILURES ===================================
_____________________ APITest.test_checkpoints_follow_file _____________________

self = <notebook.services.contents.tests.test_contents_api.APITest testMethod=test_checkpoints_follow_file>

    def test_checkpoints_follow_file(self):

        # Read initial file state
        orig = self.api.read('foo/a.ipynb')

        # Create a checkpoint of initial state
        r = self.api.new_checkpoint('foo/a.ipynb')
        cp1 = r.json()

        # Modify file and save
        nbcontent = json.loads(orig.text)['content']
        nb = from_dict(nbcontent)
        hcell = new_markdown_cell('Created by test')
        nb.cells.append(hcell)
        nbmodel = {'content': nb, 'type': 'notebook'}
        self.api.save('foo/a.ipynb', body=json.dumps(nbmodel))

        # Rename the file.
        self.api.rename('foo/a.ipynb', 'foo/z.ipynb')

        # Looking for checkpoints in the old location should yield no results.
        self.assertEqual(self.api.get_checkpoints('foo/a.ipynb').json(), [])

        # Looking for checkpoints in the new location should work.
        cps = self.api.get_checkpoints('foo/z.ipynb').json()
        self.assertEqual(cps, [cp1])

        # Delete the file.  The checkpoint should be deleted as well.
>       self.api.delete('foo/z.ipynb')

notebook/services/contents/tests/test_contents_api.py:706:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )

        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/foo/z.ipynb

/usr/lib/python3.8/site-packages/requests/models.py:1021: HTTPError
------------------------------ Captured log call -------------------------------
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:manager.py:508 Notebook foo/a.ipynb is not trusted
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/a.ipynb (::1) 5.320000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 201 POST /a%40b/api/contents/foo/a.ipynb/checkpoints (::1) 4.250000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
INFO     NotebookApp:handlers.py:171 Saving file at /foo/a.ipynb
DEBUG    NotebookApp:filemanager.py:485 Saving /tmp/tmpl5aitezu/notebooks/foo/a.ipynb
DEBUG    NotebookApp:log.py:59 200 PUT /a%40b/api/contents/foo/a.ipynb (::1) 7.340000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:filecheckpoints.py:71 Renaming checkpoint /tmp/tmpl5aitezu/notebooks/foo/.ipynb_checkpoints/a-checkpoint.ipynb -> /tmp/tmpl5aitezu/notebooks/foo/.ipynb_checkpoints/z-checkpoint.ipynb
DEBUG    NotebookApp:log.py:59 200 PATCH /a%40b/api/contents/foo/a.ipynb (::1) 5.780000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/a.ipynb/checkpoints (::1) 3.730000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/z.ipynb/checkpoints (::1) 3.780000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:253 delete /foo/z.ipynb
DEBUG    NotebookApp:filemanager.py:553 Sending /tmp/tmpl5aitezu/notebooks/foo/z.ipynb to trash
ERROR    NotebookApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/foo/z.ipynb (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/foo/z.ipynb', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/handlers.py", line 254, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/filemanager.py", line 554, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 211, in send2trash
    trash_move(path_b, dest_trash, topdir)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 117, in trash_move
    os.rename(src, op.join(filespath, destname))
OSError: [Errno 18] Invalid cross-device link: b'/tmp/tmpl5aitezu/notebooks/foo/z.ipynb' -> b'/home/tkloczko/.local/share/Trash/files/z 7.ipynb'
WARNING  NotebookApp:handlers.py:617 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.28.2"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/foo/z.ipynb (::1) 11.620000ms referer=None
_____________________________ APITest.test_delete ______________________________

self = <notebook.services.contents.tests.test_contents_api.APITest testMethod=test_delete>

    def test_delete(self):
        for d, name in self.dirs_nbs:
            print(f'{d!r}, {name!r}')
>           resp = self.api.delete(url_path_join(d, name + '.ipynb'))

notebook/services/contents/tests/test_contents_api.py:594:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )

        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/inroot.ipynb

/usr/lib/python3.8/site-packages/requests/models.py:1021: HTTPError
----------------------------- Captured stdout call -----------------------------
'', 'inroot'
------------------------------ Captured log call -------------------------------
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:253 delete /inroot.ipynb
DEBUG    NotebookApp:filemanager.py:553 Sending /tmp/tmpl5aitezu/notebooks/inroot.ipynb to trash
ERROR    NotebookApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/inroot.ipynb (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/inroot.ipynb', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/handlers.py", line 254, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/filemanager.py", line 554, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 211, in send2trash
    trash_move(path_b, dest_trash, topdir)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 117, in trash_move
    os.rename(src, op.join(filespath, destname))
OSError: [Errno 18] Invalid cross-device link: b'/tmp/tmpl5aitezu/notebooks/inroot.ipynb' -> b'/home/tkloczko/.local/share/Trash/files/inroot 7.ipynb'
WARNING  NotebookApp:handlers.py:617 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.28.2"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/inroot.ipynb (::1) 7.350000ms referer=None
___________________________ APITest.test_delete_dirs ___________________________

self = <notebook.services.contents.tests.test_contents_api.APITest testMethod=test_delete_dirs>

    def test_delete_dirs(self):
        # depth-first delete everything, so we don't try to delete empty directories
        for name in sorted(self.dirs + ['/'], key=len, reverse=True):
            listing = self.api.list(name).json()['content']
            for model in listing:
>               self.api.delete(model['path'])

notebook/services/contents/tests/test_contents_api.py:609:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )

        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob

/usr/lib/python3.8/site-packages/requests/models.py:1021: HTTPError
------------------------------ Captured log call -------------------------------
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (::1) 6.230000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:253 delete /Directory with spaces in/inspace.blob
DEBUG    NotebookApp:filemanager.py:553 Sending /tmp/tmpl5aitezu/notebooks/Directory with spaces in/inspace.blob to trash
ERROR    NotebookApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/handlers.py", line 254, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/filemanager.py", line 554, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 211, in send2trash
    trash_move(path_b, dest_trash, topdir)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 117, in trash_move
    os.rename(src, op.join(filespath, destname))
OSError: [Errno 18] Invalid cross-device link: b'/tmp/tmpl5aitezu/notebooks/Directory with spaces in/inspace.blob' -> b'/home/tkloczko/.local/share/Trash/files/inspace 7.blob'
WARNING  NotebookApp:handlers.py:617 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.28.2"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (::1) 7.180000ms referer=None
______________________ APITest.test_delete_non_empty_dir _______________________

self = <notebook.services.contents.tests.test_contents_api.APITest testMethod=test_delete_non_empty_dir>

    def test_delete_non_empty_dir(self):
        if sys.platform == 'win32':
            self.skipTest("Disabled deleting non-empty dirs on Windows")
        # Test that non empty directory can be deleted
        try:
>           self.api.delete('å b')

notebook/services/contents/tests/test_contents_api.py:618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )

        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/%C3%A5%20b

/usr/lib/python3.8/site-packages/requests/models.py:1021: HTTPError
------------------------------ Captured log call -------------------------------
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:253 delete /å b
DEBUG    NotebookApp:filemanager.py:553 Sending /tmp/tmpl5aitezu/notebooks/å b to trash
ERROR    NotebookApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/handlers.py", line 254, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/filemanager.py", line 554, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 211, in send2trash
    trash_move(path_b, dest_trash, topdir)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 117, in trash_move
    os.rename(src, op.join(filespath, destname))
OSError: [Errno 18] Invalid cross-device link: b'/tmp/tmpl5aitezu/notebooks/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 7'
WARNING  NotebookApp:handlers.py:617 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.28.2"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/%C3%A5%20b (::1) 6.960000ms referer=None
__________ GenericFileCheckpointsAPITest.test_checkpoints_follow_file __________

self = <notebook.services.contents.tests.test_contents_api.GenericFileCheckpointsAPITest testMethod=test_checkpoints_follow_file>

    def test_checkpoints_follow_file(self):

        # Read initial file state
        orig = self.api.read('foo/a.ipynb')

        # Create a checkpoint of initial state
        r = self.api.new_checkpoint('foo/a.ipynb')
        cp1 = r.json()

        # Modify file and save
        nbcontent = json.loads(orig.text)['content']
        nb = from_dict(nbcontent)
        hcell = new_markdown_cell('Created by test')
        nb.cells.append(hcell)
        nbmodel = {'content': nb, 'type': 'notebook'}
        self.api.save('foo/a.ipynb', body=json.dumps(nbmodel))

        # Rename the file.
        self.api.rename('foo/a.ipynb', 'foo/z.ipynb')

        # Looking for checkpoints in the old location should yield no results.
        self.assertEqual(self.api.get_checkpoints('foo/a.ipynb').json(), [])

        # Looking for checkpoints in the new location should work.
        cps = self.api.get_checkpoints('foo/z.ipynb').json()
        self.assertEqual(cps, [cp1])

        # Delete the file.  The checkpoint should be deleted as well.
>       self.api.delete('foo/z.ipynb')

notebook/services/contents/tests/test_contents_api.py:706:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )

        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/foo/z.ipynb

/usr/lib/python3.8/site-packages/requests/models.py:1021: HTTPError
------------------------------ Captured log call -------------------------------
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/a.ipynb (::1) 5.170000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:filecheckpoints.py:160 creating checkpoint for foo/a.ipynb
DEBUG    NotebookApp:log.py:59 201 POST /a%40b/api/contents/foo/a.ipynb/checkpoints (::1) 6.010000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
INFO     NotebookApp:handlers.py:171 Saving file at /foo/a.ipynb
DEBUG    NotebookApp:filemanager.py:485 Saving /tmp/tmpl5xvkpvz/notebooks/foo/a.ipynb
DEBUG    NotebookApp:log.py:59 200 PUT /a%40b/api/contents/foo/a.ipynb (::1) 7.330000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:filecheckpoints.py:71 Renaming checkpoint /tmp/tmpl5xvkpvz/notebooks/foo/.ipynb_checkpoints/a-checkpoint.ipynb -> /tmp/tmpl5xvkpvz/notebooks/foo/.ipynb_checkpoints/z-checkpoint.ipynb
DEBUG    NotebookApp:log.py:59 200 PATCH /a%40b/api/contents/foo/a.ipynb (::1) 5.670000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/a.ipynb/checkpoints (::1) 3.700000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/z.ipynb/checkpoints (::1) 3.750000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:253 delete /foo/z.ipynb
DEBUG    NotebookApp:filemanager.py:553 Sending /tmp/tmpl5xvkpvz/notebooks/foo/z.ipynb to trash
ERROR    NotebookApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/foo/z.ipynb (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/foo/z.ipynb', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/handlers.py", line 254, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/filemanager.py", line 554, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 211, in send2trash
    trash_move(path_b, dest_trash, topdir)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 117, in trash_move
    os.rename(src, op.join(filespath, destname))
OSError: [Errno 18] Invalid cross-device link: b'/tmp/tmpl5xvkpvz/notebooks/foo/z.ipynb' -> b'/home/tkloczko/.local/share/Trash/files/z 8.ipynb'
WARNING  NotebookApp:handlers.py:617 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.28.2"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/foo/z.ipynb (::1) 7.380000ms referer=None
__________________ GenericFileCheckpointsAPITest.test_delete ___________________

self = <notebook.services.contents.tests.test_contents_api.GenericFileCheckpointsAPITest testMethod=test_delete>

    def test_delete(self):
        for d, name in self.dirs_nbs:
            print(f'{d!r}, {name!r}')
>           resp = self.api.delete(url_path_join(d, name + '.ipynb'))

notebook/services/contents/tests/test_contents_api.py:594:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )

        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/inroot.ipynb

/usr/lib/python3.8/site-packages/requests/models.py:1021: HTTPError
----------------------------- Captured stdout call -----------------------------
'', 'inroot'
------------------------------ Captured log call -------------------------------
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:253 delete /inroot.ipynb
DEBUG    NotebookApp:filemanager.py:553 Sending /tmp/tmpl5xvkpvz/notebooks/inroot.ipynb to trash
ERROR    NotebookApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/inroot.ipynb (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/inroot.ipynb', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/handlers.py", line 254, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/filemanager.py", line 554, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 211, in send2trash
    trash_move(path_b, dest_trash, topdir)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 117, in trash_move
    os.rename(src, op.join(filespath, destname))
OSError: [Errno 18] Invalid cross-device link: b'/tmp/tmpl5xvkpvz/notebooks/inroot.ipynb' -> b'/home/tkloczko/.local/share/Trash/files/inroot 8.ipynb'
WARNING  NotebookApp:handlers.py:617 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.28.2"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/inroot.ipynb (::1) 6.250000ms referer=None
________________ GenericFileCheckpointsAPITest.test_delete_dirs ________________

self = <notebook.services.contents.tests.test_contents_api.GenericFileCheckpointsAPITest testMethod=test_delete_dirs>

    def test_delete_dirs(self):
        # depth-first delete everything, so we don't try to delete empty directories
        for name in sorted(self.dirs + ['/'], key=len, reverse=True):
            listing = self.api.list(name).json()['content']
            for model in listing:
>               self.api.delete(model['path'])

notebook/services/contents/tests/test_contents_api.py:609:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )

        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob

/usr/lib/python3.8/site-packages/requests/models.py:1021: HTTPError
------------------------------ Captured log call -------------------------------
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/Directory%20with%20spaces%20in (::1) 5.350000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:253 delete /Directory with spaces in/inspace.blob
DEBUG    NotebookApp:filemanager.py:553 Sending /tmp/tmpl5xvkpvz/notebooks/Directory with spaces in/inspace.blob to trash
ERROR    NotebookApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/handlers.py", line 254, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/filemanager.py", line 554, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 211, in send2trash
    trash_move(path_b, dest_trash, topdir)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 117, in trash_move
    os.rename(src, op.join(filespath, destname))
OSError: [Errno 18] Invalid cross-device link: b'/tmp/tmpl5xvkpvz/notebooks/Directory with spaces in/inspace.blob' -> b'/home/tkloczko/.local/share/Trash/files/inspace 8.blob'
WARNING  NotebookApp:handlers.py:617 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.28.2"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/Directory%20with%20spaces%20in/inspace.blob (::1) 7.360000ms referer=None
___________ GenericFileCheckpointsAPITest.test_delete_non_empty_dir ____________

self = <notebook.services.contents.tests.test_contents_api.GenericFileCheckpointsAPITest testMethod=test_delete_non_empty_dir>

    def test_delete_non_empty_dir(self):
        if sys.platform == 'win32':
            self.skipTest("Disabled deleting non-empty dirs on Windows")
        # Test that non empty directory can be deleted
        try:
>           self.api.delete('å b')

notebook/services/contents/tests/test_contents_api.py:618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/contents/tests/test_contents_api.py:105: in delete
    return self._req('DELETE', path)
notebook/services/contents/tests/test_contents_api.py:59: in _req
    response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )

        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:12341/a%40b/api/contents/%C3%A5%20b

/usr/lib/python3.8/site-packages/requests/models.py:1021: HTTPError
------------------------------ Captured log call -------------------------------
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:handlers.py:253 delete /å b
DEBUG    NotebookApp:filemanager.py:553 Sending /tmp/tmpl5xvkpvz/notebooks/å b to trash
ERROR    NotebookApp:web.py:1798 Uncaught exception DELETE /a%40b/api/contents/%C3%A5%20b (::1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='DELETE', uri='/a%40b/api/contents/%C3%A5%20b', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/handlers.py", line 254, in delete
    yield maybe_future(cm.delete(path))
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/contents/filemanager.py", line 554, in delete_file
    send2trash(os_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 211, in send2trash
    trash_move(path_b, dest_trash, topdir)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_other.py", line 117, in trash_move
    os.rename(src, op.join(filespath, destname))
OSError: [Errno 18] Invalid cross-device link: b'/tmp/tmpl5xvkpvz/notebooks/\xc3\xa5 b' -> b'/home/tkloczko/.local/share/Trash/files/\xc3\xa5 b 8'
WARNING  NotebookApp:handlers.py:617 Unhandled error
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.28.2"
}
ERROR    NotebookApp:log.py:59 500 DELETE /a%40b/api/contents/%C3%A5%20b (::1) 6.330000ms referer=None
________________________ KernelAPITest.test_connections ________________________

self = <notebook.services.kernels.tests.test_kernels_api.KernelAPITest testMethod=test_connections>

    def test_connections(self):
        kid = self.kern_api.start().json()['id']
        model = self.kern_api.get(kid).json()
        self.assertEqual(model['connections'], 0)

>       ws = self.kern_api.websocket(kid)

notebook/services/kernels/tests/test_kernels_api.py:184:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
notebook/services/kernels/tests/test_kernels_api.py:73: in websocket
    return loop.run_sync(lambda : f)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tornado.platform.asyncio.AsyncIOLoop object at 0x7ff93bafe5b0>
func = <function KernelAPI.websocket.<locals>.<lambda> at 0x7ff939ef51f0>
timeout = None

    def run_sync(self, func: Callable, timeout: Optional[float] = None) -> Any:
        """Starts the `IOLoop`, runs the given function, and stops the loop.

        The function must return either an awaitable object or
        ``None``. If the function returns an awaitable object, the
        `IOLoop` will run until the awaitable is resolved (and
        `run_sync()` will return the awaitable's result). If it raises
        an exception, the `IOLoop` will stop and the exception will be
        re-raised to the caller.

        The keyword-only argument ``timeout`` may be used to set
        a maximum duration for the function.  If the timeout expires,
        a `asyncio.TimeoutError` is raised.

        This method is useful to allow asynchronous calls in a
        ``main()`` function::

            async def main():
                # do stuff...

            if __name__ == '__main__':
                IOLoop.current().run_sync(main)

        .. versionchanged:: 4.3
           Returning a non-``None``, non-awaitable value is now an error.

        .. versionchanged:: 5.0
           If a timeout occurs, the ``func`` coroutine will be cancelled.

        .. versionchanged:: 6.2
           ``tornado.util.TimeoutError`` is now an alias to ``asyncio.TimeoutError``.
        """
        future_cell = [None]  # type: List[Optional[Future]]

        def run() -> None:
            try:
                result = func()
                if result is not None:
                    from tornado.gen import convert_yielded

                    result = convert_yielded(result)
            except Exception:
                fut = Future()  # type: Future[Any]
                future_cell[0] = fut
                future_set_exc_info(fut, sys.exc_info())
            else:
                if is_future(result):
                    future_cell[0] = result
                else:
                    fut = Future()
                    future_cell[0] = fut
                    fut.set_result(result)
            assert future_cell[0] is not None
            self.add_future(future_cell[0], lambda future: self.stop())

        self.add_callback(run)
        if timeout is not None:

            def timeout_callback() -> None:
                # If we can cancel the future, do so and wait on it. If not,
                # Just stop the loop and return with the task still pending.
                # (If we neither cancel nor wait for the task, a warning
                # will be logged).
                assert future_cell[0] is not None
                if not future_cell[0].cancel():
                    self.stop()

            timeout_handle = self.add_timeout(self.time() + timeout, timeout_callback)
        self.start()
        if timeout is not None:
            self.remove_timeout(timeout_handle)
        assert future_cell[0] is not None
        if future_cell[0].cancelled() or not future_cell[0].done():
            raise TimeoutError("Operation timed out after %s seconds" % timeout)
>       return future_cell[0].result()
E       tornado.simple_httpclient.HTTPTimeoutError: Timeout during request

/usr/lib64/python3.8/site-packages/tornado/ioloop.py:529: HTTPTimeoutError
---------------------------- Captured stdout setup -----------------------------

  _   _          _      _
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|

Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

------------------------------ Captured log setup ------------------------------
DEBUG    NotebookApp:application.py:190 Searching ['/tmp/tmpp1bvm9rl/config', '/tmp/jupyter-clean-cfg-alsz1luw'] for config files
DEBUG    NotebookApp:application.py:900 Looking for jupyter_config in /tmp/jupyter-clean-cfg-alsz1luw
DEBUG    NotebookApp:application.py:900 Looking for jupyter_config in /tmp/tmpp1bvm9rl/config
DEBUG    NotebookApp:application.py:900 Looking for jupyter_notebook_config in /tmp/jupyter-clean-cfg-alsz1luw
DEBUG    NotebookApp:application.py:900 Looking for jupyter_notebook_config in /tmp/tmpp1bvm9rl/config
INFO     NotebookApp:notebookapp.py:2349 Serving notebooks from local directory: /tmp/tmpp1bvm9rl/notebooks
INFO     NotebookApp:notebookapp.py:2349 Jupyter Notebook 6.5.4 is running at:
INFO     NotebookApp:notebookapp.py:2349 http://localhost:12341/a%40b/?token=...
INFO     NotebookApp:notebookapp.py:2349  or http://127.0.0.1:12341/a%40b/?token=...
INFO     NotebookApp:notebookapp.py:2350 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
WARNING  NotebookApp:handlers.py:617 Forbidden
WARNING  NotebookApp:log.py:59 403 GET /a%40b/api/contents (::1) 1.630000ms referer=None
------------------------------ Captured log call -------------------------------
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:factory.py:95 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner
DEBUG    NotebookApp:manager.py:400 Starting kernel: ['/usr/bin/python3', '-m', 'ipykernel_launcher', '-f', '/tmp/tmpp1bvm9rl/runtime/kernel-eb1d9b5e-1c86-4c69-8494-40a88877f5a0.json']
DEBUG    NotebookApp:connect.py:641 Connecting to: tcp://127.0.0.1:37001
DEBUG    NotebookApp:connect.py:641 Connecting to: tcp://127.0.0.1:45455
INFO     NotebookApp:kernelmanager.py:179 Kernel started: eb1d9b5e-1c86-4c69-8494-40a88877f5a0, name: python3
DEBUG    NotebookApp:kernelmanager.py:180 Kernel args: {'kernel_name': 'python3'}
DEBUG    NotebookApp:log.py:59 201 POST /a%40b/api/kernels (::1) 159.300000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/kernels/eb1d9b5e-1c86-4c69-8494-40a88877f5a0 (::1) 1.720000ms
DEBUG    NotebookApp:zmqhandlers.py:298 Initializing websocket connection /a%40b/api/kernels/eb1d9b5e-1c86-4c69-8494-40a88877f5a0/channels
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
WARNING  NotebookApp:zmqhandlers.py:286 No session ID specified
DEBUG    NotebookApp:handlers.py:277 Requesting kernel info from eb1d9b5e-1c86-4c69-8494-40a88877f5a0
DEBUG    NotebookApp:connect.py:641 Connecting to: tcp://127.0.0.1:59919
DEBUG    NotebookApp:handlers.py:306 Received kernel info: {'status': 'ok', 'protocol_version': '5.3', 'implementation': 'ipython', 'implementation_version': '8.6.0', 'language_info': {'name': 'python', 'version': '3.8.16', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': "Python 3.8.16 (default, Mar  7 2023, 14:19:09) \nType 'copyright', 'credits' or 'license' for more information\nIPython 8.6.0 -- An enhanced Interactive Python. Type '?' for help.\n", 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.8'}, {'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    NotebookApp:handlers.py:579 Websocket closed eb1d9b5e-1c86-4c69-8494-40a88877f5a0:c2910455-a631cb2fd7242fd3c8b59941
DEBUG    NotebookApp:log.py:59 101 GET /a%40b/api/kernels/eb1d9b5e-1c86-4c69-8494-40a88877f5a0/channels (::1) 20023.230000ms
DEBUG    NotebookApp:zmqhandlers.py:159 Opening websocket /a%40b/api/kernels/eb1d9b5e-1c86-4c69-8494-40a88877f5a0/channels
DEBUG    NotebookApp:kernelmanager.py:252 Getting buffer for eb1d9b5e-1c86-4c69-8494-40a88877f5a0
DEBUG    NotebookApp:connect.py:641 Connecting to: tcp://127.0.0.1:45455
DEBUG    NotebookApp:connect.py:641 Connecting to: tcp://127.0.0.1:59919
DEBUG    NotebookApp:connect.py:641 Connecting to: tcp://127.0.0.1:37001
DEBUG    NotebookApp:connect.py:641 Connecting to: tcp://127.0.0.1:38171
DEBUG    NotebookApp:connect.py:641 Connecting to: tcp://127.0.0.1:59919
DEBUG    NotebookApp:connect.py:641 Connecting to: tcp://127.0.0.1:37001
DEBUG    NotebookApp:handlers.py:225 Nudge: cancelling on closed websocket: eb1d9b5e-1c86-4c69-8494-40a88877f5a0
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/kernels (::1) 2.680000ms
DEBUG    NotebookApp:login.py:216 Accepting token-authenticated connection from ::1
DEBUG    NotebookApp:kernelmanager.py:272 Clearing buffer for eb1d9b5e-1c86-4c69-8494-40a88877f5a0
INFO     NotebookApp:multikernelmanager.py:242 Kernel shutdown: eb1d9b5e-1c86-4c69-8494-40a88877f5a0
WARNING  NotebookApp:zmqhandlers.py:245 zmq message arrived on closed channel
WARNING  NotebookApp:zmqhandlers.py:245 zmq message arrived on closed channel
WARNING  NotebookApp:zmqhandlers.py:245 zmq message arrived on closed channel
DEBUG    NotebookApp:log.py:59 204 DELETE /a%40b/api/kernels/eb1d9b5e-1c86-4c69-8494-40a88877f5a0 (::1) 320.640000ms
=============================== warnings summary ===============================
notebook/nbextensions.py:15
  /home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/nbextensions.py:15: 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 (

notebook/notebookapp.py:188
  /home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/notebookapp.py:188: DeprecationWarning: invalid escape sequence \/
    print("""

notebook/utils.py:280
notebook/utils.py:280
  /home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/utils.py:280: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    return LooseVersion(v) >= LooseVersion(check)

notebook/tests/test_notebookapp_integration.py:14
  /home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/tests/test_notebookapp_integration.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.integration_tests - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    pytestmark = pytest.mark.integration_tests

notebook/services/contents/tests/test_manager.py::TestContentsManager::test_get
notebook/services/contents/tests/test_manager.py::TestContentsManagerNoAtomic::test_get
  /usr/lib64/python3.8/unittest/case.py:1215: DeprecationWarning: assertDictContainsSubset is deprecated
    warnings.warn('assertDictContainsSubset is deprecated',

notebook/services/kernels/tests/test_kernels_api.py::KernelAPITest::test_connections
  /usr/lib64/python3.8/site-packages/tornado/ioloop.py:350: DeprecationWarning: make_current is deprecated; start the event loop first
    self.make_current()

notebook/services/kernels/tests/test_kernels_api.py::KernelAPITest::test_connections
notebook/services/kernels/tests/test_kernels_api.py::AsyncKernelAPITest::test_connections
notebook/services/kernels/tests/test_kernels_api.py::KernelCullingTest::test_culling
  /home/tkloczko/rpmbuild/BUILD/notebook-6.5.4/notebook/services/kernels/tests/test_kernels_api.py:67: DeprecationWarning: make_current is deprecated; start the event loop first
    loop.make_current()

notebook/services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs
notebook/services/kernelspecs/tests/test_kernelspecs_api.py::APITest::test_list_kernelspecs_bad
  /usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py:304: UserWarning: Invalid kernelspec directory name (Kernel names can only contain ASCII letters and numbers and these separators: - . _ (hyphen, period, and underscore).): /tmp/tmphysefqnz/data/kernels/sample 2
    d = self.find_kernel_specs()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] notebook/tests/test_utils.py:83: run on windows only
FAILED notebook/services/contents/tests/test_contents_api.py::APITest::test_checkpoints_follow_file
FAILED notebook/services/contents/tests/test_contents_api.py::APITest::test_delete
FAILED notebook/services/contents/tests/test_contents_api.py::APITest::test_delete_dirs
FAILED notebook/services/contents/tests/test_contents_api.py::APITest::test_delete_non_empty_dir
FAILED notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_checkpoints_follow_file
FAILED notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_delete
FAILED notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_delete_dirs
FAILED notebook/services/contents/tests/test_contents_api.py::GenericFileCheckpointsAPITest::test_delete_non_empty_dir
FAILED notebook/services/kernels/tests/test_kernels_api.py::KernelAPITest::test_connections
= 9 failed, 315 passed, 1 skipped, 35 deselected, 13 warnings in 65.33s (0:01:05) =

kloczek avatar Apr 07 '23 13:04 kloczek

In warnings I see Unknown pytest.mark.integration_tests which can point that I have some module missing in build env however I cannot identify which one module provides that mark. May I ask for some hint? 🤔

kloczek avatar Apr 07 '23 13:04 kloczek

OK found pytest_integration. Will back with new results when will have packaged that module.

kloczek avatar Apr 07 '23 13:04 kloczek

Closing. This ticket is no outdated.

kloczek avatar Aug 28 '23 09:08 kloczek