try to attach UA to my machine, got error

Bug #1981120 reported by ublover
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

[sudo] password for chdev:
ERROR:root:Unhandled exception, please file a bug
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1791, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1859, in main
    cfg = config.UAConfig()
  File "/usr/lib/python3/dist-packages/uaclient/config.py", line 115, in __init__
    self.cfg, self.invalid_keys = parse_config(self.cfg_path)
  File "/usr/lib/python3/dist-packages/uaclient/config.py", line 814, in parse_config
    cfg.update(yaml.safe_load(util.load_file(config_path)))
  File "/usr/local/lib/python3.10/dist-packages/yaml/__init__.py", line 94, in safe_load
    return load(stream, SafeLoader)
  File "/usr/local/lib/python3.10/dist-packages/yaml/__init__.py", line 72, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.10/dist-packages/yaml/constructor.py", line 37, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.10/dist-packages/yaml/constructor.py", line 46, in construct_document
    for dummy in generator:
  File "/usr/local/lib/python3.10/dist-packages/yaml/constructor.py", line 398, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/usr/local/lib/python3.10/dist-packages/yaml/constructor.py", line 204, in construct_mapping
    return super().construct_mapping(node, deep=deep)
  File "/usr/local/lib/python3.10/dist-packages/yaml/constructor.py", line 126, in construct_mapping
    if not isinstance(key, collections.Hashable):
AttributeError: module 'collections' has no attribute 'Hashable'
Unexpected error(s) occurred.
For more details, see the log: /var/log/ubuntu-advantage.log

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: ubuntu-advantage-tools 27.9~22.04.1
ProcVersionSignature: Ubuntu 5.15.0-40.43-generic 5.15.35
Uname: Linux 5.15.0-40-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sat Jul 9 21:22:32 2022
InstallationDate: Installed on 2022-05-27 (42 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
SourcePackage: ubuntu-advantage-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
ublover (lichangche) wrote :
Revision history for this message
ublover (lichangche) wrote :

The problem occurred when running "sudo ua attach xxx(mytoken)"

Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote :

Hi ublover,

Looking at the error log you provided, it seems that the error is coming from the pyyaml version you are using. By the path ua is looking for, /usr/local/lib/python3.10/dist-packages/yaml/, I am assuming that this dependency was installed through pip. Therefore, we could have a pyyaml version that is incompatible with ua. Is it possible for you to use the packaged version of pyyaml instead, python3-yaml ?

Note that you would not need to install it, since it is already a dependency of ua

Changed in ubuntu-advantage-tools (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ubuntu-advantage-tools (Ubuntu) because there has been no activity for 60 days.]

Changed in ubuntu-advantage-tools (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.