jupyter-server / jupyter_server

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

can't delete file in jupyterlab #1338

Open li1311139481 opened 1 year ago

li1311139481 commented 1 year ago

Description

I'm using jupyterlab 4.0.6 in a cluster. When i want delete a file in jupyterlab. I get an error like this. image This error occurs when I try to create and then delete files in jupyterlab, and when I try to delete existing files. I have checked the permissions of these files in the terminal, where I can delete them. The error message in terminal like this:

[W 2023-10-07 15:04:16.735 ServerApp] delete /zifeng001/ZF065_ovarian_ascites/Junlian/sada.ipynb
[W 2023-10-07 15:04:16.736 ServerApp] 400 DELETE /api/contents/zifeng001/ZF065_ovarian_ascites/Junlian/sada.ipynb?1696662257091 (10.26.20.81): send2trash f`1ailed: [Errno 13] P
ermission denied: b'/cluster/.Trash-1085'
[W 2023-10-07 15:04:16.737 ServerApp] wrote error: "send2trash f`1ailed: [Errno 13] Permission denied: b'/cluster/.Trash-1085'"
    Traceback (most recent call last):
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/send2trash/plat_other.py", line 158, in find_ext_volume_fallback_trash
        check_create(trash_dir)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/send2trash/plat_other.py", line 96, in check_create
        os.makedirs(dir, 0o700)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/os.py", line 225, in makedirs
        mkdir(name, mode)
    PermissionError: [Errno 13] Permission denied: b'/cluster/.Trash-1085'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/jupyter_server/services/contents/filemanager.py", line 979, in delete_file
        send2trash(os_path)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/send2trash/plat_other.py", line 210, in send2trash
        dest_trash = find_ext_volume_trash(topdir)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/send2trash/plat_other.py", line 169, in find_ext_volume_trash
        trash_dir = find_ext_volume_fallback_trash(volume_root)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/send2trash/plat_other.py", line 161, in find_ext_volume_fallback_trash
        raise TrashPermissionError(e.filename)
    send2trash.exceptions.TrashPermissionError: [Errno 13] Permission denied: b'/cluster/.Trash-1085'

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/jupyter_server/services/contents/handlers.py", line 282, in delete
        await ensure_async(cm.delete(path))
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/jupyter_core/utils/__init__.py", line 184, in ensure_async
        result = await obj
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/jupyter_server/services/contents/manager.py", line 882, in delete
        await self.delete_file(path)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.10/site-packages/jupyter_server/services/contents/filemanager.py", line 981, in delete_file
        raise web.HTTPError(400, "send2trash f`1ailed: %s" % e) from e
    tornado.web.HTTPError: HTTP 400: Bad Request (send2trash f`1ailed: [Errno 13] Permission denied: b'/cluster/.Trash-1085')

Reproduce

I don't know how to reproduce it in other environments. All I did was simply delete a file

Expected behavior

I hope you can help me to solve it, because deleting files in jupyterlab is a very convenient feature

Context

welcome[bot] commented 1 year ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

li1311139481 commented 1 year ago

Any one can help? @JasonWeill told me i should ask the questions at here

li1311139481 commented 1 year ago

at the same time. I can't save my notebook. The error message like: image

[I 2023-11-07 20:03:18.309 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-la
ngserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab
, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, ya
ml-language-server
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[I 2023-11-07 20:03:26.745 LabApp] Build is up to date
/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/__init__.py:93: MissingIDFieldWarning: Code cell is missing an id f
ield, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since
 nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
  validate(nb)
[W 2023-11-07 20:03:27.061 ServerApp] Notebook zifeng001/ZF067_PAAD/scRNAseq/Frankel_2020_natcancer/ZF067_frankel.ipynb is not trusted
[I 2023-11-07 20:03:29.198 ServerApp] Kernel started: 7590ea66-0e9c-40d5-b1a8-5f13f441f11f
[I 2023-11-07 20:03:29.204 ServerApp] Kernel started: 6d138951-292e-4425-8903-8af799783edf
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[IPKernelApp] ERROR | Failed to create history session in /tmp/ipython_hist.sqlite. History will not be saved.
Traceback (most recent call last):
  File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/IPython/core/history.py", line 549, in __init__
    self.new_session()
  File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/IPython/core/history.py", line 60, in only_when_enabled
    return f(self, *a, **kw)
           ^^^^^^^^^^^^^^^^^
  File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/IPython/core/history.py", line 574, in new_session
    cur = conn.execute(
          ^^^^^^^^^^^^^
sqlite3.OperationalError: attempt to write a readonly database
[I 2023-11-07 20:03:30.347 ServerApp] Connecting to kernel 6d138951-292e-4425-8903-8af799783edf.
[I 2023-11-07 20:03:30.408 ServerApp] Connecting to kernel 7590ea66-0e9c-40d5-b1a8-5f13f441f11f.
[I 2023-11-07 20:03:30.446 ServerApp] Connecting to kernel 6d138951-292e-4425-8903-8af799783edf.
[I 2023-11-07 20:03:30.496 ServerApp] Connecting to kernel 6d138951-292e-4425-8903-8af799783edf.
[I 2023-11-07 20:03:32.178 ServerApp] Saving file at /Untitled.ipynb
[I 2023-11-07 20:03:35.108 ServerApp] Saving file at /Untitled.ipynb
[E 2023-11-07 20:03:35.143 ServerApp] Error while saving file: Untitled.ipynb disk I/O error
    Traceback (most recent call last):
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/filemanager.py", line 913, in save
        self.check_and_sign(nb, path)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/manager.py", line 712, in check_and_sign
        self.notary.sign(nb)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/sign.py", line 477, in sign
        self.store.store_signature(signature, self.algorithm)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/sign.py", line 233, in store_signature
        (n,) = self.db.execute("SELECT Count(*) FROM nbsignatures").fetchone()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    sqlite3.OperationalError: disk I/O error
[W 2023-11-07 20:03:35.147 ServerApp] 500 PUT /api/contents/Untitled.ipynb?1699358615086 (10.26.20.81): Unexpected error while saving file: Untitled.ipynb disk I/O error
[W 2023-11-07 20:03:35.147 ServerApp] wrote error: 'Unexpected error while saving file: Untitled.ipynb disk I/O error'
    Traceback (most recent call last):
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/filemanager.py", line 913, in save
        self.check_and_sign(nb, path)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/manager.py", line 712, in check_and_sign
        self.notary.sign(nb)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/sign.py", line 477, in sign
        self.store.store_signature(signature, self.algorithm)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/sign.py", line 233, in store_signature
        (n,) = self.db.execute("SELECT Count(*) FROM nbsignatures").fetchone()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    sqlite3.OperationalError: disk I/O error

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/tornado/web.py", line 1786, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/handlers.py", line 266, in put
        await self._save(model, path)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/handlers.py", line 191, in _save
        model = await ensure_async(self.contents_manager.save(model, path))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_core/utils/__init__.py", line 189, in ensure_async
        result = await obj
                 ^^^^^^^^^
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/largefilemanager.py", line 133,
 in save
        return await super().save(model, path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/filemanager.py", line 929, in save
        raise web.HTTPError(500, f"Unexpected error while saving file: {path} {e}") from e
    tornado.web.HTTPError: HTTP 500: Internal Server Error (Unexpected error while saving file: Untitled.ipynb disk I/O error)
[E 2023-11-07 20:03:35.153 ServerApp] {
      "Host": "172.19.247.27:8789",
      "Accept": "*/*",
      "Referer": "http://172.19.247.27:8789/lab",
      "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0"
    }
[E 2023-11-07 20:03:35.153 ServerApp] 500 PUT /api/contents/Untitled.ipynb?1699358615086 (c5ac8133dec94235a4e0ccc95f9b5582@10.26.20.81) 45.54ms referer=http://172.19.247.27:8789/lab
li1311139481 commented 1 year ago

at the same time. I can't save my notebook. The error message like: image

[I 2023-11-07 20:03:18.309 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-la
ngserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab
, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, ya
ml-language-server
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[I 2023-11-07 20:03:26.745 LabApp] Build is up to date
/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/__init__.py:93: MissingIDFieldWarning: Code cell is missing an id f
ield, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since
 nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
  validate(nb)
[W 2023-11-07 20:03:27.061 ServerApp] Notebook zifeng001/ZF067_PAAD/scRNAseq/Frankel_2020_natcancer/ZF067_frankel.ipynb is not trusted
[I 2023-11-07 20:03:29.198 ServerApp] Kernel started: 7590ea66-0e9c-40d5-b1a8-5f13f441f11f
[I 2023-11-07 20:03:29.204 ServerApp] Kernel started: 6d138951-292e-4425-8903-8af799783edf
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[IPKernelApp] ERROR | Failed to create history session in /tmp/ipython_hist.sqlite. History will not be saved.
Traceback (most recent call last):
  File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/IPython/core/history.py", line 549, in __init__
    self.new_session()
  File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/IPython/core/history.py", line 60, in only_when_enabled
    return f(self, *a, **kw)
           ^^^^^^^^^^^^^^^^^
  File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/IPython/core/history.py", line 574, in new_session
    cur = conn.execute(
          ^^^^^^^^^^^^^
sqlite3.OperationalError: attempt to write a readonly database
[I 2023-11-07 20:03:30.347 ServerApp] Connecting to kernel 6d138951-292e-4425-8903-8af799783edf.
[I 2023-11-07 20:03:30.408 ServerApp] Connecting to kernel 7590ea66-0e9c-40d5-b1a8-5f13f441f11f.
[I 2023-11-07 20:03:30.446 ServerApp] Connecting to kernel 6d138951-292e-4425-8903-8af799783edf.
[I 2023-11-07 20:03:30.496 ServerApp] Connecting to kernel 6d138951-292e-4425-8903-8af799783edf.
[I 2023-11-07 20:03:32.178 ServerApp] Saving file at /Untitled.ipynb
[I 2023-11-07 20:03:35.108 ServerApp] Saving file at /Untitled.ipynb
[E 2023-11-07 20:03:35.143 ServerApp] Error while saving file: Untitled.ipynb disk I/O error
    Traceback (most recent call last):
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/filemanager.py", line 913, in save
        self.check_and_sign(nb, path)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/manager.py", line 712, in check_and_sign
        self.notary.sign(nb)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/sign.py", line 477, in sign
        self.store.store_signature(signature, self.algorithm)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/sign.py", line 233, in store_signature
        (n,) = self.db.execute("SELECT Count(*) FROM nbsignatures").fetchone()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    sqlite3.OperationalError: disk I/O error
[W 2023-11-07 20:03:35.147 ServerApp] 500 PUT /api/contents/Untitled.ipynb?1699358615086 (10.26.20.81): Unexpected error while saving file: Untitled.ipynb disk I/O error
[W 2023-11-07 20:03:35.147 ServerApp] wrote error: 'Unexpected error while saving file: Untitled.ipynb disk I/O error'
    Traceback (most recent call last):
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/filemanager.py", line 913, in save
        self.check_and_sign(nb, path)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/manager.py", line 712, in check_and_sign
        self.notary.sign(nb)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/sign.py", line 477, in sign
        self.store.store_signature(signature, self.algorithm)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/nbformat/sign.py", line 233, in store_signature
        (n,) = self.db.execute("SELECT Count(*) FROM nbsignatures").fetchone()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    sqlite3.OperationalError: disk I/O error

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/tornado/web.py", line 1786, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/handlers.py", line 266, in put
        await self._save(model, path)
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/handlers.py", line 191, in _save
        model = await ensure_async(self.contents_manager.save(model, path))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_core/utils/__init__.py", line 189, in ensure_async
        result = await obj
                 ^^^^^^^^^
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/largefilemanager.py", line 133,
 in save
        return await super().save(model, path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/cluster/facility/hlhuang/miniconda3/envs/jlab/lib/python3.12/site-packages/jupyter_server/services/contents/filemanager.py", line 929, in save
        raise web.HTTPError(500, f"Unexpected error while saving file: {path} {e}") from e
    tornado.web.HTTPError: HTTP 500: Internal Server Error (Unexpected error while saving file: Untitled.ipynb disk I/O error)
[E 2023-11-07 20:03:35.153 ServerApp] {
      "Host": "172.19.247.27:8789",
      "Accept": "*/*",
      "Referer": "http://172.19.247.27:8789/lab",
      "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0"
    }
[E 2023-11-07 20:03:35.153 ServerApp] 500 PUT /api/contents/Untitled.ipynb?1699358615086 (c5ac8133dec94235a4e0ccc95f9b5582@10.26.20.81) 45.54ms referer=http://172.19.247.27:8789/lab

a reason for the error may be that the /tmp/ipython_hist.sqlite file is not myself. I do not have permission to edit this file on the computer cluster

Wh1isper commented 11 months ago

For cannot delete file

Try setting c.FileContentsManager.delete_to_trash = False or

$jupyter server --FileContentsManager.delete_to_trash=False

About config: https://jupyter-server.readthedocs.io/en/latest/users/configuration.html

I'm guessing it's for the same reason as this comment: https://github.com/jupyter-server/jupyter_server/issues/1237#issuecomment-1817402822

For cannot save file

Maybe you are right, the permission.😄

li1311139481 commented 11 months ago

@Wh1isper Thank for your reply. Neither issue occurs with Jupyterlab 3.4.8. so now i use Jupyterlab 3.4.8. But i will test $jupyter server --FileContentsManager.delete_to_trash=False to see if works. In the meantime, I'll continue to wait and see if someone can solve the problem of not being able to save files. Thanks your contribution.

li1311139481 commented 10 months ago

@Wh1isper I come back. After I updated jupyterlab to 4.0.9. And I found I can save my file. I also tried to setting Try settingc.FileContentsManager.delete_to_trash = False or $jupyter server --FileContentsManager.delete_to_trash=False. If you edit your ~/.jupyter/jupyter_lab_config.py file. and add a line of c.FileContentsManager.delete_to_trash = False. It worked, I can delete my file. If you use$jupyter server --FileContentsManager.delete_to_trash=False, I can delete my file. But when I restart jupyterlab. I have to use $jupyter server --FileContentsManager.delete_to_trash=False again.

krassowski commented 10 months ago

Should we reopen this issue? While I appreciate that this can be worked around using a configuration setting, it does not appear right that users should need to perform any action for delete to just work.

If this is not a bug in jupyter-server itself, maybe we should reconsider if send2trash is the right library to depend on?

li1311139481 commented 10 months ago

@krassowski Thank you for your attention, and if you think this question is important, please reopen the question. If you want, I'd be happy to help you test whether the changes you make are feasible

krassowski commented 10 months ago

please reopen the question

I would appreciate if you can click the reopen button because I do not have rights on this repo.

I'd be happy to help you test whether the changes you make are feasible

Thank you!

Wh1isper commented 10 months ago

If this is not a bug in jupyter-server itself, maybe we should reconsider if send2trash is the right library to depend on?

I've read the related issue and I think Send2Trash should select the Trash folder with right permissions.(Note that Trash has its own structure.)

Also, I was wondering if we cloud have a "restore files/folders from Trash" feature? It seems like we only offer a hidden manual recovery feature. (through Linux Desktop or gio CLI)

Update: I just raised an issue on Send2Trash https://github.com/arsenetar/send2trash/issues/87

sorenwacker commented 2 months ago

Same error. Cannot delete files on an Ubuntu 22.04 VM.

li1311139481 commented 2 months ago

@sorenwacker
Hello. After update jupyter and do something, I solve the problem. you can try use: jupyter server --generate-config Then you will find a file named jupyter_server_config.py in /cluster/home/hlhuang/.jupyter/. replace it using your home path. Then you can try add a c.FileContentsManager.delete_to_trash = False in this file. maybe it will work. Because it has been too long, I can't remember what changes I made. Can we continue to discuss if there are any questions