Cannot import name 'BaseBlobService'
See original GitHub issueHi,
I have a problem importing the class BaseBlobService. When I try:
from azure.storage.blob import BaseBlobService
I get the error:
ImportError: cannot import name 'BaseBlobService'
Other classes, e.g. BlockBlobService work just fine. However with BaseBlobService I have to import the file baseblobservice.py first and then access the class using baseblobservice.BaseBlobService.
>>> platform.python_version() '3.6.2'
- azure 2.0.0 <pip>
- azure-batch 3.0.0 <pip>
- azure-common 1.1.8 <pip>
- azure-datalake-store 0.0.17 <pip>
- azure-graphrbac 0.30.0 <pip>
- azure-keyvault 0.3.7 <pip>
- azure-mgmt 1.0.0 <pip>
- azure-mgmt-authorization 0.30.0 <pip>
- azure-mgmt-batch 4.0.0 <pip>
- azure-mgmt-cdn 0.30.3 <pip>
- azure-mgmt-cognitiveservices 1.0.0 <pip>
- azure-mgmt-compute 1.0.0 <pip>
- azure-mgmt-containerregistry 0.2.1 <pip>
- azure-mgmt-datalake-analytics 0.1.6 <pip>
- azure-mgmt-datalake-nspkg 2.0.0 <pip>
- azure-mgmt-datalake-store 0.1.6 <pip>
- azure-mgmt-devtestlabs 2.0.0 <pip>
- azure-mgmt-dns 1.0.1 <pip>
- azure-mgmt-documentdb 0.1.3 <pip>
- azure-mgmt-iothub 0.2.2 <pip>
- azure-mgmt-keyvault 0.31.0 <pip>
- azure-mgmt-logic 2.1.0 <pip>
- azure-mgmt-monitor 0.2.1 <pip>
- azure-mgmt-network 1.0.0 <pip>
- azure-mgmt-nspkg 2.0.0 <pip>
- azure-mgmt-rdbms 0.1.0 <pip>
- azure-mgmt-redis 4.1.0 <pip>
- azure-mgmt-resource 1.1.0 <pip>
- azure-mgmt-scheduler 1.1.3 <pip>
- azure-mgmt-sql 0.5.3 <pip>
- azure-mgmt-storage 1.0.0 <pip>
- azure-mgmt-trafficmanager 0.30.0 <pip>
- azure-mgmt-web 0.32.0 <pip>
- azure-nspkg 2.0.0 <pip>
- azure-servicebus 0.21.1 <pip>
- azure-servicefabric 5.6.130 <pip>
- azure-servicemanagement-legacy 0.20.6 <pip>
- azure-storage 0.34.3 <pip>
- azure-storage-blob 0.37.0 <pip>
- azure-storage-common 0.37.0 <pip>
- azure-storage-nspkg 2.0.0 <pip>
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Cannot import name 'BlockBlobService' - Stack Overflow
when trying to run my python project using command prompt. (The code seems to work when i execute it directly from anaconda navigator.)...
Read more >Cannot import name 'BlobServiceClient' from 'azure.storage ...
The "ImportError: cannot import name 'BlobServiceClient' from 'azure.storage.blob'" occurs when we have an outdated version of the azure-storage-blob module ...
Read more >azure-storage-blob - PyPI
Create a container from where you can upload or download blobs. from azure.storage.blob import ContainerClient container_client = ContainerClient.
Read more >BlockBlobService Python SDK: "ImportError: cannot import ...
BlockBlobService Python SDK: "ImportError: cannot import name ... packages/azure/storage/blob/baseblobservice.py", line 34, in <module> from ...
Read more >No module named 'azure-storage-blob' – Finxter
Quick Fix: Python raises the ImportError: No module named 'azure-storage-blob' when it cannot find the library azure-storage-blob . The most frequent source ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I imported using the line “from azure.storage.blob import baseblobservice” and in my code I wrote “baseblobservice.BaseBlobService(…)” and it worked.
Hi @mat178, I agree with you that it is unfortunately counter-intuitive, since what is returned is indeed not what someone reading the method signature expects. But we also want to return the blob properties while getting the content, and the documentation makes that part clear.