Azure / Azure/azure-cli-dev-tools
ModuleNotFoundError on `azdev extension publish`
- Dominant language
- Python
- Stars
- 91
- Forks
- 134
- Avg merge
- 2h 51m
- Merged PRs (30d)
- 1
Description
## Description
I'm attempting to use `azdev extension publish`, but I'm getting the following error:
```
No module named 'azure.multiapi.storage'
Traceback (most recent call last):
File "/home/gerobayopaz/aaz-env/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/home/gerobayopaz/aaz-env/lib/python3.10/site-packages/knack/invocation.py", line 224, in execute
cmd_result = parsed_args.func(params)
File "/home/gerobayopaz/aaz-env/lib/python3.10/site-packages/knack/commands.py", line 149, in __call__
return self.handler(*args, **kwargs)
File "/home/gerobayopaz/aaz-env/lib/python3.10/site-packages/knack/commands.py", line 256, in _command_handler
result = op(client, **command_args) if client else op(**command_args)
File "/home/gerobayopaz/aaz-env/lib/python3.10/site-packages/azdev/operations/extensions/__init__.py", line 311, in publish_extensions
from azure.multiapi.storage.v2018_11_09.blob import BlockBlobService
ModuleNotFoundError: No module named 'azure.multiapi.storage'
```
I inspected the source code, and here we are importing the BlockBlocService from the `azure-multiapi-storage` package
https://github.com/Azure/azure-cli-dev-tools/blob/ce90f1cf9aad0ee0f6017aef49bac8917f1aeded/azdev/operations/extensions/__init__.py#L309-L311
and setup.py declares it as a dependency, but without a version boundary.
https://github.com/Azure/azure-cli-dev-tools/blob/ce90f1cf9aad0ee0f6017aef49bac8917f1aeded/setup.py#L69-L70
But I think the most important thing is that this need to be migrated to use storagev2 api.
## Version info
#### azdev
```bash
azdev --version
```
Output
```0.2.5
Python (Linux) 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0]
Python location '/home/gerobayopaz/aaz-env/bin/python'
```
#### azure-multiapi-storage
```bash
pip show azure-multiapi-storage
```
Output:
```
Name: azure-multiapi-storage
Version: 1.5.0
Summary: Microsoft Azure Storage Client Library for Python with multi API version support.
Home-page: https://github.com/Azure/azure-multiapi-storage-python
Author: Microsoft Corporation
Author-email: azpycli@microsoft.com
License: MIT
Location: /home/gerobayopaz/aaz-env/lib/python3.10/site-packages
Requires: azure-common, azure-core, cryptography, msrest, python-dateutil, requests
Required-by: azdev, azure-cli
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.