Azure / Azure/azure-sdk-for-python
`BlobOperations.delete()` raises error on `status_code = 200`
- Vorherrschende Sprache
- Python
- Sterne
- 5.6k
- Forks
- 3.4k
- Ø Merge
- 2 T. 2 Std.
- Gemergte PRs (30 T.)
- 213
Beschreibung
- **Package Name**: azure.storage.blob
- **Package Version**: 12.25.1
- **Operating System**: Pop!_OS 22.04 LTS x86_64
- **Python Version**: 3.12
**Describe the bug**
When a 3rd party lib uses the azure.storage.blob to delete a file, it sometimes raises error when delete_blob returns status code 200 OK.
This seems to be an issue here - only accepting 202's
https://github.com/Azure/azure-sdk-for-python/blob/824cc36c5de87b4599bde65925d7fa30e9ab1737/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_blob_operations.py#L720
and here:
https://github.com/Azure/azure-sdk-for-python/blob/824cc36c5de87b4599bde65925d7fa30e9ab1737/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/operations/_blob_operations.py#L2154
**To Reproduce**
Steps to reproduce the behavior:
1. Register filesystem on DuckDB
2. Try to overwrite existing file.
```python
from adlfs import AzureBlobFileSystem
import duckdb
fs = AzureBlobFileSystem(
account_name="myaccount",
anon=False,
)
conn = duckdb.connect()
conn.register_filesystem(fs)
# Create a file
conn.execute("COPY (SELECT 1 AS 'a') TO 'abfs://mycontainer/myfile.parquet'")
# Try to overwrite - sometimes returns status code 200 which raises error
conn.execute("COPY (SELECT 1 AS 'a') TO 'abfs://mycontainer/myfile.parquet'")
```
**Expected behavior**
Should not raise error when successful.
**Screenshots**
N/A
**Additional context**
N/A
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.