Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with the update of batch component #2811

Closed
lmiroslaw opened this issue Apr 10, 2017 · 2 comments
Closed

Problem with the update of batch component #2811

lmiroslaw opened this issue Apr 10, 2017 · 2 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Component

Comments

@lmiroslaw
Copy link

For some reasons I was prompted to install batch when runnig a simple command:
'az group list -o table --debug'

λ az group list -o table --debug
Command arguments ['group', 'list', '-o', 'table']
 
Error loading command module 'batch'
Traceback (most recent call last):
  File "C:\Users\lumirosl\AppData\Roaming\Python\Python35\site-packages\azure\cli\core\commands\__init__.py", line 285, in get_command_table
    import_module('azure.cli.command_modules.' + mod).load_commands()
  File "C:\Users\lumirosl\AppData\Roaming\Python\Python35\site-packages\azure\cli\command_modules\batch\__init__.py", line 18, in load_commands
    import azure.cli.command_modules.batch.commands  # pylint: disable=redefined-outer-name
  File "C:\Users\lumirosl\AppData\Roaming\Python\Python35\site-packages\azure\cli\command_modules\batch\commands.py", line 41, in <module>
    cli_command(__name__, 'batch account list', custom_path.format('list_accounts'), account_mgmt_client_factory, table_transformer=account_list_table_format)
  File "C:\Users\lumirosl\AppData\Roaming\Python\Python35\site-packages\azure\cli\core\commands\__init__.py", line 325, in cli_command
    formatter_class=formatter_class)
  File "C:\Users\lumirosl\AppData\Roaming\Python\Python35\site-packages\azure\cli\core\commands\__init__.py", line 415, in create_command
    formatter_class=formatter_class)
  File "C:\Users\lumirosl\AppData\Roaming\Python\Python35\site-packages\azure\cli\core\commands\__init__.py", line 191, in __init__
    if description_loader and CliCommand._should_load_description() \
  File "C:\Users\lumirosl\AppData\Roaming\Python\Python35\site-packages\azure\cli\core\commands\__init__.py", line 411, in description_loader
    return extract_full_summary_from_signature(get_op_handler(operation))
  File "C:\Users\lumirosl\AppData\Roaming\Python\Python35\site-packages\azure\cli\core\commands\__init__.py", line 332, in get_op_handler
    op = import_module(mod_to_import)
  File "C:\Users\lumirosl\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\lumirosl\AppData\Roaming\Python\Python35\site-packages\azure\cli\command_modules\batch\custom.py", line 11, in <module>
    from azure.mgmt.batch import BatchManagementClient
**ImportError: No module named 'azure.mgmt.batch'**

After the update I get another error:
az component update --add batch --debug

FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\lumirosl\AppData\Local\Temp\pip-jtkvoagu-uninstall\users\lumirosl\appdata\roaming\python\python35\site-packages\azure\cli\command_modules\network\mgmt_express_route_circuit\lib\models\pycache\express_route_circuit_creation_client_enums.cpython-35.pyc'

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: pip

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here: 2.0.0

OS Version: What OS and version are you using?
Answer here: Windows 10

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: cmder


Description

@derekbekoe
Copy link
Member

Looks like some dependencies were outdated as you had version 2.0.0 of azure-cli and latest is 2.0.2 so there was an ImportError.
The update command failed due to #1221. Upgrading to Python 3.6 should resolve this - #1221 (comment).

@JasonRShaver JasonRShaver added Batch az batch bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed Batch az batch labels Apr 14, 2017
@derekbekoe
Copy link
Member

This was due to a dependency mismatch.
Recreating the environment should resolve this.

@haroldrandom haroldrandom added bug This issue requires a change to an existing behavior in the product in order to be resolved. Component labels Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Component
Projects
None yet
Development

No branches or pull requests

4 participants