question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot delete directory

See original GitHub issue

I’m unable to delete an S3 directory, i.e. a path ending with / using rm nor bulk_delete. There is no error raised but the actual directory does not get deleted.

Code to reproduce:

# Create a folder in an S3 bucket via S3 console
s3fs = S3FileSystem()
s3fs.rm('bucket/folder/')
# Observe the directory remained in S3

I guess this is the result of calling the S3FileSystem.split_path(path) which calls the AbstractFileSystem._strip_protocol(path) which also strips the trailing slash.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
martindurantcommented, Sep 1, 2020
0reactions
martindurantcommented, Feb 5, 2022

Thanks for the ping, I’ll look into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't Delete a File or Folder in Windows 10? Force Delete It
Tip 1. Close all open programs that might be currently using the file or folder. · Tip 2. Press Ctrl + Shift +...
Read more >
Can't delete folder - Microsoft Community
Can't delete folder · Right-click on the file or folder and go to Properties window. · In the next window, you will see...
Read more >
Can't Delete Folder? How to Force Delete Folder in Windows 10
1. Reboot your system · 2. Force delete folder in Windows 10 using CMD · 3. Use a specialized PC cleaning software ·...
Read more >
[Solved] Unable to Delete a Folder In Windows 10 - mulcas
Option 1: Restart Windows File Explorer · Option 2: Remove the folder using Windows Command-line · Option 3: Rename the folder using Windows ......
Read more >
Windows 10: Can´t Delete Folder or File - Here Is the Fix
The most common reason why you cannot delete a file is lack of user rights on the system. If your user account does...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found