hello.. im new to linux and when i try to link my canonical token to my machine *new to linux* any tips?
sudo pro attach <*mytoken*> [sudo] senha para guinomo: Unexpected error(s) occurred. For more details, see the log: /var/log/ubuntu-advantage.log To file a bug run: ubuntu-bug ubuntu-advantage-tools Traceback (most recent call last): File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1704, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1834, in main return_value = args.action(args, cfg=cfg, extra_args=extra_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 255, in new_f return f(args, cfg=cfg, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 200, in new_f return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 184, in new_f retval = f(*args, cfg=cfg, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1303, in action_attach actions.attach_with_token(cfg, token=token, allow_enable=allow_enable) File "/usr/lib/python3/dist-packages/uaclient/actions.py", line 62, in attach_with_token new_machine_token = contract_client.add_contract_machine( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/util.py", line 92, in decorator return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 92, in add_contract_machine activity_info = self._get_activity_info() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 425, in _get_activity_info "desktop": system.is_desktop(), ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/system.py", line 397, in is_desktop for package in apt.get_installed_packages(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/apt.py", line 708, in get_installed_packages out, _ = system.subp(["apt", "list", "--installed"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/system.py", line 703, in subp out, err = _subp( ^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/system.py", line 652, in _subp raise exceptions.ProcessExecutionError( uaclient.exceptions.ProcessExecutionError: Falha ao executar comando 'apt list --installed' [exit(100)]. Mensagem: WARNING: apt does not have a stable CLI interface. Use with caution in scripts. E: Tipo 'sudo' não é conhecido na linha 1 na lista de fontes /etc/apt/sources.list.d/element-io.list E: A lista de fontes não pode ser lida. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/uaclient/version.py", line 55, in get_last_known_candidate candidate_version = get_pkg_candidate_version( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/apt.py", line 315, in get_pkg_candidate_version with PreserveAptCfg(get_apt_pkg_cache) as cache: File "/usr/lib/python3/dist-packages/uaclient/apt.py", line 261, in __enter__ return self.apt_func() ^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/apt.py", line 277, in get_apt_pkg_cache return apt_pkg.Cache(None) ^^^^^^^^^^^^^^^^^^^ apt_pkg.Error: E:Type 'sudo' is not known on line 1 in source list /etc/apt/sources.list.d/element-io.list, E:The list of sources could not be read. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/pro", line 33, in <module> sys.exit(load_entry_point('ubuntu-advantage-tools==8001', 'console_scripts', 'ubuntu-advantage')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1774, in wrapper _warn_about_new_version() File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1625, in _warn_about_new_version new_version = version.check_for_new_version() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/version.py", line 77, in check_for_new_version candidate = get_last_known_candidate() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/version.py", line 64, in get_last_known_candidate if candidate_version is not None: ^^^^^^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'candidate_version' where it is not associated with a value guinomo@Guinom0-DESKTOP:~$ ^C guinomo@Guinom0-DESKTOP:~$ sudo pro attach <*mytoken>
Unexpected error(s) occurred. For more details, see the log: /var/log/ubuntu-advantage.log To file a bug run: ubuntu-bug ubuntu-advantage-tools Traceback (most recent call last): File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1704, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1834, in main return_value = args.action(args, cfg=cfg, extra_args=extra_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 255, in new_f return f(args, cfg=cfg, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 200, in new_f return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 184, in new_f retval = f(*args, cfg=cfg, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1303, in action_attach actions.attach_with_token(cfg, token=token, allow_enable=allow_enable) File "/usr/lib/python3/dist-packages/uaclient/actions.py", line 62, in attach_with_token new_machine_token = contract_client.add_contract_machine( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/util.py", line 92, in decorator return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 92, in add_contract_machine activity_info = self._get_activity_info() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 425, in _get_activity_info "desktop": system.is_desktop(), ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/system.py", line 397, in is_desktop for package in apt.get_installed_packages(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/apt.py", line 708, in get_installed_packages out, _ = system.subp(["apt", "list", "--installed"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/system.py", line 703, in subp out, err = _subp( ^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/system.py", line 652, in _subp raise exceptions.ProcessExecutionError( uaclient.exceptions.ProcessExecutionError: Falha ao executar comando 'apt list --installed' [exit(100)]. Mensagem: WARNING: apt does not have a stable CLI interface. Use with caution in scripts. E: Tipo 'sudo' não é conhecido na linha 1 na lista de fontes /etc/apt/sources.list.d/element-io.list E: A lista de fontes não pode ser lida. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/uaclient/version.py", line 55, in get_last_known_candidate candidate_version = get_pkg_candidate_version( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/apt.py", line 315, in get_pkg_candidate_version with PreserveAptCfg(get_apt_pkg_cache) as cache: File "/usr/lib/python3/dist-packages/uaclient/apt.py", line 261, in __enter__ return self.apt_func() ^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/apt.py", line 277, in get_apt_pkg_cache return apt_pkg.Cache(None) ^^^^^^^^^^^^^^^^^^^ apt_pkg.Error: E:Type 'sudo' is not known on line 1 in source list /etc/apt/sources.list.d/element-io.list, E:The list of sources could not be read. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/pro", line 33, in <module> sys.exit(load_entry_point('ubuntu-advantage-tools==8001', 'console_scripts', 'ubuntu-advantage')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1774, in wrapper _warn_about_new_version() File "/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 1625, in _warn_about_new_version new_version = version.check_for_new_version() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/version.py", line 77, in check_for_new_version candidate = get_last_known_candidate() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/version.py", line 64, in get_last_known_candidate if candidate_version is not None: ^^^^^^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'candidate_version' where it is not associated with a value
[link] [comments]