TypeError: OsInfo.__init__() got an unexpected keyword argument 'lsb_version'
Bug Report
Summary and Bug Description
Axii commands are failing (e.g. axii w info) on Ubuntu22.04 and python3.10.6
TypeError: OsInfo.__init__() got an unexpected keyword argument 'lsb_version'
After removing the exception handling in app.click.py:
File "/home/andre/repos/axii/armarx_setup/core/util/json/switch_os.py", line 43, in resolve_switch_os
os_name = get_os_info().codename
File "/home/andre/repos/axii/armarx_setup/core/util/json/switch_os.py", line 33, in get_os_info
os_info = OsInfo(**lsb)
Feature Request: Option to disable the Exception handling in the main of app.click.py with argument or print the stack trace
Error due to lsb containing 'lsb_version'
import distro
lsb = distro.lsb_release_info()
print(lsb)
Output: {'lsb_version': 'core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch', 'distributor_id': 'Ubuntu', 'description': 'Ubuntu 22.04.2 LTS', 'release': '22.04', 'codename': 'jammy'}
But data class does not contain lsb_version
@dc.dataclass
class OsInfo:
# e.g. "Ubuntu"
distributor_id: str
# e.g. "Ubuntu 20.04.4 LTS"
description: str
# "20.04"
release: str
# "focal"
codename: str
Current Behavior
Error -> Axii command fails
Expected Behavior
No error
Steps to Reproduce
See explanation above. Probably if lsb-core package is installed.
Diagnosis
Output of axii self report
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Scope ┃ Info ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Axii │ Axii 23.06.2.0 @stable-0 with shell integration │
│ OS │ Ubuntu 22.04.2 LTS │
│ Kernel │ Linux 5.19.0-46-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed │
│ │ Jun 21 15:35:31 UTC 2 x86_64 GNU/Linux │
│ Shell │ /bin/bash │
│ Python │ Python 3.10.6 │
│ Pip │ certifi==2022.6.15, charset-normalizer==2.0.12, click==8.0.0, │
│ │ colorama==0.4.5, commonmark==0.9.1, cycler==0.11.0, │
│ │ dbus-python==1.2.18, decorator==5.1.1, distro==1.7.0, │
│ │ docutils==0.17.1, gitdb==4.0.9, GitPython==3.1.18, idna==3.3, │
│ │ igraph==0.9.11, kiwisolver==1.4.3, matplotlib==3.3.0, │
│ │ networkx==2.5, notify2==0.3.1, numpy==1.23.0, Pillow==9.1.1, │
│ │ psutil==5.9.4, Pygments==2.12.0, pygraphviz==1.6, pyparsing==3.0.9, │
│ │ PyQt5==5.15.0, PyQt5-sip==12.11.0, python-dateutil==2.8.2, │
│ │ python-igraph==0.9.11, python-Levenshtein==0.12.2, │
│ │ requests==2.26.0, rich==12.6.0, rich-click==1.2.1, six==1.16.0, │
│ │ smmap==5.0.0, texttable==1.6.4, thefuzz==0.19.0, urllib3==1.26.9, │
│ │ xdg==5.1.1, zeroc-ice==3.7.0 │
└────────┴─────────────────────────────────────────────────────────────────────┘
More Relevant Logs or Screenshots
Edited by André Meixner