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

Cannot delete file in Jupyter Browser on Android, getting error #7154

Closed
iamthekings5 opened this issue Nov 15, 2023 · 6 comments
Closed

Cannot delete file in Jupyter Browser on Android, getting error #7154

iamthekings5 opened this issue Nov 15, 2023 · 6 comments
Labels
bug status:Needs Info status:Needs Triage Applied to issues that need triage

Comments

@iamthekings5
Copy link

Please answer the following questions for yourself before submitting an issue

  • [/ ] I checked the documentation and found no answer
  • [/ ] I checked to make sure that this issue has not already been filed
  • [/ ] I'm reporting the issue to the correct repository

Description

When I try to delete a file in Jupyter Browser I get an error.
Screenshot_20231115_211136_Kiwi Browser

Reproduce

Attempt to delete a file on Jupyter Browser, fails to delete. File can be deleted from Android File Browser

Expected behavior

File should be deleted with no issue.

Context

  • Operating System and version: Android 13 OneUI 5.1.1 Galaxy Tab S7+
  • Browser and version: Kiwi Browser
  • Jupyter Notebook version: 7.0.6

[W 2023-11-15 21:16:43.262 ServerApp] delete /untitled.py
[W 2023-11-15 21:16:43.270 ServerApp] 400 DELETE /api/contents/untitled.py?1700083003253 (127.0.0.1): send2trash f1ailed: [Errno 2] No such file or directory: b'/storage/emulated/.Trash-10433' [W 2023-11-15 21:16:43.270 ServerApp] wrote error: "send2trash f1ailed: [Errno 2] No such file or directory: b'/storage/emulated/.Trash-10433'"
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 981, in delete_file
send2trash(os_path)
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/send2trash/plat_other.py", line 210, in send2trash
dest_trash = find_ext_volume_trash(topdir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/send2trash/plat_other.py", line 169, in find_ext_volume_trash
trash_dir = find_ext_volume_fallback_trash(volume_root)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/send2trash/plat_other.py", line 158, in find_ext_volume_fallback_trash
check_create(trash_dir)
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/send2trash/plat_other.py", line 96, in check_create
os.makedirs(dir, 0o700)
File "", line 225, in makedirs
FileNotFoundError: [Errno 2] No such file or directory: b'/storage/emulated/.Trash-10433'

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

Traceback (most recent call last):
  File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tornado/web.py", line 1786, in _execute
    result = await result
             ^^^^^^^^^^^^
  File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/jupyter_server/services/contents/handlers.py", line 282, in delete
    await ensure_async(cm.delete(path))
  File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/jupyter_core/utils/__init__.py", line 189, in ensure_async
    result = await obj
             ^^^^^^^^^
  File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/jupyter_server/services/contents/manager.py", line 883, in delete
    await self.delete_file(path)
  File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 983, 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 2] No such file or directory: b'/storage/emulated/.Trash-10433')

[W 2023-11-15 21:16:43.274 ServerApp] 400 DELETE /api/contents/untitled.py?1700083003253 (70796d65ece8431daee5ce93086dfa98@127.0.0.1) 13.98ms referer=http://localhost:8888/tree

@iamthekings5 iamthekings5 added bug status:Needs Triage Applied to issues that need triage labels Nov 15, 2023
@RRosio
Copy link
Collaborator

RRosio commented Nov 28, 2023

Thank you @iamthekings5 for opening this issue. Would you be able to share the version of Jupyter Server and sendToTrash that are installed?

@RRosio RRosio changed the title Cannot delete file in Jupyter Browser, getting error Cannot delete file in Jupyter Browser on Android, getting error Nov 28, 2023
@iamthekings5
Copy link
Author

Thank you @iamthekings5 for opening this issue. Would you be able to share the version of Jupyter Server and sendToTrash that are installed?

May I know how I can go about doing both?

@RRosio
Copy link
Collaborator

RRosio commented Nov 28, 2023

Thank you for your reply! You can view the Jupyter subproject versions with the command: jupyter --version, and you can open an issue in the send2Trash repository at the following link: https://github.com/arsenetar/send2trash/issues.

@iamthekings5
Copy link
Author

Thank you for your reply! You can view the Jupyter subproject versions with the command: jupyter --version, and you can open an issue in the send2Trash repository at the following link: https://github.com/arsenetar/send2trash/issues.

my jupyter server version is 2.10.0 and my send2trash version is 1.8.2.

@RRosio
Copy link
Collaborator

RRosio commented Nov 28, 2023

Thank you @iamthekings5, sorry I got a bit ahead of myself in the previous comment, an issue in send2Trash repo may or may not be necessary.

I found an issue in jupyter_server, with a different version 2.7.3 but the same version of send2Trash. There is a suggestion to try in that issue. Is this a change you can try?

@iamthekings5
Copy link
Author

Thank you @iamthekings5, sorry I got a bit ahead of myself in the previous comment, an issue in send2Trash repo may or may not be necessary.

I found an issue in jupyter_server, with a different version 2.7.3 but the same version of send2Trash. There is a suggestion to try in that issue. Is this a change you can try?

Issue has been resolved, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status:Needs Info status:Needs Triage Applied to issues that need triage
Projects
None yet
Development

No branches or pull requests

2 participants