Azure / Azure/azure-storage-python
blob_size is undefined in baseblobservice
- Dominant language
- Python
- Stars
- 343
- Forks
- 243
- PR merge metrics
- No merged PRs in 30d
Description
### Which service(blob, file, queue) does this issue concern?
blob
### Which version of the SDK was used? Please provide the output of `pip freeze`.
v2.1.0
### What problem was encountered?
`blob_size` is undefined in line 2212 in `azure-storage-python/azure-storage-blob/azure/storage/blob/baseblobservice.py`
### Have you found a mitigation/solution?
Maybe we also set `blob_size` in the except branch in line 2189 and so we have it defined in both cases.
Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.
Contributor guide
Research direction
The bug is in azure-storage-python/azure-storage-blob/azure/storage/blob/baseblobservice.py, around lines 2189-2212. Start by tracing how blob_size is assigned in the normal and exception paths for the reported blob operation. Done means the operation no longer raises an undefined-variable error when the exception path is taken.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100