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.

ModuleNotFoundError: No module named - azure.storage.cloudstorageaccount

See original GitHub issue
  • Package Name: azure-storage-blob and azure-storage-common
  • Package Version: 12.11.0 and 2.1.0
  • Operating System: Ubuntu 20.04
  • Python Version: 3.8

Describe the bug Facing issue wrt to Azure SDK of Cloud Storage and installed all latet required packages as described here https://azure.github.io/azure-sdk/releases/latest/all/python.html

To Reproduce Steps to reproduce the behavior:

  1. RUN apt-get update &&
    apt-get install software-properties-common &&
    add-apt-repository --yes --update ppa:ansible/ansible &&
    apt-get install ansible=5.10.0-1ppa~focal &&
    ansible-galaxy collection install azure.azcollection &&
    pip3 install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements-azure.txt &&
    pip3 install -r ~/.ansible/collections/ansible_collections/azure/azcollection/sanity-requirements-azure.txt &&
    pip3 install azure-storage-blob azure-storage-common &&
    ansible-galaxy collection install azure.azcollection --force

Expected behavior ‘azure.storage.cloudstorageaccount’ should be installed without any errrors

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

adal==1.2.7
ansible==5.10.0
ansible-core==2.12.10
appdirs==1.4.3
applicationinsights==0.11.10
argcomplete==1.12.3
astroid==2.11.7
azure-cli-core==2.34.0
azure-cli-telemetry==1.0.6
azure-common==1.1.11
azure-containerregistry==1.0.0
azure-core==1.26.1
azure-graphrbac==0.61.1
azure-identity==1.7.0
azure-keyvault==1.1.0
azure-mgmt-apimanagement==0.2.0
azure-mgmt-authorization==2.0.0
azure-mgmt-automation==1.0.0
azure-mgmt-batch==5.0.1
azure-mgmt-cdn==11.0.0
azure-mgmt-compute==26.1.0
azure-mgmt-containerinstance==9.0.0
azure-mgmt-containerregistry==9.1.0
azure-mgmt-containerservice==20.0.0
azure-mgmt-core==1.3.0
azure-mgmt-cosmosdb==6.4.0
azure-mgmt-datafactory==2.0.0
azure-mgmt-datalake-store==1.0.0
azure-mgmt-devtestlabs==3.0.0
azure-mgmt-dns==8.0.0
azure-mgmt-eventhub==10.1.0
azure-mgmt-hdinsight==9.0.0
azure-mgmt-iothub==2.2.0
azure-mgmt-keyvault==10.0.0
azure-mgmt-loganalytics==12.0.0
azure-mgmt-managedservices==6.0.0
azure-mgmt-managementgroups==0.2.0
azure-mgmt-marketplaceordering==0.1.0
azure-mgmt-monitor==3.0.0
azure-mgmt-network==19.1.0
azure-mgmt-notificationhubs==7.0.0
azure-mgmt-nspkg==2.0.0
azure-mgmt-privatedns==1.0.0
azure-mgmt-rdbms==10.0.0
azure-mgmt-recoveryservices==2.0.0
azure-mgmt-recoveryservicesbackup==3.0.0
azure-mgmt-redis==13.0.0
azure-mgmt-resource==10.2.0
azure-mgmt-search==8.0.0
azure-mgmt-servicebus==7.1.0
azure-mgmt-sql==3.0.1
azure-mgmt-storage==19.0.0
azure-mgmt-trafficmanager==1.0.0b1
azure-mgmt-web==6.1.0
azure-nspkg==2.0.0
azure-storage-blob==12.11.0
azure-storage-common==2.1.0
bcrypt==3.1.7
certifi==2019.11.28
cffi==1.15.1
chardet==3.0.4
cryptography==38.0.1
dbus-python==1.2.16
dill==0.3.6
distlib==0.3.0
docker==4.1.0
filelock==3.0.12
humanfriendly==10.0
idna==2.8
importlib-metadata==1.5.0
isodate==0.6.1
isort==5.10.1
Jinja2==2.10.1
jmespath==0.9.4
knack==0.9.0
lazy-object-proxy==1.8.0
MarkupSafe==1.1.0
mccabe==0.7.0
more-itertools==4.2.0
msal==1.20.0
msal-extensions==0.3.1
msrest==0.7.1
msrestazure==0.6.4
ntlm-auth==1.1.0
oauthlib==3.2.2
packaging==20.3
paramiko==2.6.0
pathspec==0.10.2
pipenv==2022.11.11
pkginfo==1.8.3
platformdirs==2.5.4
portalocker==1.7.1
psutil==5.9.4
pycodestyle==2.8.0
pycparser==2.21
Pygments==2.13.0
PyGObject==3.36.0
PyJWT==2.6.0
pykerberos==1.1.14
pylint==2.13.5
PyNaCl==1.3.0
pyOpenSSL==22.1.0
pyparsing==2.4.6
python-apt==2.0.0+ubuntu0.20.4.8
python-dateutil==2.8.2
pywinrm==0.3.0
PyYAML==5.3.1
requests==2.22.0
requests-kerberos==0.12.0
requests-ntlm==1.1.0
requests-oauthlib==1.3.1
requests-unixsocket==0.2.0
resolvelib==0.5.4
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.7
six==1.14.0
tabulate==0.9.0
tomli==2.0.1
typing-extensions==4.4.0
urllib3==1.25.8
virtualenv==20.0.17
virtualenv-clone==0.5.7
voluptuous==0.13.1
websocket-client==0.53.0
wrapt==1.14.1
xmltodict==0.12.0
yamllint==1.26.3
zipp==1.0.0

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lmazuelcommented, Nov 23, 2022

