ERROR: The launchpadlib Python module is not installed.

Bug #1071905 reported by Benjamin Drung on 2012-10-26
94
This bug affects 18 people
Affects Status Importance Assigned to Milestone
Apport
Undecided
Martin Pitt
apport (Ubuntu)
High
Unassigned
python-launchpadlib (Ubuntu)
Undecided
Unassigned

Bug Description

1) lsb_release -rd
Description: Ubuntu 12.10
Release: 12.10

2) apt-cache policy python-launchpadlib
python-launchpadlib:
  Installed: 1.9.12-2
  Candidate: 1.9.12-2
  Version table:
 *** 1.9.12-2 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy apport
apport:
  Installed: 2.6.1-0ubuntu6
  Candidate: 2.6.1-0ubuntu6
  Version table:
 *** 2.6.1-0ubuntu6 0
        900 http://archive.ubuntu.com/ubuntu/ quantal-updates/main i386 Packages
        100 /var/lib/dpkg/status
     2.6.1-0ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main i386 Packages

apt-cache policy python-launchpad-integration
python-launchpad-integration:
  Installed: 0.1.56.2
  Candidate: 0.1.56.2
  Version table:
 *** 0.1.56.2 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/universe i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy python-launchpadlib-toolkit
python-launchpadlib-toolkit:
  Installed: 2.2
  Candidate: 2.2
  Version table:
 *** 2.2 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/universe i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy python-apport
python-apport:
  Installed: 2.6.1-0ubuntu6
  Candidate: 2.6.1-0ubuntu6
  Version table:
 *** 2.6.1-0ubuntu6 0
        900 http://archive.ubuntu.com/ubuntu/ quantal-updates/main i386 Packages
        100 /var/lib/dpkg/status
     2.6.1-0ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main i386 Packages

apt-cache policy apport-retrace
apport-retrace:
  Installed: 2.6.1-0ubuntu6
  Candidate: 2.6.1-0ubuntu6
  Version table:
 *** 2.6.1-0ubuntu6 0
        900 http://archive.ubuntu.com/ubuntu/ quantal-updates/main i386 Packages
        100 /var/lib/dpkg/status
     2.6.1-0ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main i386 Packages

3) What is expected to happen via a terminal:
cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1071905/+attachment/3414934/+files/libreoffice.apport && ubuntu-bug -c libreoffice.apport -u 1071059

and an apport collection is attached to bug 1071059.

4) What happens instead is one gets in a terminal:
ubuntu-bug -c libreoffice.apport -u 1071059
ERROR: The launchpadlib Python module is not installed. This functionality is not available.

This is despite how what seems to be the appropriate packages noted above are already installed.

$ ubuntu-bug -c bug.apport -u 1071059
ERROR: The launchpadlib Python module is not installed. This functionality is not available.
$ dpkg -l python-launchpadlib
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 python-launchpadlib 1.9.12-2 all Launchpad web services client library

ubuntu-bug wants the launchpadlib Python module, but python-launchpadlib is installed.

PS: ubuntu-bug should tell the user how to fix the error. For example add: "Please install python-launchpadlib."

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: apport 2.6.1-0ubuntu6
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Fri Oct 26 23:05:06 2012
InstallationDate: Installed on 2012-04-24 (184 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120421)
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: Upgraded to quantal on 2012-10-22 (3 days ago)

Related branches

Benjamin Drung (bdrung) wrote :
description: updated
description: updated

libreoffice.apport file downloaded from Benjamin Drung's bug 1071059 demonstrating the problem https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1071059/+attachment/3414822/+files/libreoffice.apport .

description: updated

Marking Confirmed. However, I'm still investigating as this seemed initially a duplicate https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1023964 .

description: updated
Changed in apport (Ubuntu):
status: New → Confirmed
description: updated
description: updated
description: updated

Marking Triaged as the problem is reproducible. As well, I've installed all package candidate permutations for python, apport, and liblaunchpad, but still get the same error message.

Changed in apport (Ubuntu):
status: Confirmed → Triaged
tags: added: i386
Nick Andrik (andrikos) wrote :

Is there any workaround to attach collected report in an existing bug?

Fernando Giraldo (fercho) wrote :

i had the same error, i solve it with sudo apt-get install python-launchpadlib python-launchpad-integration launchpad-integration

now i can do apport-collect

