Bug 21651 - Backintime cannot find sip python module (the module is installed) → Python related
Summary: Backintime cannot find sip python module (the module is installed) → Python r...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-01 09:03 CEST by Bertrand Marne
Modified: 2017-09-01 11:07 CEST (History)
0 users

See Also:
Source RPM: backintime-qt4-1.1.20-1.mga6.noarch, backintime-common-1.1.20-1.mga6.noarch
CVE:
Status comment:


Attachments

Description Bertrand Marne 2017-09-01 09:03:37 CEST
Description of problem:

The problem occurred very recently: I cannot run backintime anymore.

---8<-----

[user@localhost ~]$ backintime-qt4
Traceback (most recent call last):
  File "/usr/share/backintime/qt4/app.py", line 30, in <module>
    import qt4tools
  File "/usr/share/backintime/qt4/qt4tools.py", line 21, in <module>
    from PyQt4.QtGui import QFont, QFileDialog, QListView, QAbstractItemView,      \
ImportError: No module named 'sip'
[bertrand@localhost ~]$ backintime-qt4
Traceback (most recent call last):
  File "/usr/share/backintime/qt4/app.py", line 30, in <module>
    import qt4tools
  File "/usr/share/backintime/qt4/qt4tools.py", line 21, in <module>
    from PyQt4.QtGui import QFont, QFileDialog, QListView, QAbstractItemView,      \
ImportError: No module named 'sip'


---->8----

But sip is installed! Both python-sip and python3-sip packages are installed.

When I try to launch backintime (the backend):

----8<----
[user@localhost ~]$ nice -n 19 ionice -c2 -n7 /usr/bin/backintime --checksum backup-job
Traceback (most recent call last):
  File "/usr/share/backintime/common/backintime.py", line 24, in <module>
    import config
  File "/usr/share/backintime/common/config.py", line 31, in <module>
    import tools
  File "/usr/share/backintime/common/tools.py", line 45, in <module>
    import dbus
ImportError: No module named 'dbus'


---->8----

Of course python-dbus and python3-dbus ARE installed.

For information, it is maybe not related, but I have a similar problem with a pip installed program (Retext) with cannot find PyQt5.QtCore (python-qt5 and python3-qt5 are installed).


How reproducible:

Everytime I try to launch backintime.

Version-Release number of selected component (if applicable):

backintime-qt4-1.1.20-1.mga6.noarch, backintime-common-1.1.20-1.mga6.noarch
Comment 1 Bertrand Marne 2017-09-01 10:18:04 CEST
Suspecting that something gone wrong in the "python stack" I tried:

rpm -ivh --replacefiles --replacepkgs python3-sip-4.18.1-1.mga6.x86_64.rpm

And then error became different:

----8<-----
[user@localhost ~]$ backintime-qt4
Traceback (most recent call last):
  File "/usr/share/backintime/qt4/app.py", line 33, in <module>
    import backintime
  File "/usr/share/backintime/common/backintime.py", line 24, in <module>
    import config
  File "/usr/share/backintime/common/config.py", line 31, in <module>
    import tools
  File "/usr/share/backintime/common/tools.py", line 45, in <module>
    import dbus
ImportError: No module named 'dbus'

---->8-----

sip is no more missing... Going on with dbus: rpm -ivh --replacefiles --replacepkgs python3-dbus-1.2.4-3.mga6.x86_64.rpm

And then the error became

----8<-------
[user@localhost ~]$ backintime-qt4

Back In Time
Version: 1.1.20

Back In Time comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `backintime --license' for details.

Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 175, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 361, in get_name_owner
    's', (bus_name,), **keywords)
  File "/usr/lib64/python3.5/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'net.launchpad.backintime.serviceHelper': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/backintime/qt4/app.py", line 1509, in <module>
    cfg = backintime.start_app( 'backintime-qt4' )
  File "/usr/share/backintime/common/backintime.py", line 463, in start_app
    return getConfig(args, False)
  File "/usr/share/backintime/common/backintime.py", line 584, in getConfig
    cfg = config.Config(args.config)
  File "/usr/share/backintime/common/config.py", line 272, in __init__
    self.setupUdev = tools.SetupUdev()
  File "/usr/share/backintime/common/tools.py", line 1213, in __init__
    conn = bus.get_object(SetupUdev.CONNECTION, SetupUdev.OBJECT)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib64/python3.5/site-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib64/python3.5/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1

---->8----

Investigating further, I noticed that other Python app are also failing: this is going critical!

Apparently something gone wrong with Python... But how to fix it properly? (I can't manually reinstall all Python related packages with rpm -ivh --replacefiles --replacepkgs)
Comment 2 Bertrand Marne 2017-09-01 11:07:20 CEST
Backintime and most Python apps are now working...

What I did: reinstall with 'rpm -ivh --replacefiles --replacepkgs' the necessary python modules to make yum¹ work (it was broken too).

Then throw a 'yum reinstall python*' !

As far as I tested, Python apps such as backintime are now working well.

But there is still one question: how did this happen ? Is it possible that pip broke everything?


¹ I decided to use yum because I think there is no reinstall or restore option with urpmi. I hope i did not wrong.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.