Untangling this discussion:

  • azcollection is owned by this repo: https://github.com/ansible-collections/azure
  • cloudstorageaccount was a module part of azure-storage-common which is deprecated
  • It seems 1.13.0 was using the deprecated SDK (see req) while 1.14.0 is using the new SDK (see req). Reading those list, it doesn’t seem to me there is any incompatibilities and azcollection module does the right thing, it seems they did their req right
  • It’s unclear to me where you got the cloudstorageaccount error reading your message. If it’s throwing from your personal code, you need azure-storage-common which is not installed starting 1.14.0 it seems. I would highly suggest you update your code to not rely on this deprecated code. IF it’s throwing an exception from azcollection, you can create a bug on their repo for investigation.

In the meantime, I made a PR to clarify the deprecation of azure-storage-common in our list of SDKs: https://github.com/Azure/azure-sdk/pull/5163

0reactions
jalauzon-msftcommented, Nov 21, 2022

Hi @rahulsoni43, I do not believe we own/maintain az.azurecollections but it seems like there is some incompatibility in their list of packages. I believe the azure-storage-cloudstorageaccount package has to do with a management plane package (containing mgmt in name) so it’s likely one of those packages causing the issue. I’m not familiar with management plane so I can’t identify which one.

I recommend you just don’t install az.azurecollections at all and rather, directly install the packages you need individually. If you need a lot of packages from the list, you could also create your own requirements file containing only what you need. You’ll want to do this from a clean environment. If all you need is azure-storage-blob, just pip3 install azure-storage-blob in a clean environment and that should be enough.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'azure.storage.cloudstorageaccount' #396
The error was: ModuleNotFoundError: No module named 'azure.storage.cloudstorageaccount' fatal: [127.0.0.1]: FAILED!
Read more >
Error "No module named 'azure.storage.cloudstorageaccount ...
I have a working solution. I started from scratch, and created an Azure pipeline template without a role. As an example I take...
Read more >
No module named 'azure.storage.cloudstorageaccount' - Reddit
The error was: ModuleNotFoundError: No module named 'azure.storage.cloudstorageaccount' fatal: [localhost]: FAILED!
Read more >
No module named 'azure-storage-blob' – Finxter
How to Fix “ModuleNotFoundError: No module named 'azure-storage-blob'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >
ModuleNotFoundError: No module named 'azure-storage'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'azure-storage' How to remove the Modu.
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