Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to browse into a directory that contains a broken symlink #7890

Open
romaingz opened this issue Feb 17, 2020 · 1 comment
Open

Enable to browse into a directory that contains a broken symlink #7890

romaingz opened this issue Feb 17, 2020 · 1 comment

Comments

@romaingz
Copy link

romaingz commented Feb 17, 2020

Description

Using the file browser on the left, I cannot browse to a directory that contains a broken symlink.

Reproduce

  1. In your home create a directory that contains a broken symlink
  2. Go to jupyterlab
  3. On the left pane (file browser) double click on that directory
  4. The browser does not open the directory

Expected behavior

I expect the directory to open and exclude the broken symlink from the view.

Context

  • Operating System and version: CentOS 7
  • Browser and version: Chrome 80
  • JupyterLab version: 1.2.1
Troubleshoot Output Here's what my browser shows as a response for the http request (it's actually on a single line, I've replaced \n chars to make it more readable):
{"message": "Unhandled error", "reason": null, "traceback": "Traceback (most recent call last):
  File \"/opt/conda/lib/python3.7/site-packages/tornado/web.py\", line 1699, in _execute
    result = await result
  File \"/opt/conda/lib/python3.7/site-packages/tornado/gen.py\", line 209, in wrapper
    yielded = next(result)
  File \"/opt/conda/lib/python3.7/site-packages/notebook/services/contents/handlers.py\", line 112, in get
    path=path, type=type, format=format, content=content,
  File \"/opt/conda/lib/python3.7/site-packages/notebook/services/contents/filemanager.py\", line 431, in get
    model = self._dir_model(path, content=content)
  File \"/opt/conda/lib/python3.7/site-packages/notebook/services/contents/filemanager.py\", line 338, in _dir_model
    if self.allow_hidden or not is_file_hidden(os_path, stat_res=st):
  File \"/opt/conda/lib/python3.7/site-packages/notebook/utils.py\", line 154, in is_file_hidden_posix
    stat_res = os.stat(abs_path)
PermissionError: [Errno 13] Permission denied: '/path/to/broken_link'
"}

Note that path/to/broken_link is the actual broken link and my issue is about being enable to browse into /path/to.

@vidartf
Copy link
Member

vidartf commented Feb 25, 2020

Given that the exception is in the content manager (/notebook/services/contents/filemanager.py in trace), I think this issue might be better posted on the jupyter/notebook repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants