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

Issue with partitioned drive #3

Open
Wintg005 opened this issue Jun 4, 2015 · 12 comments
Open

Issue with partitioned drive #3

Wintg005 opened this issue Jun 4, 2015 · 12 comments
Labels
bug windows Affects windows OS only

Comments

@Wintg005
Copy link

Wintg005 commented Jun 4, 2015

Just was curious to see if folks had issues with partitioned drives and sending to the bin. Currently using the script and its working great on my local drive but for some reason my partitioned drive is having issues. The files are being removed but not sent to the bin. Thanks for any advice!

@ghost
Copy link

ghost commented Jun 4, 2015

Some more details would probably not hurt, such as your operating system and what you mean by "partitioned drive" (partition type, formats used in each partition, etc.)

@Wintg005
Copy link
Author

Wintg005 commented Jun 4, 2015

Sorry, on one machine Im getting "OSError: Couldn't perform operation. Error Code: 2." On another machine the files delete fine with no error code. Im trying to get rid of wav files. Looking at a Local NTFS drive. Let me know if there any other details I can provide

@ghost
Copy link

ghost commented Jun 4, 2015

On Windows?

@Wintg005
Copy link
Author

Wintg005 commented Jun 4, 2015

yep windows.

@Wintg005
Copy link
Author

Wintg005 commented Jun 4, 2015

the odd thing is that the partioned drive works on another machine. It removes the files but doesnt send them to the trash. on the first machine I get that error.

@ghost
Copy link

ghost commented Jun 4, 2015

I will probably not be the one fixing this issue, I don't use Windows, but it seems to me that there's enough details in this ticket to get somewhere.

@Wintg005
Copy link
Author

Wintg005 commented Jun 4, 2015

Sounds good. Thanks for the info on what else folks may need! Also, scratch the OSerror issue. All seems to be working ok in general. That error was unrelated to the un partitioned drive issue.

@arsenetar arsenetar added bug windows Affects windows OS only labels Jan 22, 2021
@biggestsonicfan
Copy link

biggestsonicfan commented Mar 4, 2022

Using send2trash on Linux with an NTFS formatted drive mounted:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 17, in send2trash
    f.trash(cancellable=None)
gi.repository.GLib.GError: g-io-error-quark: Unable to find or create trash directory /run/media/name/Seagate Backup Plus Drive/.Trash-1000 to trash /run/media/name/Seagate Backup Plus Drive/NewArchive/#ペン (405) (15)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/name/pixiv-clean/post-move-cleanup.py", line 253, in <module>
    init_config_with_ids_and_names(newarchive_dir_list, name_config_file)
  File "/home/name/pixiv-clean/post-move-cleanup.py", line 121, in init_config_with_ids_and_names
    send2trash(entry_path)
  File "/usr/lib/python3.8/site-packages/send2trash/plat_gio.py", line 22, in send2trash
    raise TrashPermissionError("")
send2trash.exceptions.TrashPermissionError: [Errno 13] Permission denied: ''

EDIT: This issue may be more related to #67 than this issue, apologies.

@arsenetar
Copy link
Owner

@cglmrfreeman This error looks like there are not permissions to create the trash directory (or access an existing one) on the drive where the file is being trashed.

@biggestsonicfan
Copy link

@cglmrfreeman This error looks like there are not permissions to create the trash directory (or access an existing one) on the drive where the file is being trashed.

I thought that was obvious? The error is literally Unable to find or create trash directory /run/media/name/Seagate Backup Plus Drive/.Trash-1000. The question is: Why?

@arsenetar
Copy link
Owner

@cglmrfreeman, does the user you were running send2trash with have permissions to the drive in your error? This should only happen if the permissions on the drive do not allow you to create and/or read the directory that is trying to be used. If the user does not have permissions this is the expected behavior.

@biggestsonicfan
Copy link

biggestsonicfan commented May 1, 2022

The user has permissions, and I have been using python to create, move, copy, and delete files on that drive. Send2trash was the only thing that has failed for me regarding some automated script cleanup I was working on.

EDIT: I have since moved from the ntfs mounting driver to the ntfs3 mounting driver and can no longer reproduce this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug windows Affects windows OS only
Projects
None yet
Development

No branches or pull requests

3 participants