-
Notifications
You must be signed in to change notification settings - Fork 43
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
'OSError: Directory not found' when trying to trash file in network drive #10
Comments
I also am running into this problem: On main computer I developed my code asking it to trash a temporary file that is on an attached external hard drive. I then move this code over to my work horse computer that mounted the very same external hard drive as a network drive. When I run
However, running same code with the same path on main computer does not produce this error. I also can confirm Send2Trash will trash any file/folder I give it on the work horse computer that is locally mounted. If Send2Trash accepts the path to the file, then I don't expect there to be any issues with moving my code to another computer as MacOS mounts the network drive with the same path text. I suspect it may be some sort of Mac OS Gatekeeper or security issue...but I enabled 'Terminal' to have full disk access or for network volumes. I am not sure what else to add. |
On further research, it's not possible to trash anything that resides on a network volume on the MacOS platform. I'd advise as such in the error message if it can be accommodated. I rescind my previous comment and withdraw this issue. |
I am trying to use send2trash on a Mac OS X system.
when I try
send2trash(fn)
I get the errorOSError: Directory not found
. This only occurs when trying to trash files on my network drive (the network folder is mapped to /Volumes/...).It seems that when I try to manually move the file to trash in Finder, the file disappears completely and does not show up in Trash. I googled a little and found that OSX seems to lack support for trashing files on network volumes! (e.g. https://arstechnica.com/civis//viewtopic.php?f=19&t=1225663). I wonder if this is something that can be overcome in the send2trash code?
The text was updated successfully, but these errors were encountered: