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 'BlockBlobService'

See original GitHub issue

Hi,

I have azure-storage-blob version 0.37.1 and still i get an error when i import BlockBlobService.

from azure.storage.blob import BlockBlobService # import azure sdk packages

Error message: ImportError: cannot import name ‘BlockBlobService’

Here is a list of existing azure storage packages in my current virtual environment:

azure-storage-blob==0.37.1 azure-storage-common==0.37.1 azure-storage-nspkg==2.0.0

How can i fix this?

Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:41 (9 by maintainers)

github_iconTop GitHub Comments

27reactions
zezha-msftcommented, Nov 29, 2017

Hi @melzoghbi, I’m unable to reproduce this problem. It does not seem to be a problem with the storage package. Could you please try again with a different virtual environment? Thanks!

24reactions
harmonyliucommented, Mar 5, 2020

I think there is some dependency bug in the source code (version azure-storage-blob==2.1.0 ) of blockblobservice.py and init.py under site-packages/azure/storage/blob/ directory. Because when I type in from azure.storage.blob.blockblobservice import BlockBlobService it worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot import name 'BlockBlobService' - python
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 >
blockblobservice
The following import of BlockBlobService ... the error message: ImportError: cannot import name 'BlockBlobService' from 'azure.storage.blob'
Read more >
Cannot import AppendBlob from Azure Storage blob
However when I import AppendBlob, I am always getting an error "cannot import name 'AppendBlobService' from 'azure.storage.blob' ".
Read more >
[Example code]-Cannot import name 'BlockBlobService'
I got the following error: from azure.storage.blob import BlockBlobService ImportError: cannot import name 'BlockBlobService'.
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 >

github_iconTop Related Medium Post

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