Christopher Townsend (townsend) wrote :

This issue still occurs in Raring when using either ubuntu-bug -u bug_number on the console or apport-cli -u bug_number.

Christopher Townsend (townsend) wrote :

After reading comments in bug #1023964, this is because apport-cli uses Python 3 but python-launchpadlib uses Python 2.7.

I think the error message that is displayed is very misleading and should be fixed to convey the fact that there is a Python version mismatch instead of message that is shown.

Sudrien (sudrien) wrote :

Installing from mini.iso, I had to...

apt-get install python-apport
apt-get install python-launchpadlib
apt-get install linux
apt-get install python-gi
apport-collect 1180419

confirmed on 13.04 (HP-Mini-210-1000)

tags: added: raring
Forest (foresto) wrote :

Confirming what Christopher wrote in comment 8: The problem seems to be that apport-cli is now a python3 program, but python-launchpadlib has not been ported to python3. Therefore, it fails.

The workarounds posted so far do not work on raring.

This makes it rather difficult for users to gather system information for bug reports. I would think fixing it would be a high priority.

Forest, this would not be a python-launchpadlib issue as Apport is stating python-launchpadlib is not installed when it clearly is.

YMMV on WORKAROUNDs.

While the issue is annoying, it would not be a high priority as it doesn't affect an LTS.

Changed in python-launchpadlib (Ubuntu):
status: New → Invalid

The fix that I'm proposing here is to make the error message more meaningful since there is no python3-launchpadlib. This does address the fact that there is no python3-launchpadlib. That is tracked in other bugs such as bug #1153671 and bug #1060734.

Changed in apport:
status: New → In Progress
assignee: nobody → Christopher Townsend (townsend)
Phillip Susi (psusi) wrote :

The proper fix is to revert upgrading apport-cli to python3 until a python3-launchpadlib exists, and then it should show it as a dependency. Depending on an incompatible version of the library is a packaging error.

@psusi,

I tend to agree with what you say because I think not allowing apport-cli to use Launchpad is very bad. However, it seems the maintainers of Apport are reluctant or unwilling to revert apport-cli back to using Python2. And I'm not sure that Python3 support for launchpadlib will ever happen. I know my MP is not a "fix" per se, but since we cannot use launchpadlib, at least we should have a more accurate error message.

If the Apport maintainers are willing to revert back to Python2, then we can disregard my MP.

Martin Pitt (pitti) wrote :

It's rather that our Python maintainers/foundations team don't want python2 dependencies on the default install. As we install apport by default, it can only depend on python3 stuff, so Barry asked me to make the python2 bits optional. And indeed launchpadlib is not needed for most apport operations (its main purpose is to file bugs), only if you invoke it as apport-collect. So the default install with python3 is still mostly fine.

Martin Pitt (pitti) wrote :

> ubuntu-bug -c libreoffice.apport -u 1071059

This is not a valid usage, BTW. You cannot simultaneously report a bug (with -c) and update it (with -u). I'll make sure that this gives a proper error message. You should use "apport-collect 1071059" for updating, and "ubuntu-bug -c libreoffice.apport" for reporting.

Martin Pitt (pitti) wrote :

Thanks Christopher! I fixed this a bit differently, but keep the spirit of this in trunk: http://bazaar.launchpad.net/~apport-hackers/apport/trunk/revision/2664

For the Ubuntu branch we can indeed be more specific and show the package name / a clearer error message for Python 3: http://bazaar.launchpad.net/~ubuntu-core-dev/ubuntu/saucy/apport/ubuntu/revision/2217

Thanks!

Changed in apport (Ubuntu):
status: Triaged → In Progress
Martin Pitt (pitti) wrote :

I now also fixed the real issue that you cannot use -u and -c (or other options) together: http://bazaar.launchpad.net/~apport-hackers/apport/trunk/revision/2665

Changed in apport:
assignee: Christopher Townsend (townsend) → Martin Pitt (pitti)
status: In Progress → Fix Released
Changed in apport (Ubuntu):
status: In Progress → Fix Committed

@Martin,

Thanks for making this a more sane error message.

I guess in situations where X/Unity/Compiz are crashing (or situations where there is no window manager), there really is no way to file bugs since apport-collect needs a web browser to open to work. This situation is what led me to this bug. I guess our only hope is that the Launchpad team or some volunteer will actually port launchpadlib to Python3.

Christopher Townsend [2013-07-18 11:38 -0000]:
> I guess in situations where X/Unity/Compiz are crashing (or situations
> where there is no window manager), there really is no way to file bugs
> since apport-collect needs a web browser to open to work.

That seems like an unrelated issue, though. The confusion here was
mainly that the reporter used "apport-cli -c .. -u .." to update a
bug, which doesn't work. You can file a bug manually and then call
"apport-collect 12345" to update it.

@Martin

I see what you're saying, but how do file a bug manually if you don't have X/Unity/Compiz running? I thought apport-cli was a way to file a bug when you don't have a window manager running, but it can't since the launchpadlib is out of date.

Martin Pitt (pitti) wrote :

Christopher Townsend [2013-07-18 12:25 -0000]:
> I see what you're saying, but how do file a bug manually if you don't
> have X/Unity/Compiz running? I thought apport-cli was a way to file a
> bug when you don't have a window manager running, but it can't since the
> launchpadlib is out of date.

You don't need launchpadlib for filing a bug. You need a browser.
"apport-cli compiz" will work just fine to file a new report against
compiz, as long as you have something like links or lynx installed.
Alternatively you can use "apport-cli --save /tmp/mybug.report compiz",
copy that file to another computer (or restore X), and report it from
there with apport-bug mybug.report.

You don't use -u for filing a bug, that's for updating an existing
bug. And that's the *only* use case which requires launchpadlib.
(Aside from apport-retrace, which is a wholly different tool)

Hi Martin,

Ok, thanks for the explanation. That makes perfect sense. I'll quit bothering you now:)

Phillip Susi (psusi) wrote :

The issue isn't that it let you use -c and -u together, the issue is that -u is broken. This is a serious problem when asking users to attach needed logs to an existing bug report.

Changed in apport (Ubuntu):
importance: Undecided → High
status: Fix Committed → Triaged

If I understand what Martin is saying, apport-collect 123456 will work as well to attach logs, etc. to existing bug reports. Is my understanding correct?

Martin Pitt (pitti) wrote :

Yes, apport-collect will work. apport-cli -u cannot work, and that part is a wontfix.

Changed in apport (Ubuntu):
status: Triaged → Fix Committed

Martin Pitt, thanks for checking in on this report. We could take this discussion off report as it seems unrelated, but as per the apport-cli manpage:
 -c report, --crash-file=report
              Upload a previously processed stored report in an arbitrary file
              location. This is useful for copying a crash report to a
              machine with internet connection and reporting it from there.
              Files must end in .crash or .apport.

-u report-number, --update-report report-number
              Run apport information collection on an already existing problem
              report. The affected package is taken from the report by
              default, but you can explicitly specify one with --package to
              collect information for a different package (this is useful if
              the report is assigned to the wrong package).

Hence, apport-cli -c *.crash -u 12345 is valid syntax. Are your advising this feature is intending to no longer be supported, is broken, something else?

Thank you for your time and consideration in this matter, and I look forward to your response.

Martin Pitt (pitti) wrote :

Christopher M. Penalver [2013-07-19 10:52 -0000]:
> Hence, apport-cli -c *.crash -u 12345 is valid syntax. Are your advising
> this feature is intending to no longer be supported, is broken,
> something else?

It's broken because we don't have a python3-launchpadlib and because
we run apport-cli with python3.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.12-0ubuntu2

---------------
apport (2.12-0ubuntu2) saucy; urgency=low

  * Merge from trunk:
    - sandboxutils.py, make_sandbox(): Install packages from Package: and
      Dependencies: fields also if we have a ProcMaps: field and there are any
      third-party packages. This fixes retracing crashes that use PPAs (as they
      don't have Contents.gz).
    - Robustify "progress bar visible" GTK and KDE UI checks for the faster
      collection due to dropping lsb_release.
 -- Martin Pitt <email address hidden> Fri, 02 Aug 2013 16:03:43 +0200

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released

annalisa@annalisa-HP-Mini-210-1000:~$ sudo apport-collect 1231647
[sudo] password for annalisa:
ERROR: The launchpadlib Python module is not installed. This functionality is not available.

ubuntu 13.04 updated on 26/09/2013 (NO PROPOSED update selected)

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

Duplicates of this bug

Other bug subscribers