Skip to content

send2trash.exceptions.TrashPermissionError #3374

@nick-youngblut

Description

@nick-youngblut

I'm getting the following error when trying to trash (delete) a notebook (Untitled.ipynb):

Traceback (most recent call last): 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/send2trash/plat_other.py", 
line 141, in find_ext_volume_fallback_trash check_create(trash_dir) File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/send2trash/plat_other.py", 
line 86, in check_create os.makedirs(dir, 0o700) File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/os.py", 
line 220, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: b'/ebio/abt3_projects/.Trash-6354' 

During handling of the above exception, another exception occurred: Traceback (most recent call last): 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/tornado/web.py", line 1512, in _execute result = yield result 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run value = future.result() 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result raise_exc_info(self._exc_info) File "<string>", line 4, in raise_exc_info 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/tornado/gen.py", line 307, in wrapper yielded = next(result) 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/notebook/services/contents/handlers.py", line 235, in delete yield gen.maybe_future(cm.delete(path)) 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/notebook/services/contents/manager.py", line 278, in delete self.delete_file(path) 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/notebook/services/contents/filemanager.py", line 499, in delete_file send2trash(os_path) 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/send2trash/plat_other.py", line 191, in send2trash dest_trash = find_ext_volume_trash(topdir) 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/send2trash/plat_other.py", line 151, in find_ext_volume_trash trash_dir = find_ext_volume_fallback_trash(volume_root) 
File "/ebio/abt3_projects/software/miniconda3_gt4.4/lib/python3.6/site-packages/send2trash/plat_other.py", line 144, in find_ext_volume_fallback_trash raise TrashPermissionError(e.filename) send2trash.exceptions.TrashPermissionError: [Errno 13] Permission denied: b'/ebio/abt3_projects/.Trash-6354'

Apparently, Jupyter is trying to write to the /ebio/abt3_projects/ folder, but I don't have access to this directory. How do I change the directory for ./Trash-*?

I'm running Jupyter installed in conda 4.4.10 on Ubuntu 16.04.3. Here's my Jupyter install info:

jupyter                   1.0.0                    py36_0    conda-forge
jupyter_client            5.2.2                    py36_0    conda-forge
jupyter_console           5.2.0                    py36_0    conda-forge
jupyter_contrib_core      0.3.3                    py36_1    conda-forge
jupyter_contrib_nbextensions 0.4.0                    py36_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
jupyter_highlight_selected_word 0.1.0                    py36_0    conda-forge
jupyter_latex_envs        1.4.0                    py36_1    conda-forge
jupyter_nbextensions_configurator 0.4.0                    py36_0    conda-forge

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions