apport-collect has missing dependence: launchpadlib Python

Bug #1023964 reported by Sasa Paporovic
84
This bug affects 16 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Won't Fix
High
Unassigned

Bug Description

On running apport-collect xxx from terminal I get:

apport-collect 972232
ERROR: The launchpadlib Python module is not installed. This functionality is not available.

I have seen this problem also by other users on bug triaging.

They could not provide additional information with apport-collect from Quantal.

 So, it is wide spread.

-------------------------------------------------------
Investigation:

A look with synaptics package manager shows that all packages of

liblaunchpad-integration*

are missing(should be 3 of them in a default installation).

Also

python-launchpadlib

should be installed as far as I know(it is not by default Quantal installation).

So, this here is properly a problem with the package of apport itself.

-------------------------------------------------

Steps to reproduce:

1.Install Quantal alpha 2
2.Upgrade to actual proposed
3.looke for a nice ubuntu launchopad bug you want to add information
4.open terminal
5.try to run

apport-collect <BUGNUMBER>

6. See the message on terminal:

ERROR: The launchpadlib Python module is not installed. This functionality is not available.

--------------------------------------------------

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: apport 2.3-0ubuntu4
ProcVersionSignature: Ubuntu 3.5.0-4.4-generic 3.5.0-rc6
Uname: Linux 3.5.0-4-generic x86_64
ApportVersion: 2.3-0ubuntu4
Architecture: amd64
Date: Thu Jul 12 17:43:51 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64+mac (20120627)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no username)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

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

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

Changed in apport (Ubuntu):
status: New → Confirmed
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I'm not sure this is a dependency problem.

I've got the same error, but I seem to have python-launchpadlib and python-launchpadlib-toolkit installed - I wonder if the problem here is that python3-launchpadlib is not installable:

dg@major:~/Documents$ dpkg -l \*launchpad\*|cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================-===========================================-============-====================================================================================
ii launchpad-integration 0.1.56 all launchpad integration
ii liblaunchpad-integration-3.0-1 0.1.56 amd64 library for launchpad integration
ii liblaunchpad-integration-cil-dev 0.1.56 amd64 CLI bindings for liblaunchpad-integration - development package
ii liblaunchpad-integration-common 0.1.56 all library for launchpad integration common data
un liblaunchpad-integration0 <none> (no description available)
ii liblaunchpad-integration1 0.1.56 amd64 library for launchpad integration
un liblaunchpad-integration1-cil <none> (no description available)
ii liblaunchpad-integration1.0-cil 0.1.56 amd64 CLI bindings for liblaunchpad-integration
ii python-launchpad-integration 0.1.56 amd64 library for launchpad integration
un python-launchpad-integration-dbg <none> (no description available)
ii python-launchpadlib 1.9.12-2 all Launchpad web services client library
ii python-launchpadlib-toolkit 2.1 all convenience library for launchpadlib
un python3-launchpadlib <none> (no description available)
dg@major:~/Documents$ sudo apt-get install python3-launchpadlib
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-launchpadlib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3-launchpadlib' has no installation candidate

Revision history for this message
Brian Murray (brian-murray) wrote :

apport (2.2.3-0ubuntu1) quantal; urgency=low

....

  * debian/control: Drop python-launchpadlib from Depends to Suggests for
    python-apport, too.

@Dave you probably upgraded from a previous release of Ubuntu while this was reported by someone who just installed quantal.

Changed in apport (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

@Brian Actually, this is a fresh install (new SSD about a month ago) from a QQ Kubuntu Alpha cd.

Revision history for this message
Martin Pitt (pitti) wrote :

This was a deliberate decision from the foundations team. python-launchpadlib is not yet available for python 3, so apport-collect has to use python 2 still. But as apport-collect is not required for core desktop operations, only for the rather advanced task (from the perspective of a user of a stable release) of following up to Launchpad bug reports, we just added the error message which points out that you need to install it manually. See the changelog:

apport (2.2.1-0ubuntu1) quantal; urgency=low
[...]
  * Move to Python 3, except for the parts that need python-launchpadlib
    (which is not yet available for Python 3):
    - debian/control: Add python3-problem-report and python3-apport packages.
    - debian/control: Switch build and binary dependencies to Python 3
      equivalents, except for apport-retrace.
    - debian/rules: Override dh_auto_* to also handle python3-* packages (see
      Debian #597105).
    - debian/rules: Run test suite with Python 3.
    - debian/rules: Switch hashbang line of apport-retrace back to Python 2.
    - Move /etc/apport/crashdb.conf from python-apport to apport, and
      recommend apport from both python{,3}-apport.
  * bin/apport-bug: Force running with python 2 when being invoked as
    apport-collect, and add a check/error message that you need to install
    python-apport to use this.
[...]

Changed in apport (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
Marwan Tanager (marwan-tngr) wrote :

For someone who wants to use apport-collect, is there any workaround?

Revision history for this message
Martin Pitt (pitti) wrote :

Workaround for what? Just install python-launchpadlib and it will work.

Revision history for this message
Marwan Tanager (marwan-tngr) wrote :

Sorry, I meant apport-cli, not apport-collect. That's becuase I got the same error noted in the bug description when I ran the command: apport-cli -u <bug-number>

I have python-launchpadlib already installed and apport-collect worked fine for me when I tried it. Thanks.

As far as I understand from the man pages, the two commands are equivalent.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 1023964] Re: apport-collect has missing dependence: launchpadlib Python

Marwan Tanager [2013-01-08 8:13 -0000]:
> As far as I understand from the man pages, the two commands are
> equivalent.

Ah, not in Ubuntu I'm afraid as apport-cli uses Python 3. You have to
use apport-collect.
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Teo (teo1978) wrote :

Why is this a wontFix?!?!?

If apport-collect depends on a package which is not installed, then when trying to run it, it should give this warning:

$ apport-collect
You need to run 'sudo apt-get install python-apport' for apport-collect to work.

Instead it says:
$ apport-collect 1250488
ERROR: The launchpadlib Python module is not installed. This functionality is not available.

and you have to figure out what the hell you need to install. That's a bug.

Revision history for this message
Teo (teo1978) wrote :

Actually it's not python-apport, it's already installed. It's something else that is missing.

Revision history for this message
Martin Pitt (pitti) wrote :

matteo, if python-apport is installed, then python-launchpadlib should be as well as that is a strict dependency. Indeed the current version gives you an error message as you suggested:

   if ! python -c 'import apport' 2>/dev/null; then
        echo "You need to run 'sudo apt-get install python-apport' for apport-collect to work." >&2

So if you still get that error, then something else is wrong on your system. Please give me the output of

  python -c 'import apport'

Thanks!

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.