Bug 2254405 - az version says "Error loading command module 'monitor': No module named 'antlr4'"
Summary: az version says "Error loading command module 'monitor': No module named 'ant...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: azure-cli
Version: 39
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Major Hayden 🤠
QA Contact:
URL: http
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-13 19:15 UTC by Omair Majid
Modified: 2024-02-06 21:38 UTC (History)
2 users (show)

Fixed In Version: azure-cli-2.57.0-1.fc40
Clone Of:
Environment:
Last Closed: 2024-02-06 21:38:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Omair Majid 2023-12-13 19:15:17 UTC
$ az version
Error loading command module 'monitor': No module named 'antlr4'
{
  "azure-cli": "2.54.0",
  "azure-cli-core": "2.54.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {}
}

This error only happened on the first run of the `az version` command. I tried running it again, but that did not show the error.


$ rpm -qf $(which az)
azure-cli-2.54.0-1.fc39.noarch

$ rpm -qa | grep monitor
low-memory-monitor-2.1-8.fc39.x86_64
gnome-system-monitor-45.0.2-1.fc39.x86_64
python3-azure-mgmt-monitor-5.0.0-5.fc39.noarch
$ rpm -qa | grep antlr




Reproducible: Couldn't Reproduce

Comment 1 Major Hayden 🤠 2023-12-13 22:37:41 UTC
It happened to me as well! That's unusual. I'll take a deeper look at this soon.

$ podman run --quiet --pull always --rm -it quay.io/fedora/fedora:rawhide bash -c "dnf -qy install azure-cli; az version; az version"
Error loading command module 'monitor': No module named 'antlr4'
{
  "azure-cli": "2.54.0",
  "azure-cli-core": "2.54.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {}
}
{
  "azure-cli": "2.54.0",
  "azure-cli-core": "2.54.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {}
}

Comment 2 Fedora Update System 2024-02-06 21:36:14 UTC
FEDORA-2024-fbf49f9c8c (azure-cli 2.57.0) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-fbf49f9c8c

Comment 3 Fedora Update System 2024-02-06 21:38:34 UTC
FEDORA-2024-fbf49f9c8c (azure-cli 2.57.0) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.