[apport-kde] apport-collect: Can not import module PyQt5.QtCore

Bug #1439784 reported by Benedikt
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I had to use apport-collect in a tty, because in kde it is not usable:

benedikt@benediktZ50-70 ~ % apport-collect 1439694
ERROR: Could not import module, is a package upgrade in progress? Error: No module named PyQt5.QtCore

System : Kubuntu 15.04

Tags: kubuntu
Philip Muškovac (yofel)
tags: added: kubuntu
affects: apport → apport (Ubuntu)
Changed in apport (Ubuntu):
milestone: none → ubuntu-15.04
importance: Undecided → Medium
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
Launchpad Janitor (janitor) wrote :

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

---------------
apport (2.17-0ubuntu2) vivid; urgency=medium

  * Update apport-kde runtime dependencies. It requires pyqt5 not
    pykde4 LP: #1439784
 -- Harald Sitter <email address hidden> Fri, 10 Apr 2015 10:52:34 +0200

Changed in apport (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Sergio Callegari (callegar) wrote :

I confirm it does not give this error after manually installing python-pyqt5.
Weird. I thought distro support was all python3 by now.

Revision history for this message
Sergio Callegari (callegar) wrote :

Now getting different errors and apport-collect still not working...

apport-collect 1451277

...

Waiting to hear from Launchpad about your decision...

(process:15275): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
dpkg-query: no packages found matching linux
Traceback (most recent call last):
  File "/usr/share/apport/apport-kde", line 530, in <module>
    sys.exit(UserInterface.run_argv())
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 652, in run_argv
    return self.run_update_report()
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 568, in run_update_report
    response = self.ui_present_report_details(allowed_to_report)
  File "/usr/share/apport/apport-kde", line 367, in ui_present_report_details
    desktop_info)
  File "/usr/share/apport/apport-kde", line 184, in __init__
    self.ui.ui_update_view(self)
  File "/usr/share/apport/apport-kde", line 358, in ui_update_view
    QTreeWidgetItem(keyitem, [str(line)])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 21: ordinal not in range(128)

Revision history for this message
Patrick Stählin (n-ye-8) wrote :

I can confirm the same error as in comment #4 after fixing the dependency. Changing the erroneous line to:
  QTreeWidgetItem(keyitem, [str(line.encode('utf-8'))])

makes the dialog pop-up and sending works. The application core-dumps in the end on my machine though.

Revision history for this message
Stian Skjelstad (mywave) wrote :

Problem has re-appeared in 2.20.1-0ubuntu2 (system upgraded to kubuntu 16.04)

I had to manually install python-pyqt5

$ sudo apt-cache show apport-kde
Package: apport-kde
Priority: optional
Section: universe/kde
Installed-Size: 189
Maintainer: Martin Pitt <email address hidden>
Architecture: all
Source: apport
Version: 2.20.1-0ubuntu2
Depends: python3, python3-apport (>= 2.20.1-0ubuntu2), python3-pyqt5, apport (>= 0.41), procps, x-terminal-emulator
Recommends: kubuntu-notification-helper, gdb-minimal | gdb
Filename: pool/universe/a/apport/apport-kde_2.20.1-0ubuntu2_all.deb
Size: 17776
MD5sum: 50286c3a37c39bb0c0f18a407c67430a
SHA1: 6f835e6bf82f3a6d80622837c04d1c1f3fabd31a
SHA256: c783b953631710faef2e1d5ecc31b4c54447727d77034375087b88faa3f0e1b5
Description-en: KDE frontend for the apport crash report system
 apport automatically collects data from crashed processes and
 compiles a problem report in /var/crash/. This utilizes the crashdump
 helper hook provided by the Ubuntu kernel.
 .
 This package provides a KDE frontend for browsing and handling the
 crash reports.
Description-md5: c8fd570a74a013e8fc3c502dd64152ce
Homepage: https://wiki.ubuntu.com/Apport
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 3y
Task: kubuntu-desktop, kubuntu-full

Revision history for this message
Gannet (ken20001) wrote :

>Problem has re-appeared in 2.20.1-0ubuntu2 (system upgraded to kubuntu 16.04)
I confirm that.

Revision history for this message
Mihai Bojescu (mihaibojescu) wrote :

Problem still appears in 2.20.7-0ubuntu3 (kubuntu 17.10beta2).

Revision history for this message
Mihai Bojescu (mihaibojescu) wrote :

Installing python-qtpy and/or python3-qtpy fixed my issue.

Revision history for this message
Anquietas (e-admin-infosky-ro) wrote :

Still doesn't work.

administrator@itlap:~$ sudo apt install python-qtpy
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-qtpy

administrator@itlap:~$ sudo apt install python3-qtpy
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-qtpy

ERROR: Could not import module, is a package upgrade in progress? Error: No module named PyQt5.QtCore

Revision history for this message
Martin Schröder (martin-oneiros) wrote :

I can confirm that this does not work in 14.04 as these packages don't exist there.

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.