Coder Social home page Coder Social logo

Comments (11)

li1311139481 avatar li1311139481 commented on July 3, 2024 2

@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.

from jupyter_server.

li1311139481 avatar li1311139481 commented on July 3, 2024 2

@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 setting c.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.

from jupyter_server.

Wh1isper avatar Wh1isper commented on July 3, 2024 1

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: #1237 (comment)

For cannot save file

Maybe you are right, the permission.😄

from jupyter_server.

Wh1isper avatar Wh1isper commented on July 3, 2024 1

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 arsenetar/send2trash#87

from jupyter_server.

welcome avatar welcome commented on July 3, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

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! 👋

Welcome to the Jupyter community! 🎉

from jupyter_server.

li1311139481 avatar li1311139481 commented on July 3, 2024

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

from jupyter_server.

li1311139481 avatar li1311139481 commented on July 3, 2024

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 ([email protected]) 45.54ms referer=http://172.19.247.27:8789/lab

from jupyter_server.

li1311139481 avatar li1311139481 commented on July 3, 2024

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 ([email protected]) 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

from jupyter_server.

krassowski avatar krassowski commented on July 3, 2024

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?

from jupyter_server.

li1311139481 avatar li1311139481 commented on July 3, 2024

@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

from jupyter_server.

krassowski avatar krassowski commented on July 3, 2024

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!

from jupyter_server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.