package ubuntu-advantage-tools 27.0~16.04.1 - ModuleNotFoundError: No module named 'uaclient' - maybe dup 1930121

Bug #1927905 reported by Stephen Jerald
66
This bug affects 14 people
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Undecided
Unassigned

Bug Description

When i start the system i am getting this error.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: ubuntu-advantage-tools 27.0~16.04.1
ProcVersionSignature: Ubuntu 4.15.0-142.146~16.04.1-generic 4.15.18
Uname: Linux 4.15.0-142-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.30
Architecture: amd64
Date: Mon May 10 09:55:24 2021
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2020-08-23 (259 days ago)
InstallationMedia: Ubuntu 16.04.6 LTS "Xenial Xerus" - Release amd64 (20190227)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.7
 apt 1.2.35
SourcePackage: ubuntu-advantage-tools
Title: package ubuntu-advantage-tools 27.0~16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Stephen Jerald (stej13) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Hello Stephen,

Thanks for taking out the time to file this bug and help in making Ubuntu server better.

This looks like a duplicate of LP: #1927348. It seems to have the same error:
ModuleNotFoundError: No module named 'uaclient'

Could you take a look at the bug and let me further know if this error is reproducible in a container or a VM or something?

Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-advantage-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Fagner (fagner128) wrote :
Download full text (3.2 KiB)

Hey how is everything.

I also had the same problem when updating my system.

Returned the error:

Configuring ubuntu-advantage-tools (27.0 ~ 16.04.1) ...
Traceback (most recent call last):
ImportError: No module named 'uaclient'
dpkg: error processing Ubuntu-Advantage-Tools (--configure) package:
  sub-process script post-installation installed returned error output status 1
Errors were found during processing:
  ubuntu-advantage-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried a
sudo apt autoremove

Then after removing unnecessary packages he returned the error:

Configuring ubuntu-advantage-tools (27.0 ~ 16.04.1) ...
Traceback (most recent call last):
  File "<string>", line 2, in <module>
ImportError: No module named 'uaclient'
dpkg: error processing ubuntu-advantage-tools (--configure) package:
 sub-process script post-installation installed returned error output status 1
Errors were found during processing:
 Ubuntu-advantage-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then I updated with:
sudo apt update
In which it has updated the system and asked to list packages to be updated with:
apt List --upgradable

I checked and updated with:
sudo apt upgrade
and returned me again the same error

I tried then, thinking that it was a ua client key utter, I added to the repository to try to solve the problem with:
sudo add-apt-repository ppa:ua-client/stable

Then I updated the packages again but the same mistake again was returned

I then tried the command to try to clean, with:
sudo apt --purge remove && sudo apt autoclean
And again the same error was returned

I then tried the command: sudo apt -f install
And yet the same error was returned

I tried the command: sudo apt upgrade && sudo apt dist-upgrade
and also the same error was also returned

I then tried the command: sudo dpkg --configure -
Also the same error returned

I then tried to remove advantage-tools to reinstall later, but also returned the error a bit different but it's the same for purge. So I execute:
sudo apt remove --purge ubuntu-advantage-tools

And it was returned:

The following package has been installed automatically and is no longer required:
  distro-info
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  ubuntu-advantage-tools* ubuntu-minimal*
0 updated packages, 0 new packages installed, 2 to be removed
and 1 not updated.
1 packages not fully installed or removed.
After this operation, 3,016 KB of disk space will be released.
Do you want to continue? [Y / n] y
(Reading database ... 336633 Currently installed files and directories.)
Remove ubuntu-minimal (1,361.6) ...
Remove ubuntu-advantage-tools (27.0 ~ 16.04.1) ...
Traceback (most recent call last):
  File "<string>", line 2, in <module>
ImportError: No module named 'uaclient'
dpkg: error processing the ubuntu-advantage-tools package (--purge):
 sub-process script pre-removal installed returned error output status 1
Errors were found during processing:
 ubuntu-advantage-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

After that, I could no longer solve. In my system I can not update anything else. If you can help.

NOTE: The res...

Read more...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Chances are (https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1930121/comments/3) that this is due to a non-default python on the system.

If you could check and report your python setup that could help.
If you have a non standard python please make this a duplicate to bug 1930121 and then chime-in/discuss there for a hopefully common solution.

summary: - package ubuntu-advantage-tools 27.0~16.04.1 failed to install/upgrade:
- subprocess installed post-installation script returned error exit status
- 1
+ package ubuntu-advantage-tools 27.0~16.04.1 - ModuleNotFoundError: No
+ module named 'uaclient' - maybe dup 1930121
Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

In the absence of more information I'm going to mark this a duplicate of bug 1930121.

For now, the likely quick fix is to set PYTHONPATH=/usr/lib/python3/dist-packages

We will release a proper fix in ubuntu-advantage-tools in a coming release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers