You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When configuring the excluded_paths and browsing in the Jupyter lab UI through the excluded paths, the jupyter server logs show a somewhat noisy (since it includes the traceback) message, like this:
2024-07-04 12:32:34 WARNING - 0 handlers write_error:774 wrote error: 'Not Found'
Traceback (most recent call last):
File "/home/grios/miniconda3/envs/analytic-4.0/lib/python3.9/site-packages/tornado/web.py", line 1769, in _execute
result = await result # type: ignore
File "/home/grios/miniconda3/envs/analytic-4.0/lib/python3.9/site-packages/jupyterlab_git/handlers.py", line 57, in prepare
raise tornado.web.HTTPError(404)
tornado.web.HTTPError: HTTP 404: Not Found
It seems this is caused because the git handler is raising a web.HTTPError(404) in the prepare method:
It would be nice if it no log message was logged (I think the perfect solution would be for the frontend to not make the request in the first place for the excluded paths) or for the message to be less noisy (not raising web.HTTPError? overriding write_error in the handler? 🤔 )
Reproduce
Configure the c.JupyterLabGit.excluded_paths = ["/somepath", "/somepath/*] in jupyter_server_config.py
Launch jupyterlab
Create (if does not exists) a folder in called "somepath" in the workspace.
Browse in the JupyterLab UI through folders inside somepath and the "noisy" log message should appear.
Expected behavior
No log message shown (or at least no traceback)
Context
Python package version:
Name: jupyterlab_git
Version: 0.50.1
Summary: A JupyterLab extension for version control using git
Home-page:
Author: Jupyter Development Team
Author-email:
License: BSD 3-Clause License
Copyright (c) 2020, Jupyter Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Location: /home/grios/miniconda3/envs/analytic-4.0/lib/python3.9/site-packages
Requires: jupyter-server, nbdime, nbformat, packaging, pexpect, traitlets
Required-by:
Extension version: @jupyterlab/git v0.50.1 enabled OK (python, jupyterlab-git)
Git version: git version 2.41.0
Operating System and its version: Ubuntu 20.04.6 LTS
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Web Browser Output
Paste the output from your browser web console here.
The text was updated successfully, but these errors were encountered:
Description
When configuring the
excluded_paths
and browsing in the Jupyter lab UI through the excluded paths, the jupyter server logs show a somewhat noisy (since it includes the traceback) message, like this:It seems this is caused because the git handler is raising a
web.HTTPError(404)
in theprepare
method:jupyterlab-git/jupyterlab_git/handlers.py
Lines 41 to 51 in 6cfb33d
and the base
APIHandler
of jupyter_server logs the error with its traceback in thewrite_error
:https://github.com/jupyter-server/jupyter_server/blob/f2d40f692c29e155349b179d57a454e7f23ea898/jupyter_server/base/handlers.py#L774.
Some time ago (#1165) an error was not raised there and we only had in the logs the less-intrusive message.
It would be nice if it no log message was logged (I think the perfect solution would be for the frontend to not make the request in the first place for the excluded paths) or for the message to be less noisy (not raising web.HTTPError? overriding write_error in the handler? 🤔 )
Reproduce
c.JupyterLabGit.excluded_paths = ["/somepath", "/somepath/*]
injupyter_server_config.py
somepath
and the "noisy" log message should appear.Expected behavior
No log message shown (or at least no traceback)
Context
@jupyterlab/git v0.50.1 enabled OK (python, jupyterlab-git)
git version 2.41.0
Command Line Output
Web Browser Output
The text was updated successfully, but these errors were encountered: