Open li1311139481 opened 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.
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:
Any one can help? @JasonWeill told me i should ask the questions at here
at the same time. I can't save my notebook. The error message like:
[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
at the same time. I can't save my notebook. The error message like:
[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
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
Maybe you are right, the permission.😄
@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.
@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.
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?
@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
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!
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
Same error. Cannot delete files on an Ubuntu 22.04 VM.
@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
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. 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:
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
Linux version 3.10.0-514.21.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Thu May 25 17:04:51 UTC 2017