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 import name 'BaseBlobService'

See original GitHub issue

Hi,

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:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bardiaborhanicommented, May 7, 2019

I imported using the line “from azure.storage.blob import baseblobservice” and in my code I wrote “baseblobservice.BaseBlobService(…)” and it worked.

0reactions
zezha-msftcommented, Oct 23, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

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