python3-software-properties broken

Asked by Matthew Mattox

I'm getting the following error when I try add an ppa.
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

mmattox@a1ubthorp01:~$ sudo add-apt-repository ppa:nilarimogard/webupd8
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 11, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 64, in <module>
    from . import shortcuts
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 23, in <module>
    _DEF_CODENAME = aptsources.distro.get_distro().codename
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 576, in get_distro
    os_release = _OSRelease()
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 525, in __init__
    self.parse()
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 547, in parse
    self.parse_entry(*line.split('=', 1))
TypeError: parse_entry() missing 1 required positional argument: 'value'
mmattox@a1ubthorp01:~$

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Matthew Mattox
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

lsb_release -a; uname -a; apt-cache policy add-apt-repository

Thanks

Revision history for this message
Matthew Mattox (matthewmattoxrancher) said :
#2

root@a1ubthorp01:~# lsb_release -a; uname -a; apt-cache policy add-apt-repository
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
Linux a1ubthorp01 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
N: Unable to locate package add-apt-repository
root@a1ubthorp01:~#

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

add-apt-repository is part of the package software-properties-common (and not python3-software-properties)

So, please provide the output of the command:

apt-cache policy software-properties-common

Revision history for this message
Matthew Mattox (matthewmattoxrancher) said :
#4

root@a1ubthorp01:~# apt-cache policy software-properties-common
software-properties-common:
  Installed: 0.96.24.32.7
  Candidate: 0.96.24.32.7
  Version table:
 *** 0.96.24.32.7 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
        100 /var/lib/dpkg/status
     0.96.24.32.1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages
root@a1ubthorp01:~#

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

What is the output of the command

cat -n /etc/os-release

Revision history for this message
Matthew Mattox (matthewmattoxrancher) said :
#6

root@a1ubthorp01:~# cat -n /etc/os-release
     1 NAME="Ubuntu"
     2 VERSION="18.04.2 LTS (Bionic Beaver)"
     3 ID=ubuntu
     4 ID_LIKE=debian
     5 PRETTY_NAME="Ubuntu 18.04.2 LTS"
     6 VERSION_ID="18.04"
     7 HOME_URL="https://www.ubuntu.com/"
     8 SUPPORT_URL="https://help.ubuntu.com/"
     9 BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    10 PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    11 VERSION_CODENAME=bionic
    12 UBUNTU_CODENAME=bionic
root@a1ubthorp01:~#

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

This is strange.

I know that you receive an error message like the one that you got, if there is something wrong in the /etc/os-release file. But I do not see anything wrong in yours.

What output do you receive for the commands

sudo apt install --reinstall base-files software-properties-common python3-apt

sudo add-apt-repository ppa:nilarimogard/webupd8

Revision history for this message
Matthew Mattox (matthewmattoxrancher) said :
#8

That resolved the error.
sudo apt install --reinstall base-files software-properties-common
python3-apt

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

Nice. Please update the bug too