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

can't delete file from the file explorer #15589

Open
lpuglia opened this issue Jan 1, 2024 · 4 comments
Open

can't delete file from the file explorer #15589

lpuglia opened this issue Jan 1, 2024 · 4 comments

Comments

@lpuglia
Copy link

lpuglia commented Jan 1, 2024

Description

Once upon a time (Jupyterlab < 4.0.0) i was able to remove files directly from the file explorer, right click and then Delete option. Since I updated to the newer versions i'm not able anymore, whenever i press the delete option i get the following message:

image

It is clear to me why this is happening: my user doesn't have permission to create a folder into /local_storage0, but this was not happening in the past. Is there a way to force the old behavior or change where the trash folder is created?

Reproduce

click the Delete button:
image

Expected behavior

To delete the file, duh.

Context

  • Operating System and version: Ubuntu 22.04
  • Browser and version: Any
  • JupyterLab version: >4.0.0
@lpuglia lpuglia added the bug label Jan 1, 2024
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Jan 1, 2024
@krassowski
Copy link
Member

krassowski commented Jan 2, 2024

Other issues where similar problems with send2trash were mentioned:

Ultimately, this is a problem in send2trash implementation or usage. While this is a bug that needs to be addressed in the Jupyter stack, the code for send2trash integration does not live in JupyterLab repository but in jupyter_server. The most recent relevant issue in jupyter-server is: jupyter-server/jupyter_server#1338. You can workaround this by disabling sending files to trash with FileContentsManager.delete_to_trash=False option/traitlet (see https://jupyter-server.readthedocs.io/en/latest/users/configuration.html and https://jupyter-server.readthedocs.io/en/latest/other/full-config.html#other-full-config).

@lpuglia
Copy link
Author

lpuglia commented Jan 3, 2024

Other issues where similar problems with send2trash were mentioned:

Ultimately, this is a problem in send2trash implementation or usage. While this is a bug that needs to be addressed in the Jupyter stack, the code for send2trash integration does not live in JupyterLab repository but in jupyter_server. The most recent relevant issue in jupyter-server is: jupyter-server/jupyter_server#1338. You can workaround this by disabling sending files to trash with FileContentsManager.delete_to_trash=False option/traitlet (see https://jupyter-server.readthedocs.io/en/latest/users/configuration.html and https://jupyter-server.readthedocs.io/en/latest/other/full-config.html#other-full-config).

just tried the suggested workaround, i was only able to find c.FileContentsManager.delete_to_trash into .jupyter/jupyter_notebook_config.py, but setting:

jupyter_notebook_config.py:c.FileContentsManager.delete_to_trash = True

didn't worked, any help?

@krassowski
Copy link
Member

krassowski commented Jan 3, 2024

jupyter_notebook_configjupyter_server_config (https://jupyter-server.readthedocs.io/en/latest/users/configuration.html and https://jupyter-server.readthedocs.io/en/latest/operators/migrate-from-nbserver.html)

Edit: it also should be False not True

@lpuglia
Copy link
Author

lpuglia commented Jan 3, 2024

Edit: it also should be False not True

This actually worked

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

No branches or pull requests

3 participants